org.apache.cayenne.project.compatibility.configuration.CompatibilityDataMapLoader.class Maven / Gradle / Ivy
The newest version!
???? 7 ?
5org/apache/cayenne/configuration/xml/XMLDataMapLoader ()V
Qorg/apache/cayenne/project/compatibility/configuration/CompatibilityDataMapLoader documentProvider ;Lorg/apache/cayenne/project/compatibility/DocumentProvider; $org/apache/cayenne/resource/Resource getURL ()Ljava/net/URL; 9org/apache/cayenne/project/compatibility/DocumentProvider getDocument &(Ljava/net/URL;)Lorg/w3c/dom/Document; upgradeServiceProvider Lorg/apache/cayenne/di/Provider; ! " org/apache/cayenne/di/Provider get ()Ljava/lang/Object; $ Dorg/apache/cayenne/project/compatibility/CompatibilityUpgradeService & )org/apache/cayenne/ConfigurationException ( $CompatibilityUpgradeService expected * java/lang/Object
% , - ((Ljava/lang/String;[Ljava/lang/Object;)V
# / 0 1 upgradeDataMap N(Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/resource/Resource;
3 4 5 load H(Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/map/DataMap; 7 org/apache/cayenne/map/DataMap 9 !javax/xml/transform/dom/DOMSource
8 ; < (Lorg/w3c/dom/Node;)V > java/io/ByteArrayOutputStream
=
A B C D E &javax/xml/transform/TransformerFactory newInstance *()Ljavax/xml/transform/TransformerFactory;
A G H I newTransformer #()Ljavax/xml/transform/Transformer; K 'javax/xml/transform/stream/StreamResult
J M N (Ljava/io/OutputStream;)V
P Q R S T javax/xml/transform/Transformer transform ;(Ljavax/xml/transform/Source;Ljavax/xml/transform/Result;)V V org/xml/sax/InputSource
8 X Y Z getSystemId ()Ljava/lang/String;
U \ ] (Ljava/lang/String;)V _ java/io/ByteArrayInputStream
= a b c toByteArray ()[B
^ e f ([B)V
U h i j
setByteStream (Ljava/io/InputStream;)V
l m n o p org/apache/cayenne/util/Util createXmlReader ()Lorg/xml/sax/XMLReader; r 2org/apache/cayenne/configuration/xml/LoaderContext t u v handlerFactory 5Lorg/apache/cayenne/configuration/xml/HandlerFactory;
q x y O(Lorg/xml/sax/XMLReader;Lorg/apache/cayenne/configuration/xml/HandlerFactory;)V { | } onDataMapLoaded _([Lorg/apache/cayenne/map/DataMap;)Lorg/apache/cayenne/configuration/xml/DataMapLoaderListener;
q ? ? addDataMapListener ?(Lorg/apache/cayenne/configuration/xml/DataMapLoaderListener;)V ? 7org/apache/cayenne/configuration/xml/RootDataMapHandler
? ? ? 7(Lorg/apache/cayenne/configuration/xml/LoaderContext;)V ? ? ? ? ? org/xml/sax/XMLReader setContentHandler (Lorg/xml/sax/ContentHandler;)V ? ? ? ? setErrorHandler (Lorg/xml/sax/ErrorHandler;)V ? ? ? ? parse (Lorg/xml/sax/InputSource;)V ? java/lang/Exception ? *org/apache/cayenne/CayenneRuntimeException ? #Error loading configuration from %s
? ? ? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V ? Unable to load data map from %s
? ,
6 ? ? Z getName
? ? ? ? Z java/net/URL getFile
? ? ? mapNameFromLocation &(Ljava/lang/String;)Ljava/lang/String;
6 ? ? ] setName Signature ULorg/apache/cayenne/di/Provider; RuntimeVisibleAnnotations Lorg/apache/cayenne/di/Inject; Code LineNumberTable LocalVariableTable this SLorg/apache/cayenne/project/compatibility/configuration/CompatibilityDataMapLoader; upgradeService FLorg/apache/cayenne/project/compatibility/CompatibilityUpgradeService; source #Ljavax/xml/transform/dom/DOMSource; baos Ljava/io/ByteArrayOutputStream; transFactory (Ljavax/xml/transform/TransformerFactory; isource Lorg/xml/sax/InputSource; parser Lorg/xml/sax/XMLReader;
loaderContext 4Lorg/apache/cayenne/configuration/xml/LoaderContext; rootHandler 9Lorg/apache/cayenne/configuration/xml/RootDataMapHandler; e Ljava/lang/Exception; configurationResource &Lorg/apache/cayenne/resource/Resource; document Lorg/w3c/dom/Document; maps ![Lorg/apache/cayenne/map/DataMap; map Lorg/apache/cayenne/map/DataMap;
StackMapTable ? org/w3c/dom/Document ?
Exceptions
lambda$load$0 D([Lorg/apache/cayenne/map/DataMap;Lorg/apache/cayenne/map/DataMap;)V dataMap
SourceFile CompatibilityDataMapLoader.java BootstrapMethods ? #(Lorg/apache/cayenne/map/DataMap;)V ?
? ? ? ?
? ? ? ? ? "java/lang/invoke/LambdaMetafactory metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; InnerClasses ? %java/lang/invoke/MethodHandles$Lookup ? java/lang/invoke/MethodHandles Lookup ! ? ? ? ? ? ? ? / *? ? ? 1 ? ? ? 4 5 ? ? O*? +?
? M,? M*? ? ? #? ? %Y'? )? +?*? ? ? #N-+? .W*? +?
? M,? *+? 2?? 6N? 8Y,? ::? =Y? ?:? @:? F? JY? L? O? UY? W? [:? ^Y? `? d? g? k:? qY*? s? w: -? z ? ~? ?Y ? ?:
? ?
? ? ? ? ? :? ?Y?? )Y+?
S? ??-2? ? ?Y?? )Y+?
S? ??-2:? ?? *+?
? ?? ?? ?? c ? ? ? ? ? ; = > # ? 1 B > C D D T G X H ^ L c N m O v P { Q ? R ? S ? U ? V ? W ? X ? Z ? [ ? \ ? _ ? ] ? ^ a b- d2 e: gL i ? ? > ? ? m ? ? ? v | ? ? { w ? ? ? V ? ? ? @ ? ? ? 1 ? ? ? ? ?
? ? ? O ? ? O ? ? ? ? ? c ? ? ? 2 ? ? ? ' ? 1 ?,? ? ? ? ?? 6 ? ?
? ? ? 9 *+S? ? W ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ?