build__biale_plamy.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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="points2joins.xml" value="points2joins.xml"/>
  15. <property name="ways2joins.xml" value="ways2joins.xml"/>
  16. <property name="ways_asText.xml" value="ways_asText.xml"/>
  17. <property name="joins2ways_z_ID_Way.xsl" value="joins2ways_z_ID_Way.xsl"/>
  18. <property name="joins2ways_z_ID_Way.xml" value="joins2ways_z_ID_Way.xml"/>
  19. <property name="biale_plamy_joins2ways_do_paths.xsl" value="biale_plamy_joins2ways_do_paths.xsl"/>
  20. <property name="points_asText.xml" value="points_asText.xml"/>
  21. <property name="points2joins.xml" value="points2joins.xml"/>
  22. <property name="edge_joins.xml" value="edge_joins.xml"/>
  23. <property name="edge_joins_filled_paths.xml" value="edge_joins_filled_paths.xml"/>
  24. <property name="edge_joins_filled_paths.xsl" value="edge_joins_filled_paths.xsl"/>
  25. <property name="edge_paths_with_PE.xml" value="edge_paths_with_PE.xml"/><!-- biale_plamy_from_paths_php_to_place_PE-->
  26. <property name="biale_put_PE_to_mysql.php" value="biale_put_PE_to_mysql.php"/>
  27. <property name="cables_from_joins_to_PE.xsl" value="cables_from_joins_to_PE.xsl"/>
  28. <property name="cables_from_joins_to_PE.xml" value="cables_from_joins_to_PE.xml"/><!-- xml do wygenerowania -->
  29. <property name="biale_put_Cables_to_PE.php" value="biale_put_Cables_to_PE.php"/>
  30. <target name="check" >
  31. <echo message="testuje check"/>
  32. <condition property="test_if_INPUTxml" taskname="PROCES_TO_DITA_build" value="AVIABLE">
  33. <available file="${INPUT}" filepath="." />
  34. </condition>
  35. </target>
  36. <target name="biale_plamy-generate_data" >
  37. <antcall target="biale_plamy-generate_data_sql"/>
  38. <echo message="odpalam biale_plamy-generate_data"/>
  39. <delete file="${joins2ways_z_ID_Way.xml}"/>
  40. <antcall target="biale_plamy_points2ID_Way_do_Joins"/>
  41. <delete file="${edge_joins.xml}"/>
  42. <antcall target="biale_plamy_joins2ways_do_paths"/>
  43. <!-- tymczasowy rem bo dziala -->
  44. <antcall target="biale_plamy_paths_to_findways_php"/>
  45. <antcall target="PE_and_Cables"/>
  46. </target>
  47. <target name="clean">
  48. <delete file="${points2joins.xml}"/>
  49. <delete file="${ways2joins.xml}"/>
  50. <delete file="${ways_asText.xml}"/>
  51. <delete file="${joins_asText.xml}"/>
  52. <delete file="${joins2ways_z_ID_Way.xml}"/>
  53. <delete file="${edge_joins.xml}"/>
  54. <delete file="${joins2ways.xml}"/>
  55. <delete file="${points2ID_Way.xml}"/>
  56. <delete file="${ways_2ID_Way.xml}"/>
  57. <delete file="${joins2ways_z_ID_Way.xml}"/>
  58. <delete file="${points_asText.xml}"/>
  59. <delete file="${points2joins.xml}"/>
  60. <delete file="${edge_joins.xml}"/>
  61. <delete file="${edge_joins_filled_paths.xml}"/>
  62. <delete file="${edge_paths_with_PE.xml}"/>
  63. <delete file="${cables_from_joins_to_PE.xml}"/>
  64. </target>
  65. <target name="check_files_for_PE_and_Cables" >
  66. <echo message="czy sa wymagane pliki do wygenerowania samych PE_and_Cables"/>
  67. <condition property="files_PE_and_Cables" taskname="PE_and_Cables" value="AVIABLE">
  68. <available file="${points2joins.xml}" filepath="." />
  69. <available file="${ways2joins.xml}" filepath="." />
  70. <available file="${edge_joins_filled_paths.xml}" filepath="." />
  71. <available file="${points_asText.xml}" filepath="." />
  72. <available file="${joins2ways_z_ID_Way.xml}" filepath="." />
  73. </condition>
  74. </target>
  75. <target name="PE_and_Cables">
  76. <antcall target="biale_plamy_from_paths_php_to_place_PE"/>
  77. <!-- tymczasowy rem bo skryptu nie ma -->
  78. <antcall target="biale_plamy_put_PE_to_mysql_php"/>
  79. <antcall target="biale_plamy_analyze_shortest_and_trace_cables"/>
  80. <!--Tymczasowa zatrzymanie bo nie chodzi na zdalnym - plik juz jest-->
  81. <antcall target="biale_put_Cables_to_PE"/>
  82. </target>
  83. <target name="biale_plamy_prepare_mysql_data">
  84. <echo message="biale_plamy_prepare_mysql_data "/>
  85. <exec executable="php" failonerror="true" dir=".">
  86. <arg file="${biale_plamy-prepare_sql_data.php}"/>
  87. </exec>
  88. </target>
  89. <target name="biale_plamy-generate_data_sql">
  90. <!--<antcall target="install_in_file_db_query">
  91. <param name="sql_query" value="select 1+1;"/>
  92. </antcall>-->
  93. <exec executable="php" failonerror="true" dir=".">
  94. <arg file="${biale_plamy-generate_data.php}"/>
  95. </exec>
  96. <echo message="Teraz Przelec arraya joins2ways pod katem 1-elementowych subarrayow"/>
  97. </target>
  98. <target name="biale_plamy_points2ID_Way_do_Joins">
  99. <echo message="przygotownie z joins2ways xsl biale_plamy_joins2ways_do_paths.xsl pod katem 1 katem 1-elementowych subarrayow aby zrobic paths "/>
  100. <delete file="${joins2ways_z_ID_Way.xml}"/>
  101. <xslt basedir="./" style="${joins2ways_z_ID_Way.xsl}" in="${joins2ways.xml}" destdir="./" out="${joins2ways_z_ID_Way.xml}" >
  102. <factory name="net.sf.saxon.TransformerFactoryImpl">
  103. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  104. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  105. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  106. </factory>
  107. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  108. <param name="points2ID_Way.xml" expression="${ways_2ID_Way.xml}"/>
  109. </xslt>
  110. </target>
  111. <target name="biale_plamy_joins2ways_do_paths">
  112. <echo message="przygotownie z joins2ways xsl biale_plamy_joins2ways_do_paths.xsl pod katem 1 katem 1-elementowych subarrayow aby zrobic paths "/>
  113. <delete file="${edge_joins.xml}"/>
  114. <xslt basedir="./" style="${biale_plamy_joins2ways_do_paths.xsl}" in="${joins2ways_z_ID_Way.xml}" destdir="./" out="${edge_joins.xml}" >
  115. <factory name="net.sf.saxon.TransformerFactoryImpl">
  116. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  117. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  118. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  119. </factory>
  120. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  121. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  122. </xslt>
  123. </target>
  124. <!-- wyznaczenie sciezek do ulozenia PE - dziala-->
  125. <target name="biale_plamy_paths_to_findways_php">
  126. <exec executable="php" failonerror="true" dir=".">
  127. <arg file="${biale_plamy-find_ways.php}"/>
  128. </exec>
  129. <!-- to wyrzuca edge_joins_filled_paths.xml-->
  130. </target>
  131. <!-- postawienie PE po trasach -->
  132. <target name="biale_plamy_from_paths_php_to_place_PE">
  133. <echo message="Wyznaczenie PE na podstawie tras "/>
  134. <delete file="${edge_paths_with_PE.xml}"/>
  135. <xslt basedir="./" style="${edge_joins_filled_paths.xsl}" in="${edge_joins_filled_paths.xml}" destdir="./" out="${edge_paths_with_PE.xml}" >
  136. <factory name="net.sf.saxon.TransformerFactoryImpl">
  137. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  138. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  139. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  140. </factory>
  141. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  142. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  143. </xslt>
  144. </target>
  145. <target name="biale_plamy_put_PE_to_mysql_php">
  146. <exec executable="php" failonerror="true" dir=".">
  147. <arg file="${biale_put_PE_to_mysql.php}"/>
  148. </exec>
  149. </target>
  150. <!-- przeliczenie dla kazdego PE z trasy punktu przeciecia i wybranie najkrotszej i wygenerowania kabla -->
  151. <target name="biale_plamy_analyze_shortest_and_trace_cables">
  152. <delete file="${cables_from_joins_to_PE.xml}"/>
  153. <xslt basedir="./" style="${cables_from_joins_to_PE.xsl}" in="${joins2ways_z_ID_Way.xml}" destdir="./" out="${cables_from_joins_to_PE.xml}" >
  154. <factory name="net.sf.saxon.TransformerFactoryImpl">
  155. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  156. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>-->
  157. <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
  158. </factory>
  159. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  160. <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
  161. </xslt>
  162. </target>
  163. <target name="biale_put_Cables_to_PE">
  164. <exec executable="php" failonerror="true" dir=".">
  165. <arg file="${biale_put_Cables_to_PE.php}"/>
  166. </exec>
  167. </target>
  168. <!--<target name="1_install_mysql_functions">
  169. <property name="php_script_header"><?php
  170. $_SERVER['SERVER_NAME'] = 'biuro.biall-net.pl';
  171. //when used in /Library/Server/Web/Data/Sites/bzyk-biale-plamy-php-temp/SE/dev on biuro.biall-net.pl
  172. if( file_exists ( "../../se-lib/bootstrap.php"))
  173. require("../../se-lib/bootstrap.php");
  174. //when used in in native SE
  175. else require("../../../../SE-production-git/SE/se-lib/bootstrap.php");
  176. Lib::loadClass("Vendor_Geophp");
  177. ?></property>
  178. </target-->
  179. <!--<target name="install_in_file_db_query">
  180. <!-\-<property name="sql_query"/>-\->
  181. <property name="db_query_php_code_left" >
  182. <?php
  183. $db = DB::getDB();
  184. $db->query("
  185. ?>
  186. <![CDATA[asdasd asd ]]>
  187. </property>
  188. <script language="php"></script>
  189. <property name="db_query_php_code_right">
  190. <?php
  191. ");
  192. ?>
  193. </property>
  194. <echo output="db_query_php.php" message="${db_query_php_code_left}"/> <!-\-${sql_query}${db_query_php_code_right} -\->
  195. </target>-->
  196. <!--<target name="install_file_and_exec"/>-->
  197. <target name="check-info" if="test_if_INPUTxml">
  198. <echo message="Using default XML object on input from file ${INPUT} . "/>
  199. </target>
  200. </project>