build__biale_plamy.xml 12 KB

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