build__biale_plamy.xml 14 KB

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