build.xml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project basedir="." name="xmlschema_procesy5" default="sync_p5_tr_map_with_se"> <!-- sync_p5_tr_map_with_se new-schema-with-ID-to-move-and-rename-to-xsd generate_schema_with_id build_detect_objects_parent_relations build_detect_resource_type build_tr_map element_complexType.xml generate_schema_with_id sync_p5_tr_map_with_se -->
  3. <description>This file is Business Objects Transformations Component described in procesy5 documentation </description>
  4. <!--<description>Do przetwarzania wygenerowanych schematow itp i integracji z systemem</description>-->
  5. <!-- licence values -->
  6. <property name="XMLSchema_prefix" value="xs"/> <!-- default https://biuro.biall-net.pl for API working in this domain -->
  7. <property name="public_html" location="${basedir}"/>
  8. <property name="build_SE.xml" location="${basedir}/../build_SE.xml"/>
  9. <property name="build_SE_basedir" location="${basedir}/build_SE_basedir"/>
  10. <property name="build_SE_basedir.temp" location="${build_SE_basedir}/temp"/>
  11. <property name="build_SE.properties" location="${build_SE_basedir}/_build_SE.properties"/> <!-- namespace do lokalnego bindowania do default_db http://biuro.biall-net.pl/xmlschema_procesy5/default_db -->
  12. <property name="build_SE.properties.xml" location="${build_SE.properties}.xml"/>
  13. <!-- do wstawienia schematos -->
  14. <!-- modules WPS_Functions -->
  15. <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
  16. <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
  17. <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
  18. <!-- went to WPS_Functions/build_WPS_Functions -->
  19. <property name="ant-launcher.jar" location="/opt/local/share/java/apache-ant/lib/ant-launcher.jar"/>
  20. <property name="Shared_Git_Root" location="../../../"/> <!-- do ustalenia gdzie trzymamy wszystkie repozytoria na serwerze -->
  21. <property name="remote" location="${Shared_Git_Root}/se/SE/schema"/>
  22. <property name="remote.ant-object" location="${remote}/ant-object"/> <!-- than is default_db.CRM_PROCES/PROCES_INIT/PROCES_INIT.xsd and build.xml (empty) -->
  23. <property name="remote.ant-url_action" location="${remote}/ant-url_action"/>
  24. <property name="remote.default_db.in7_dziennik_koresp" location="${remote.ant-url_action}/default_db.in7_dziennik_koresp"/>
  25. <property name="remote.default_db.bi_audit_energa_rum_kontrahenci_powiazania" location="${remote.ant-url_action}/default_db.bi_audit_energa_rum_kontrahenci_powiazania"/><property name="table.local" location="${public_html}/table"/>
  26. <property name="table.remote" location="${remote}/table"/>
  27. <property name="default_db.instance.xml" value="${basedir}/default_db.instance.xml"><!--<glossgroup id="glossgroup_ezt_5sz_gz">--></property>
  28. <property name="default_db.instance.xml.symlink" value="${basedir}/default_db.instance.xml.symlink"/>
  29. <property name="transformed.local" location="${default_db.instance.xml}/transformed"/> <!-- dir for some raport outputs -->
  30. <property name="procesy5_system_schema.xml" value="${transformed.local}/procesy5_system_schema.xml"/>
  31. <property name="procesy5_system_schema_file" value="${procesy5_system_schema.xml}"/> <!-- alias property used in buildComplexType - to be removed in cleaning/organizing -->
  32. <property name="external_schema" value="/public_html/external_schema"/><!-- ignore schemas to be imported/transformed locally -->
  33. <property name="external_schema_id_namespace_prefix" value="/public_html/external_schema_id_namespace_prefix"/><!-- ingored but to parse schemas to be imported/transformed locally -->
  34. <property name="external_schema_table.path" value="${public_html}/external_schema_table"/>
  35. <property name="vrtfNamespaces.xml" value="${transformed.local}/vrtfNamespaces.xml"/>
  36. <property name="element_complexType.xml" value="${transformed.local}/element_complexType.xml"/><!-- for build flat schema and tr_map -->
  37. <property name="build_element_complexType.xml" value="${transformed.local}/build_element_complexType.xml"/> <!-- for build parallel by ant universal xsl -->
  38. <property name="build_tr_map.xml" value="${transformed.local}/build_tr_map.xml"/>
  39. <property name="build_complexType.local" location="${default_db.instance.xml}/build_complexType"/>
  40. <property name="build_complexType.remote" location="${remote}/default_db.instance.xml/build_complexType"/>
  41. <property name="p5_tr_map.local" location="${default_db.instance.xml}/p5_tr_map"/>
  42. <property name="p5_tr_map.remote" location="${remote}/default_db.instance.xml/p5_tr_map"/>
  43. <property name="detect_resource_type.local" location="${default_db.instance.xml}/detect_resource_type"/>
  44. <property name="detect_resource_type.remote" location="${remote}/default_db.instance.xml/detect_resource_type"/>
  45. <property name="simpleSchema.local" location="${default_db.instance.xml}/simpleSchema"/>
  46. <property name="simpleSchema.remote" location="${remote}/default_db.instance.xml/simpleSchema"/>
  47. <!-- module cache -->
  48. <property name="build_properties" location="${public_html}/.build_properties" />
  49. <property name="build_properties.xml" location="${public_html}/.build_properties.xml" />
  50. <property name="new-schema-with-ID-to-move-and-rename-to-xsd" location="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd"/>
  51. <property name="empty.xml" value="empty.xml"/>
  52. <!-- templates -->
  53. <property name="default_db_xml_cache.public" location="${public_html}/default_db_xml_cache.public"/>
  54. <property name="default_db_xml_cache" value="default_db_xml_cache"/><!-- xsl Business Objects Transformers -->
  55. <property name="system_cache__resources_tree_generate_xsl_required_occurs_raport" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport"/>
  56. <property name="parse_schema_to_generate_id.xsl" value="${system_cache__resources_tree_generate_xsl_required_occurs_raport}/parse_schema_to_generate_id.xsl" />
  57. <property name="parse_schema_to_generate_id_raport.xml" value="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd.xml"/>
  58. <property name="get_all_xsd.xsl" value="${default_db_xml_cache.public}/get_all_xsd.xsl"/>
  59. <property name="build_element_complexType.xml" value="${transformed.local}/build_element_complexType.xml"/> <!-- ant build to generate elements flat and p5_tr_map -->
  60. <property name="build_complexType.xsl" value="${default_db_xml_cache}/build_complexType.xsl"/>
  61. <property name="build_complexType_raport.xml" value="${transformed.local}/build_complexType_raport.xml"/>
  62. <property name="build_tr_map_raport.xml" value="${transformed.local}/build_tr_map_raport.xml"/>
  63. <property name="p5_tr_map.xsl" value="${default_db_xml_cache}/p5_tr_map.xsl"/>
  64. <property name="detect_resource_type.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_resource_type.xsl"/>
  65. <property name="detect_resource_type.xml" value="${transformed.local}/detect_resource_type.xml"/> <!-- ${targetNamespace_DEFAULTS_prefix} -->
  66. <property name="detect_objects_parent_relations.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_objects_parent_relations.xsl"/>
  67. <property name="detect_objects_parent_relations.xml" value="${transformed.local}/detect_objects_parent_relations.xml"/>
  68. <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"/>
  69. <property name="main_build_recurse_ant.dita_with_id_raport.xml" value="${transformed.local}/main_build_recurse_ant.dita_with_id_raport.xml"/><!-- raport only for simpleSchema -->
  70. <property name="default_db.xml" value="${public_html}/default_db/default_db.xml"/>
  71. <property name="default_db.xml.get_url" value="${TargetNamespaceBindings}/SE/version-git/api.php/xml/xsd/default_db"/> <!-- TODO to be set -->
  72. <property name="TargetNamespaceBindings.xsl" value="${default_db_xml_cache.public}/system_cache__appinfo/TargetNamespaceBindings.xsl"/>
  73. <!-- important xsl templates another -->
  74. <property name="build_ant_universal_by_xsl_match.xsl" value="${default_db_xml_cache.public}/build_ant_universal_by_xsl_match.xsl"/>
  75. <!-- this is current dowloaded from API GET_ALL_XSD scehema of database to rebuild_structures and analysis etc...
  76. <xsl:variable name="URL" select="concat($api_url,'/dev-pl/se-feature-api/api.php/xml/xsd/',$db_name_prefix)"/>
  77. -->
  78. <!-- for WPS_Functions/default_db/CRM_PROCES_tree informations -->
  79. <!--<FeatureType xmlns:default_objects="https://biuro.biall-net.pl/wfs/default_objects">
  80. <Name>SystemProcess</Name>
  81. <Title>SystemProcess</Title>
  82. <Abstract>SystemProcess</Abstract>
  83. <Keywords>SystemProcess</Keywords>
  84. <SRS>EPSG:4326</SRS>
  85. </FeatureType>-->
  86. <property name="default_objects:SystemProces" value="default_objects:SystemProces"/> <!-- to retrieve SystemProces -->
  87. <!--<target name="detect_objects_parent_relations_clean">
  88. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  89. </target>-->
  90. <target name="save_build_properties" >
  91. <ant antfile="${build_WPS_Functions.xml}" inheritall="yes"/>
  92. <ant antfile="${build_SE.xml}" target="save_build_properties"/>
  93. <loadproperties srcfile="${build_SE.properties}"/>
  94. <echoproperties destfile="${build_properties}" />
  95. <echoproperties destfile="${build_properties.xml}" format="xml"/>
  96. </target>
  97. <!--<target name="read_build_properties_check">
  98. <!-\-<condition property="read_build_properties_check" taskname="save_build_properties" >
  99. <available file="${build_properties}"/>
  100. </condition>-\->
  101. <antcall target="save_build_properties"/>
  102. <loadproperties srcfile="${build_properties}"/>
  103. </target>-->
  104. <target name="read_build_properties">
  105. <loadproperties srcfile="${build_properties}"/>
  106. <ant antfile="${build_SE.xml}" target="save_build_properties"/>
  107. <loadproperties srcfile="${build_SE.properties}"/>
  108. </target>
  109. <target name="procesy5_system_schema.xml_if_not_exists_check" description="to be called from procesy5_system_schema.xml_if_not_exists">
  110. <echo>Debug test relative property object_modeling_basedir=${object_modeling_basedir} </echo>
  111. <condition property="procesy5_system_schema.xml_if_not_exists_check" taskname="procesy5_system_schema.xml_if_not_exists">
  112. <available file="${procesy5_system_schema.xml}"/>
  113. </condition>
  114. </target>
  115. <target name="procesy5_system_schema.xml_if_not_exists" depends="procesy5_system_schema.xml_if_not_exists_check" unless="${procesy5_system_schema.xml_if_not_exists_check}" description="For external ant calls to be sure that xmlshema is generated if not - do it">
  116. <echo>procesy5_system_schema.xml_if_not_exists we do it by antcall procesy5_system_schema.xml </echo>
  117. <antcall target="procesy5_system_schema.xml"/>
  118. </target>
  119. <target name="empty.xml" description="Builds empty.xml">
  120. <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
  121. </target>
  122. <target name="procesy5_system_schema.xml" depends="empty.xml" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
  123. <mkdir dir="${default_db.instance.xml}"/>
  124. <mkdir dir="${transformed.local}"/>
  125. <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
  126. <echo> run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${public_html}; </echo>
  127. <xslt basedir="./" style="${get_all_xsd.xsl}" in="${empty.xml}" destdir="./" out="${procesy5_system_schema.xml}" >
  128. <factory name="net.sf.saxon.TransformerFactoryImpl">
  129. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  130. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
  131. </factory>
  132. <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
  133. <param name="cache" expression="refresh"/>
  134. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  135. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
  136. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  137. </xslt>
  138. <delete file="${vrtfNamespaces.xml}"/>
  139. <xslt basedir="./" style="${get_all_xsd.xsl}" in="${procesy5_system_schema.xml}" destdir="./" out="${vrtfNamespaces.xml}" >
  140. <factory name="net.sf.saxon.TransformerFactoryImpl">
  141. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  142. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
  143. </factory>
  144. <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
  145. <param name="cache" expression="refresh"/>
  146. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  147. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
  148. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  149. </xslt>
  150. </target>
  151. <target name="procesy5_system_schema.xml_complete" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
  152. <mkdir dir="${default_db.instance.xml}"/>
  153. <mkdir dir="${transformed.local}"/>
  154. <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
  155. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  156. <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
  157. <echo> run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${public_html}; </echo>
  158. <xslt basedir="./" style="${get_all_xsd.xsl}" in="${empty.xml}" destdir="./" out="${procesy5_system_schema.xml}" >
  159. <factory name="net.sf.saxon.TransformerFactoryImpl">
  160. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  161. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
  162. </factory>
  163. <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
  164. <param name="cache" expression="refresh"/>
  165. <param name="external_schema" expression="${external_schema}"/>
  166. <param name="external_schema_id_namespace_prefix" expression="${external_schema_id_namespace_prefix}"/>
  167. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  168. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/><classpath location="/opt/local/share/java/saxon9he.jar"/>
  169. </xslt>
  170. <antcall target="vrtfNamespaces.xml"/>
  171. </target>
  172. <target name="vrtfNamespaces.xml" description="Procedure to create vrtfNamespaces.xml - used in some tasks especially in generate schema with id"><delete file="${vrtfNamespaces.xml}"/>
  173. <xslt basedir="./" style="${get_all_xsd.xsl}" in="${procesy5_system_schema.xml}" destdir="./" out="${vrtfNamespaces.xml}" >
  174. <factory name="net.sf.saxon.TransformerFactoryImpl">
  175. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  176. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
  177. </factory>
  178. <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
  179. <param name="cache" expression="refresh"/>
  180. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  181. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/><classpath location="/opt/local/share/java/saxon9he.jar"/>
  182. </xslt>
  183. </target>
  184. <target name="generate_schema_with_id" depends="procesy5_system_schema.xml" description="first we generate schema to check if all have correct ID">
  185. <!-- schema @id fixing -->
  186. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  187. <delete file="${parse_schema_to_generate_id_raport.xml}"/>
  188. <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
  189. <xslt basedir="./" style="${parse_schema_to_generate_id.xsl}" in="${empty.xml}" destdir="./" out="${parse_schema_to_generate_id_raport.xml}" >
  190. <factory name="net.sf.saxon.TransformerFactoryImpl">
  191. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  192. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}parse_schema_to_generate_id"/>
  193. </factory>
  194. <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
  195. <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
  196. <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
  197. <param name="new-schema-with-ID-to-move-and-rename-to-xsd" expression="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  198. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  199. </xslt>
  200. </target>
  201. <target name="NamespaceBinding.xml" description="To generate config for NamespaceBinding.xml for use in SimpleSchema for related features etc - correctly use namespace prefix and url for API requests">
  202. <xslt basedir="./" style="${TargetNamespaceBindings.xsl}" in="${procesy5_system_schema.xml}" destdir="./" out="${NamespaceBinding.xml}.temp.xml" force="true">
  203. <factory name="net.sf.saxon.TransformerFactoryImpl">
  204. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  205. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}NamespaceBinding.xml"/>
  206. </factory>
  207. <param name="targetNamespace_DEFAULTS_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
  208. <param name="targetNamespace_DEFAULTS_prefix_objects" expression="${targetNamespace_DEFAULTS_prefix_objects}"/>
  209. <param name="TargetNamespaceBindingsApiUrl" expression="${TargetNamespaceBindingsApiUrl}"/>
  210. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  211. </xslt>
  212. </target>
  213. <target name="element_complexType.xml" depends="procesy5_system_schema.xml_complete,NamespaceBinding.xml" description=" generate list of elements and Complextype to generate flat and tr_map">
  214. <delete file="${element_complexType.xml}"/>
  215. <xslt basedir="./" style="${get_all_xsd.xsl}" in="${procesy5_system_schema.xml}" destdir="./" out="${element_complexType.xml}" >
  216. <factory name="net.sf.saxon.TransformerFactoryImpl">
  217. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  218. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}element_complexType"/>
  219. </factory>
  220. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  221. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/><classpath location="/opt/local/share/java/saxon9he.jar"/>
  222. </xslt>
  223. </target>
  224. <target name="build_element_complexType.xml" depends="element_complexType.xml,save_build_properties,empty.xml" description="generate build_element_complexType.xml for parallel launch">
  225. <delete file="${build_element_complexType.xml}"/>
  226. <xslt basedir="./" style="${build_ant_universal_by_xsl_match.xsl}" in="${element_complexType.xml}" destdir="./" out="${build_element_complexType.xml}" >
  227. <factory name="net.sf.saxon.TransformerFactoryImpl">
  228. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  229. <attribute name="http://saxon.sf.net/feature/initialMode" value="build_element_complexType.xml"/>
  230. </factory>
  231. <param name="match_element" expression=""/>
  232. <param name="antfile_prefix" expression="build_element_complexType.xml"/>
  233. <param name="temp" expression="/tmp"/>
  234. <param name="basedir" expression="${basedir}"/>
  235. <param name="antfile" expression=""/>
  236. <!--<param name="target" expression="xml_recursed_from_tr_map_with_RelatedFeatureLoop"/>-->
  237. <param name="match_child_element" expression=""/>
  238. <param name="match_child_element_property_name" expression=""/>
  239. <param name="properties.xml" expression="${build_properties.xml}"/>
  240. <!--<param name="properties_override.xml" expression="${properties_override.xml}"/>-->
  241. <param name="parallel" expression="1"/>
  242. <param name="threadCount" expression="10"/>
  243. <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/><classpath location="/opt/local/share/java/saxon9he.jar"/>
  244. </xslt>
  245. <delete dir="${build_complexType.local}"/>
  246. <ant antfile="${build_element_complexType.xml}"/></target>
  247. <target name="build_tr_map.xml" depends="build_element_complexType.xml" description="we generate all tr_map for all known elements and complexType in schema in parallel">
  248. <delete file="${build_tr_map.xml}"/>
  249. <xslt basedir="./" style="${build_ant_universal_by_xsl_match.xsl}" in="${element_complexType.xml}" destdir="./" out="${build_tr_map.xml}" >
  250. <factory name="net.sf.saxon.TransformerFactoryImpl">
  251. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  252. <attribute name="http://saxon.sf.net/feature/initialMode" value="build_tr_map.xml"/>
  253. </factory>
  254. <param name="match_element" expression=""/>
  255. <param name="antfile_prefix" expression="build_element_complexType.xml"/>
  256. <param name="temp" expression="/tmp"/>
  257. <param name="basedir" expression="${basedir}"/>
  258. <param name="antfile" expression=""/>
  259. <!--<param name="target" expression="xml_recursed_from_tr_map_with_RelatedFeatureLoop"/>-->
  260. <param name="match_child_element" expression=""/>
  261. <param name="match_child_element_property_name" expression=""/>
  262. <param name="properties.xml" expression="${build_properties.xml}"/>
  263. <!--<param name="properties_override.xml" expression="${properties_override.xml}"/>-->
  264. <param name="parallel" expression="1"/>
  265. <param name="threadCount" expression="5"/>
  266. <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/><classpath location="/opt/local/share/java/saxon9he.jar"/>
  267. </xslt>
  268. <delete dir="${p5_tr_map.local}"/>
  269. <ant antfile="${build_tr_map.xml}"/></target>
  270. <!-- depends="build_tr_map" -->
  271. <target name="build_detect_resource_type" depends="build_tr_map.xml" description="we generate detect_resource_type for use it for generate detect_objects_parent_relations">
  272. <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
  273. <delete file="${detect_resource_type.xml}"/>
  274. <xslt basedir="./" style="${detect_resource_type.xsl}" in="${empty.xml}" destdir="./" out="${detect_resource_type.xml}" >
  275. <factory name="net.sf.saxon.TransformerFactoryImpl">
  276. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  277. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}detect_resource_type"/>
  278. </factory>
  279. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  280. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
  281. <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
  282. <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
  283. <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
  284. <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/> <!-- todo for better handle DefaultObjects etc -->
  285. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  286. </xslt>
  287. <!-- file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/transformed/resources_tree_required_occurs_raport/detect_resource_type-\-http__x3A____x2F____x2F__biuro.biall__x2D__net.pl__x2F__xmlschema_procesy5__x2F__default_db.xml-->
  288. </target>
  289. <!-- depends="build_detect_resource_type" -->
  290. <target name="build_detect_objects_parent_relations" depends="build_detect_resource_type" description="we generate detect resources parent relations ">
  291. <delete dir="${detect_resource_type.local}"/>
  292. <delete file="${detect_objects_parent_relations.xml}"/>
  293. <xslt basedir="./" style="${detect_objects_parent_relations.xsl}" in="${detect_resource_type.xml}" destdir="./" out="${detect_objects_parent_relations.xml}" >
  294. <factory name="net.sf.saxon.TransformerFactoryImpl">
  295. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  296. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}detect_resource_type"/>-->
  297. </factory>
  298. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  299. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
  300. <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
  301. <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
  302. <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
  303. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  304. </xslt>
  305. <!--file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/transformed/resources_tree_required_occurs_raport/detect_objects_parent_relations-\-http__x3A____x2F____x2F__biuro.biall__x2D__net.pl__x2F__xmlschema_procesy5__x2F__default_db.xml-->
  306. </target>
  307. <!-- depends="build_detect_objects_parent_relations" -->
  308. <target name="build_simpleSchema_for_recurse_ant" depends="build_detect_objects_parent_relations" description="we generate by using main_build_recurse_ant.dita_with_id.xsl simple transport map for use in interfaces and ant xml output">
  309. <delete dir="${simpleSchema.local}"/>
  310. <xslt basedir="./" style="${main_build_recurse_ant.dita_with_id.xsl}" in="${detect_objects_parent_relations.xml}" destdir="./" out="${main_build_recurse_ant.dita_with_id_raport.xml}" >
  311. <factory name="net.sf.saxon.TransformerFactoryImpl">
  312. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  313. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}build_simpleSchema_for_recurse_ant"/>
  314. </factory>
  315. <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
  316. <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
  317. <!--<param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
  318. <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
  319. <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-->
  320. <param name="namespace_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
  321. <param name="detect_resource_type_dir" expression="${detect_resource_type.local}"/>
  322. <param name="build_complexType_dir" expression="${build_complexType.local}"/>
  323. <param name="simpleSchema_dir" expression="${simpleSchema.local}"/>
  324. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  325. </xslt>
  326. </target>
  327. <!--<target name="generate_ant_data_business_modules" description="generate modules specified in "/>
  328. <target name="read_db_structure" description="we read db structure to than analyze it against missing or not correct fields/tables/indexes "/>
  329. <target name="modify_uncorrect_structure" description="we add missing structure fields/tables/indexes "/>
  330. <target name="add_missing_structure" description="we add missing structure fields/tables/indexes "/>
  331. <target name="read_installed_business_objects" description="we read current installed business_objects to verify to update them (version)"/>
  332. <target name="update_installed_business_objects" description="we update current installed business_objects (version) and applying transaction apply template if some data need to be updated"/>
  333. <target name="install_business_objects" description="we install business_objects (version) and applying transaction apply template if some data need to be updated - rebuild references or instances "/>
  334. -->
  335. <target name="detect_objects_parent_relations_clean" description="piewsze czyszczenie - pewnie nie ma @id">
  336. <!--<exec command="make">
  337. <arg line="clean"/>
  338. </exec>-->
  339. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  340. <delete dir="${detect_resource_type.local}"/>
  341. <delete dir="${transformed.local}"/>
  342. <delete dir="${build_complexType.local}"/>
  343. <delete dir="${p5_tr_map.local}"/>
  344. <delete dir="${simpleSchema.local}"/>
  345. </target>
  346. <!--<target name="detect_objects_parent_relations" depends="detect_objects_parent_relations_clean" description="pierwsze szukanie relacji - moga nie miec @id">
  347. <!-\-<exec command="make" failifexecutionfails="no">
  348. <arg line="detect_objects_parent_relations"/>
  349. </exec>-\->
  350. <antcall target="build_complexType"/>
  351. <antcall target="build_tr_map"/>
  352. <antcall target="build_detect_resource_type"/>
  353. </target>-->
  354. <target depends="generate_schema_with_id" name="new-schema-with-ID-to-move-and-rename-to-xsd_test">
  355. <condition taskname="new-schema-with-ID-to-move-and-rename-to-xsd" property="new-schema-with-ID-to-move-and-rename-to-xsd_exists">
  356. <available file="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  357. </condition>
  358. </target>
  359. <target name="new-schema-with-ID-to-move-and-rename-to-xsd" depends="new-schema-with-ID-to-move-and-rename-to-xsd_test" if="${new-schema-with-ID-to-move-and-rename-to-xsd_exists}">
  360. <copy todir="${public_html}">
  361. <fileset dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  362. </copy>
  363. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  364. <antcall target="procesy5_system_schema.xml"/> <!-- saved files are not in current schema - need to regenerate -->
  365. <antcall target="vrtfNamespaces.xml"/></target>
  366. <!--<target name="detect_objects_parent_relations_clean_complete" if="${new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists}" description="drugi raz czyscimy na czysto - z @id">
  367. <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  368. <delete dir="${detect_resource_type.local}"/>
  369. <delete dir="${transformed.local}"/>
  370. <delete dir="${build_complexType.local}"/>
  371. <delete dir="${p5_tr_map.local}"/>
  372. <delete dir="${simpleSchema.local}"/>
  373. <!-\-<exec command="make">
  374. <arg line="clean"/>
  375. </exec>-\->
  376. </target>-->
  377. <!--<target name="new-schema-with-ID-to-move-and-rename-to-xsd_test_complete">
  378. <condition taskname="detect_objects_parent_relations_complete" property="new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists">
  379. <available file="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
  380. </condition>
  381. </target>-->
  382. <!--<target name="detect_objects_parent_relations_complete" if="${new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists}" depends="new-schema-with-ID-to-move-and-rename-to-xsd_test_complete,detect_objects_parent_relations_clean_complete" description=" tutaj juz sa skopiowane z @id">
  383. <!-\-<exec command="make">
  384. <arg line="detect_objects_parent_relations"/>
  385. </exec>-\->
  386. <!-\-<antcall target="build_complexType"/>
  387. <antcall target="build_tr_map"/>
  388. <antcall target="build_detect_resource_type"/>-\->
  389. <!-\-<antcall target="build_simpleSchema_for_recurse_ant"/> <!-\\- to wystarczy - wyzwala sie kolejno po dependency -\\->-\->
  390. </target>-->
  391. <target name="sync_p5_tr_map_with_se" depends=" save_build_properties,read_build_properties,new-schema-with-ID-to-move-and-rename-to-xsd,build_simpleSchema_for_recurse_ant,p5_make_symlink_to_work_in_default_db.in7_dziennik_koresp" description="syncrhonizacja wygenerowanych map z default_db.instance/p5_tr_map do SE/schema/public_instance/p5_tr_map">
  392. <delete dir="${p5_tr_map.remote}" failonerror="no"/>
  393. <!--<copydir src="${p5_tr_map.local}" dest="${p5_tr_map.remote}" />-->
  394. <mkdir dir="${p5_tr_map.remote}"/>
  395. <copy todir="${p5_tr_map.remote}">
  396. <fileset dir="${p5_tr_map.local}"/>
  397. </copy>
  398. <delete dir="${detect_resource_type.remote}" failonerror="no"/>
  399. <copy todir="${detect_resource_type.remote}">
  400. <fileset dir="${detect_resource_type.local}"/>
  401. </copy>
  402. <delete dir="${table.remote}" failonerror="no"/>
  403. <copy todir="${table.remote}">
  404. <fileset dir="${table.local}"/>
  405. </copy>
  406. <delete dir="${build_complexType.remote}" failonerror="no"/>
  407. <copy todir="${build_complexType.remote}">
  408. <fileset dir="${build_complexType.local}"/>
  409. </copy>
  410. <delete dir="${simpleSchema.remote}" failonerror="no"/>
  411. <copy todir="${simpleSchema.remote}">
  412. <fileset dir="${simpleSchema.local}"/>
  413. </copy>
  414. </target>
  415. <target name="p5_make_symlink_to_work_in_default_db.in7_dziennik_koresp" description="temporary to allow work with paths cheating and create on SE/schema/default_db.in7_dziennik_koresp symlink to ../WPS_Functions/get_wfs/ etc...">
  416. <echo> ln -s ${remote.default_db.in7_dziennik_koresp}/CRM_PROCES_tree/CRM_PROCES_tree ../../WPS_Functions/default_db/CRM_PROCES_tree</echo>
  417. <!--<exec executable="ln" dir="${default_db.instance.xml.symlink}/CRM_PROCES_tree" >
  418. <arg line="-s ../WPS_Functions/default_db/CRM_PROCES_tree"/>
  419. </exec>-->
  420. <symlink link="${remote.default_db.in7_dziennik_koresp}/CRM_PROCES_tree" resource="../../WPS_Functions/default_db/CRM_PROCES_tree" overwrite="true"/>
  421. </target>
  422. <target name="p5_make_symlink_to_work_in_default_db.bi_audit_energa_rum_kontrahenci_powiazania" description="temporary to allow work with paths cheating and create on SE/schema/default_db.bi_audit_energa_rum_kontrahenci_powiazania symlink to ../WPS_Functions/get_wfs/ etc...">
  423. <echo> ln -s ${remote.default_db.bi_audit_energa_rum_kontrahenci_powiazania}/CRM_PROCES_tree/CRM_PROCES_tree ../../WPS_Functions/default_db/CRM_PROCES_tree</echo>
  424. <mkdir dir="${remote.default_db.bi_audit_energa_rum_kontrahenci_powiazania}"/>
  425. <symlink link="${remote.default_db.in7_dziennik_koresp}/CRM_PROCES_tree" resource="../../WPS_Functions/default_db/CRM_PROCES_tree" overwrite="true"/>
  426. </target></project>