build.xml 37 KB

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