build__biale_plamy.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project
  3. xmlns:bp="https://procesy5.pl/biale_plamy-schema.xsd"
  4. basedir="." name="biale_plamy-generate_data" default="biale_plamy-generate_data">
  5. <!--
  6. -->
  7. <property name="biale_plamy-prepare_sql_data.php" value="biale_plamy-prepare_sql_data.php"/>
  8. <property name="biale_plamy-generate_data.php" value="biale_plamy-generate_data.php"/>
  9. <property name="biale_plamy-find_ways.php" value="biale_plamy-find_ways.php"/>
  10. <property name="joins_asText.xml" value="joins_asText.xml"/>
  11. <property name="joins2ways.xml" value="joins2ways.xml"/>
  12. <property name="points2ID_Way.xml" value="points2ID_Way.xml"/>
  13. <property name="ways_2ID_Way.xml" value="ways_2ID_Way.xml"/>
  14. <property name="joins2ways_z_ID_Way.xsl" value="joins2ways_z_ID_Way.xsl"/>
  15. <property name="joins2ways_z_ID_Way.xml" value="joins2ways_z_ID_Way.xml"/>
  16. <property name="biale_plamy_joins2ways_do_paths.xsl" value="biale_plamy_joins2ways_do_paths.xsl"/>
  17. <property name="points_asText.xml" value="points_asText.xml"/>
  18. <property name="points2joins.xml" value="points2joins.xml"/>
  19. <property name="edge_joins.xml" value="edge_joins.xml"/>
  20. <property name="edge_joins_filled_paths.xml" value="edge_joins_filled_paths.xml"/>
  21. <property name="edge_joins_filled_paths.xsl" value="edge_joins_filled_paths.xsl"/>
  22. <property name="edge_paths_with_PE.xml" value="edge_paths_with_PE.xml"/><!-- biale_plamy_from_paths_php_to_place_PE-->
  23. <property name="biale_put_PE_to_mysql.php" value="biale_put_PE_to_mysql.php"/>
  24. <property name="cables_from_joins_to_PE.xsl" value="cables_from_joins_to_PE.xsl"/>
  25. <property name="cables_from_joins_to_PE.xml" value="cables_from_joins_to_PE.xml"/><!-- xml do wygenerowania -->
  26. <property name="biale_put_Cables_to_PE.php" value="biale_put_Cables_to_PE.php"/>
  27. <target name="check" >
  28. <echo message="testuje check"/>
  29. <condition property="test_if_INPUTxml" taskname="PROCES_TO_DITA_build" value="AVIABLE">
  30. <available file="${INPUT}" filepath="." />
  31. </condition>
  32. </target>
  33. <target name="biale_plamy-generate_data" >
  34. <antcall target="biale_plamy-generate_data_sql"/>
  35. <echo message="odpalam biale_plamy-generate_data"/>
  36. <delete file="${joins2ways_z_ID_Way.xml}"/>
  37. <antcall target="biale_plamy_points2ID_Way_do_Joins"/>
  38. <delete file="${edge_joins.xml}"/>
  39. <antcall target="biale_plamy_joins2ways_do_paths"/>
  40. <!-- tymczasowy rem bo dziala -->
  41. <antcall target="biale_plamy_paths_to_findways_php"/>
  42. <antcall target="biale_plamy_from_paths_php_to_place_PE"/>
  43. <!-- tymczasowy rem bo skryptu nie ma -->
  44. <antcall target="biale_plamy_put_PE_to_mysql_php"/>
  45. <antcall target="biale_plamy_analyze_shortest_and_trace_cables"/>
  46. <!--Tymczasowa zatrzymanie bo nie chodzi na zdalnym - plik juz jest-->
  47. <antcall target="biale_put_Cables_to_PE"/>
  48. </target>
  49. <target name="biale_plamy_prepare_mysql_data">
  50. <echo message="biale_plamy_prepare_mysql_data "/>
  51. <exec executable="php" failonerror="true" dir=".">
  52. <arg file="${biale_plamy-prepare_sql_data.php}"/>
  53. </exec>
  54. </target>
  55. <target name="biale_plamy-generate_data_sql">
  56. <!--<antcall target="install_in_file_db_query">
  57. <param name="sql_query" value="select 1+1;"/>
  58. </antcall>-->
  59. <exec executable="php" failonerror="true" dir=".">
  60. <arg file="${biale_plamy-generate_data.php}"/>
  61. </exec>
  62. <echo message="Teraz Przelec arraya joins2ways pod katem 1-elementowych subarrayow"/>
  63. </target>
  64. <target name="biale_plamy_points2ID_Way_do_Joins">
  65. <echo message="przygotownie z joins2ways xsl biale_plamy_joins2ways_do_paths.xsl pod katem 1 katem 1-elementowych subarrayow aby zrobic paths "/>
  66. <xslt basedir="./" style="${joins2ways_z_ID_Way.xsl}" in="${joins2ways.xml}" destdir="./" out="${joins2ways_z_ID_Way.xml}" >
  67. <factory name="net.sf.saxon.TransformerFactoryImpl">
  68. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  69. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  70. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  71. </factory>
  72. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  73. <param name="points2ID_Way.xml" expression="${ways_2ID_Way.xml}"/>
  74. </xslt>
  75. </target>
  76. <target name="biale_plamy_joins2ways_do_paths">
  77. <echo message="przygotownie z joins2ways xsl biale_plamy_joins2ways_do_paths.xsl pod katem 1 katem 1-elementowych subarrayow aby zrobic paths "/>
  78. <xslt basedir="./" style="${biale_plamy_joins2ways_do_paths.xsl}" in="${joins2ways_z_ID_Way.xml}" destdir="./" out="${edge_joins.xml}" >
  79. <factory name="net.sf.saxon.TransformerFactoryImpl">
  80. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  81. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  82. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  83. </factory>
  84. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  85. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  86. </xslt>
  87. </target>
  88. <!-- wyznaczenie sciezek do ulozenia PE - dziala-->
  89. <target name="biale_plamy_paths_to_findways_php">
  90. <exec executable="php" failonerror="true" dir=".">
  91. <arg file="${biale_plamy-find_ways.php}"/>
  92. </exec>
  93. <!-- to wyrzuca edge_joins_filled_paths.xml-->
  94. </target>
  95. <!-- postawienie PE po trasach -->
  96. <target name="biale_plamy_from_paths_php_to_place_PE">
  97. <echo message="Wyznaczenie PE na podstawie tras "/>
  98. <xslt basedir="./" style="${edge_joins_filled_paths.xsl}" in="${edge_joins_filled_paths.xml}" destdir="./" out="${edge_paths_with_PE.xml}" >
  99. <factory name="net.sf.saxon.TransformerFactoryImpl">
  100. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  101. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  102. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  103. </factory>
  104. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  105. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  106. </xslt>
  107. </target>
  108. <target name="biale_plamy_put_PE_to_mysql_php">
  109. <exec executable="php" failonerror="true" dir=".">
  110. <arg file="${biale_put_PE_to_mysql.php}"/>
  111. </exec>
  112. </target>
  113. <!-- przeliczenie dla kazdego PE z trasy punktu przeciecia i wybranie najkrotszej i wygenerowania kabla -->
  114. <target name="biale_plamy_analyze_shortest_and_trace_cables">
  115. <xslt basedir="./" style="${cables_from_joins_to_PE.xsl}" in="${joins2ways_z_ID_Way.xml}" destdir="./" out="${cables_from_joins_to_PE.xml}" >
  116. <factory name="net.sf.saxon.TransformerFactoryImpl">
  117. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  118. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  119. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  120. </factory>
  121. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  122. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  123. </xslt>
  124. </target>
  125. <target name="biale_put_Cables_to_PE">
  126. <exec executable="php" failonerror="true" dir=".">
  127. <arg file="${biale_put_Cables_to_PE.php}"/>
  128. </exec>
  129. </target>
  130. <!--<target name="1_install_mysql_functions">
  131. <property name="php_script_header"><?php
  132. $_SERVER['SERVER_NAME'] = 'biuro.biall-net.pl';
  133. //when used in /Library/Server/Web/Data/Sites/bzyk-biale-plamy-php-temp/SE/dev on biuro.biall-net.pl
  134. if( file_exists ( "../../se-lib/bootstrap.php"))
  135. require("../../se-lib/bootstrap.php");
  136. //when used in in native SE
  137. else require("../../../../SE-production-git/SE/se-lib/bootstrap.php");
  138. Lib::loadClass("Vendor_Geophp");
  139. ?></property>
  140. </target-->
  141. <!--<target name="install_in_file_db_query">
  142. <!-\-<property name="sql_query"/>-\->
  143. <property name="db_query_php_code_left" >
  144. <?php
  145. $db = DB::getDB();
  146. $db->query("
  147. ?>
  148. <![CDATA[asdasd asd ]]>
  149. </property>
  150. <script language="php"></script>
  151. <property name="db_query_php_code_right">
  152. <?php
  153. ");
  154. ?>
  155. </property>
  156. <echo output="db_query_php.php" message="${db_query_php_code_left}"/> <!-\-${sql_query}${db_query_php_code_right} -\->
  157. </target>-->
  158. <!--<target name="install_file_and_exec"/>-->
  159. <target name="check-info" if="test_if_INPUTxml">
  160. <echo message="Using default XML object on input from file ${INPUT} . "/>
  161. </target>
  162. <target name="PROCES_TO_DITA_build" depends="check-info">
  163. <echo message="PROCES_TO_DITA_build to ${test_if_INPUTxml}"/>
  164. <!-- przyklad z uzywaniem saxona ktorego wczesniej trzeba pobrac z port install saxon -->
  165. <!--<xslt style="copy-no-xml.xsl" in="${INPUT}" out="${Test_z_getfeature_do_parse__noxml.xml}"> <!-\- {Test_z_getfeature_do_parse__noxml.xml"-\->
  166. <factory name="net.sf.saxon.TransformerFactoryImpl">
  167. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  168. </factory>
  169. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  170. </xslt>-->
  171. <!--<xslt style="copy-no-xml.xsl" in="main.dita" out="${main__noxml.dita}"/>-->
  172. <!--<concat destfile="${tmp.xml}" append="true" encoding="UTF-8" >
  173. <string>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  174. &lt;root&gt;</string>
  175. <file file="${Test_z_getfeature_do_parse__noxml.xml}" />
  176. <file file="${main__noxml.dita}"/>
  177. <string>&lt;/root&gt;</string>
  178. </concat>-->
  179. <!-- parsuje main.dita aby wiedziec, jaki proces jest zalaczany do danego zaglebienia aby wygenerowac docelowy plik dita z zaglebieniami -->
  180. <xslt basedir="./" style="${parse_dita_templ.xsl}" in="${INPUT}" destdir="./" out="out.dita" >
  181. <factory name="net.sf.saxon.TransformerFactoryImpl">
  182. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  183. <attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>
  184. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  185. </factory>
  186. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  187. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  188. </xslt>
  189. <!-- tymczasowe rem dla zrobienia akcji wyzej -->
  190. <!--<xslt basedir="./" style="${PROCES_INCLUDE.xsl}" in="${INPUT}" destdir="./" out="out.dita" >
  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/initialMode" value="PROCES_INCLUDE"/>
  194. <!-\-<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-\->
  195. </factory>
  196. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  197. <!-\-<param name="dita_task_template_file_param" expression="main.dita"/>-\->
  198. </xslt>-->
  199. <!--<property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>-->
  200. <!--<exec executable="${dita.dir}" dir=".">
  201. <arg value="-i"/>
  202. <arg value="${out_task.dita}" />
  203. <arg value="-f" />
  204. <arg value="pdf"/>
  205. <arg value="-o"/>
  206. <arg value="out"/>
  207. </exec>-->
  208. <!--<exec executable="bash" dir="." outputproperty="out_task_file">
  209. <arg value="-c"/>
  210. <arg value="echo ${out_task.dita} |sed 's/^.*\///'"/>
  211. </exec>-->
  212. <!--<propertyregex property="out_file" input="${out_task.dita}" regexp="$.*/(.*)" select="\1."/>-->
  213. <!--<loadfile property="result" srcFile="out/${out_task_file}.pdf"/>-->
  214. <!--<echo message="input was : ${input}"/>-->
  215. <!--<echo message="${result}"/>-->
  216. <!--<propertyregex
  217. name="test"
  218. property="current.target.dir"
  219. input="com.element.subelement"
  220. regexp="\."
  221. replace="/"
  222. global="true" />-->
  223. </target>
  224. </project>