build__biale_plamy.xml 21 KB

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