build__biale_plamy.xml 19 KB

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