build__biale_plamy.xml 17 KB

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