build__biale_plamy.xml 17 KB

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