org.apache.cayenne.modeler.action.ImportDataMapAction.class Maven / Gradle / Ivy
???? 7
5org/apache/cayenne/modeler/action/ImportDataMapAction
getActionName ()Ljava/lang/String;
-org/apache/cayenne/modeler/util/CayenneAction =(Ljava/lang/String;Lorg/apache/cayenne/modeler/Application;)V
nameMapper :Lorg/apache/cayenne/configuration/ConfigurationNameMapper; Import DataMap
importDataMap ()V
&org/apache/cayenne/modeler/Application getFrame 2()Lorg/apache/cayenne/modeler/CayenneModelerFrame;
selectDataMap (Ljava/awt/Frame;)Ljava/io/File;
" # $ % & java/io/File toURI ()Ljava/net/URI;
( ) * + , java/net/URI toURL ()Ljava/net/URL; . / 0 application (Lorg/apache/cayenne/modeler/Application;
2 3 4 getInjector "()Lorg/apache/cayenne/di/Injector; 6 .org/apache/cayenne/configuration/DataMapLoader 8 9 : ; < org/apache/cayenne/di/Injector getInstance %(Ljava/lang/Class;)Ljava/lang/Object; > 'org/apache/cayenne/resource/URLResource
= @ A (Ljava/net/URL;)V 5 C D E load H(Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/map/DataMap;
G H I getProjectController 0()Lorg/apache/cayenne/modeler/ProjectController;
K L M N O ,org/apache/cayenne/modeler/ProjectController
getProject &()Lorg/apache/cayenne/project/Project;
Q R S T U "org/apache/cayenne/project/Project getRootNode 6()Lorg/apache/cayenne/configuration/ConfigurationNode;
W X Y Z [ ,org/apache/cayenne/dbsync/naming/NameBuilder builder ?(Lorg/apache/cayenne/configuration/ConfigurationNode;Lorg/apache/cayenne/configuration/ConfigurationNode;)Lorg/apache/cayenne/dbsync/naming/NameBuilder;
] ^ _ ` org/apache/cayenne/map/DataMap getName
W b c d baseName B(Ljava/lang/String;)Lorg/apache/cayenne/dbsync/naming/NameBuilder;
W f g name
] i j k setName (Ljava/lang/String;)V m 6org/apache/cayenne/configuration/DataChannelDescriptor
l o p q getConfigurationSource (()Lorg/apache/cayenne/resource/Resource; s t u v w 8org/apache/cayenne/configuration/ConfigurationNameMapper configurationLocation H(Lorg/apache/cayenne/configuration/ConfigurationNode;)Ljava/lang/String; y z { | } $org/apache/cayenne/resource/Resource getRelativeResource :(Ljava/lang/String;)Lorg/apache/cayenne/resource/Resource;
] ? ? setConfigurationSource )(Lorg/apache/cayenne/resource/Resource;)V
K ? ? ?
addDataMap 5(Ljava/lang/Object;Lorg/apache/cayenne/map/DataMap;)V ? java/lang/Exception ? ? ? logObj Lorg/slf4j/Logger; ? Error importing DataMap. ? ? ? ? ? org/slf4j/Logger info *(Ljava/lang/String;Ljava/lang/Throwable;)V
? ? ?
getMessage ? ? ? makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String; ? Can't Open DataMap ? javax/swing/JOptionPane
? ? ? ? showMessageDialog <(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)V
? ? ? getApplication *()Lorg/apache/cayenne/modeler/Application;
? ? ? getFrameController 7()Lorg/apache/cayenne/modeler/CayenneModelerController;
? ? ? ? ? 3org/apache/cayenne/modeler/CayenneModelerController getLastDirectory *()Lorg/apache/cayenne/modeler/pref/FSPath; ? javax/swing/JFileChooser
? ?
? ? ? ? setFileSelectionMode (I)V
? ? ? ? ? &org/apache/cayenne/modeler/pref/FSPath
updateChooser (Ljavax/swing/JFileChooser;)V
? ? ? ? ? +org/apache/cayenne/modeler/util/FileFilters getDataMapFilter &()Ljavax/swing/filechooser/FileFilter;
? ? ? ? addChoosableFileFilter '(Ljavax/swing/filechooser/FileFilter;)V ? Select DataMap
? ? ? ?
showDialog )(Ljava/awt/Component;Ljava/lang/String;)I
? ? ? ? getSelectedFile ()Ljava/io/File;
? ? ? ? updateFromChooser
? ? ? ? ? org/slf4j/LoggerFactory getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; e(Lorg/apache/cayenne/modeler/Application;Lorg/apache/cayenne/configuration/ConfigurationNameMapper;)V Code LineNumberTable LocalVariableTable this 7Lorg/apache/cayenne/modeler/action/ImportDataMapAction;
performAction (Ljava/awt/event/ActionEvent;)V e Ljava/awt/event/ActionEvent; dataMapResource &Lorg/apache/cayenne/resource/Resource; url Ljava/net/URL; loader 0Lorg/apache/cayenne/configuration/DataMapLoader; root 4Lorg/apache/cayenne/configuration/ConfigurationNode; baseResource newMap Lorg/apache/cayenne/map/DataMap; ex Ljava/lang/Exception; dataMapFile Ljava/io/File;
StackMapTable ? java/net/URL ? 2org/apache/cayenne/configuration/ConfigurationNode file f Ljava/awt/Frame; lastDir (Lorg/apache/cayenne/modeler/pref/FSPath; chooser Ljavax/swing/JFileChooser; status I
SourceFile ImportDataMapAction.java BootstrapMethods Error reading DataMap:
? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; InnerClasses %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup !
? ? ? ? T *? +? *,?
? ? 8 9
: ? ? ? / 0 ? ? ? = ? ? ? = *? ? ?
A B ? ? ? ? ? ? ? ?*? ? L+? ?+? !? 'N*? -? 15? 7 ? 5:? =Y-? ?? B M*? F? J? P:,,? V,? \? a? e? h? l? n:? *?
,? r ? x :,? ~*? F*,? ?? !N? ??-? ? ? -? ?? ? ?? ??
? ? ? ? Z E F G
M N ( O 8 Q D R H S L T R U U R X W b Y g Z z [ ? ^ ? c ? _ ? ` ? a ? d ? \ z ? ? t ? ? ( a ? ? D E ? ? b ' ? ? 8 T ? ? ? ? ? ? ? ? ? ? ? ? 5 ?
"? r " ] ? 5 ? y ? " ? ? ? B*? ?? ?? ?M? ?Y? ?N-? ?,-? ?-? ?? ?-+ɶ ?6? -? ?:,-? ??? ? . i l m n p $ r - s 2 t 8 w = y @ | ? > 8 ? ? B ? ? B ? ? 7 ? ? / ? - ? ? @ ? ? ? ! ? ֳ ?? ? 3
© 2015 - 2025 Weber Informatics LLC | Privacy Policy