build_object_modeling.xml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project basedir="../../." name="object_modeling" default="system_cache__appinfo:new_object_by_prototype"
  3. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
  4. <description>
  5. TO model objects capabilities
  6. </description>
  7. <!-- modules WPS_Functions - to be copied to any module needed -->
  8. <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
  9. <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
  10. <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
  11. <!-- eof modules WPS_Functions -->
  12. <property name="object_modeling_basedir" location="${basedir}/WPS_Functions/${ant.project.name}" />
  13. <property name="public_html" location="${basedir}" />
  14. <property name="root_build.xml" location="${public_html}/build.xml"/>
  15. <!--<property name="build_properties.xml" location="${public_html}/build_properties.xml" />-->
  16. <property name="object_modeling.xsl" location="${public_html}/default_db_xml_cache.public/object_modeling.xsl"/>
  17. <property name="build_properties" location="${public_html}/build_properties" />
  18. <!-- <property name="table.local" location="${public_html}/table"/>
  19. <property name="transformed.local" location="${default_db.instance.xml}/transformed"/>
  20. <property name="procesy5_system_schema.xml" value="${transformed.local}/procesy5_system_schema.xml"/>
  21. -->
  22. <target name="read_build_properties">
  23. <!-- <ant antfile="${root_build.xml}" target="save_build_properties"/>
  24. <loadproperties srcfile="${build_properties}"/>-->
  25. <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
  26. <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
  27. <property name="new_object_by_prototype.xml" value="${transformed.local}/system_cache__appinfo/new_object_by_prototype.xml"/>
  28. <echo>We try to refresh ${default_db.xml} or ${detect_objects_parent_relations.xsl} or ${procesy5_system_schema.xml}</echo>
  29. </target>
  30. <target name="system_cache__appinfo:new_object_by_prototype" depends="read_build_properties" description="ANT_TARGET new object by using prototype from Types" >
  31. <input addproperty="prototype_object_namespace" /> <!-- https://biuro.biall-net.pl/wfs/default_db/Types/Infrastructure.xsd -->
  32. <input addproperty="new_object_namespace" /> <!-- https://biuro.biall-net.pl/wfs/default_db/table/Rozdzielcza_struktura_wewnetrzna_wsg84.xsd -->
  33. <ant antfile="${root_build.xml}" target="procesy5_system_schema.xml_if_not_exists" />
  34. <echo> object_modeling_basedir= ${object_modeling_basedir}
  35. procesy5_system_schema.xml= ${procesy5_system_schema.xml}
  36. generating from ${prototype_object_namespace}
  37. generating to ${new_object_namespace}
  38. </echo>
  39. <delete file="${new_object_by_prototype.xml}"/>
  40. <xslt basedir="./" style="${object_modeling.xsl}" in="${procesy5_system_schema.xml}" destdir="./" out="${new_object_by_prototype.xml}" >
  41. <factory name="net.sf.saxon.TransformerFactoryImpl">
  42. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  43. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}new_object_by_prototype"/>
  44. </factory>
  45. <param name="prototype_object_namespace" expression="${prototype_object_namespace}"/>
  46. <param name="new_object_namespace" expression="${new_object_namespace}"/>
  47. <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
  48. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  49. </xslt>
  50. <loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>
  51. <echo message="${new_object_by_prototype.xml_result}"/>
  52. </target>
  53. </project>