a.binder 9 jaren geleden
bovenliggende
commit
32ae1fb021

+ 31 - 6
SE/schema/ant-tool/SyncResourcesYed/build.xml

@@ -1,15 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project basedir="." name="SyncResourcesYed"  default="http_fist_input" >
    
-    <property name="uuid" value=""/><!-- to be set by executing php by unique uuid identifier  -->
-    <!-- to be set by executing php by unique uuid identifier  -->
-    <property name="hashpassword" value=""/><!-- to be set by executing php by unique uuid identifier  -->
+    <!-- default procesy5 template  -->
+    <property name="uuid" value="${uuid}"/>
+    <property name="passwordBase64Basic" value="${passwordBase64Basic}"/>
+    <property name="url" value="${url}"/>
+    <!-- eof default procesy5 template  -->
     
+    <!-- custom properties of script  -->
     <property  name="http_fist_input" value="http_fist_input"/>
     <property  name="http_fist_input.html" value="${http_fist_input}.html"/>
     <property  name="http_fist_input.xsl" value="${http_fist_input}.xsl"/>
+    <!-- eof properties of script  -->
     
-    <target name="http_fist_input">
+    
+    <!-- first menu to be showed in GUI @description-->
+    <target name="http_fist_input" description="Export/Import Resources to Yed .grapml">
         <echo message="${uuid}"/>
         <loadfile property="output.html" srcfile="${http_fist_input.html}"/>
         <echo message="${output.html}"/>
@@ -22,10 +28,29 @@
        
        
    </target>
-   
+    
+    
+    <target name="http_fist_input">
+        <exec executable="curl" outputproperty="wfs_output" errorproperty="wfs_error" resultproperty="wfs_result">
+            <arg line="-H 'Authorization: Basic ${passwordBase64Basic}' ${url}"/>
+        </exec>
+        <echo message="curl -H 'Authorization: Basic ${passwordBase64Basic}' '${url}'"/>
+        <echo message="OUTPUT__START"/>
+        <echo message="${wfs_output}"/>
+        <echo message="OUTPUT__END"/>
+        
+        <echo message="RESULT__START"/>
+        <echo message="${wfs_result}"/>
+        <echo message="RESULT__END"/>
+        
+        <echo message="ERROR__START"/>
+        <echo message="${wfs_error}"/>
+        <echo message="ERROR__END"/>
+    </target>
+   <!--
     <target name="http_first_output">
         <echo message="${uuid}"/>
         <echo>http_first_output</echo>
-    </target>
+    </target>-->
    
 </project>

+ 43 - 28
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -5,6 +5,18 @@
     na output mamy pdf'a
 -->
 
+
+    
+    
+    <!--https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&
+        path=${default_db.in7_dziennik_koresp/test-get-wfs-xml} -  this is the place to keep ant build (directory name with build.xml)  
+        &namespace=p5_default_db:Rozdzielcza_test_bzyk_PE&featureID=123 - this is setting the <property name="url" value="${url}"/> - to point what is record/table to download
+        <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
+        <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
+        />
+    -->
+
+
     <property name="INPUT" value="Test_z_getfeature_do_parse.xml"/>
     <tempfile property="tmp.xml" destdir="temp" deleteonexit="yes"/>
     <tempfile property="Test_z_getfeature_do_parse__noxml.xml" destdir="temp" deleteonexit="yes"/>
@@ -23,29 +35,36 @@
     </if>-->
 
 
-
-    <target name="check" >
-        <echo message="testuje check"/>
-        <condition property="test_if_INPUTxml" taskname="buildpdf" value="AVIABLE">
-            <available file="Test_z_getfeature_do_parse.xml" filepath="." />
-        </condition>
+    <target name="get_related_feature">
+        
+        <exec executable="curl" outputproperty="wfs_output" errorproperty="wfs_error" resultproperty="wfs_result">
+            <arg line="-H 'Authorization: Basic ${passwordBase64Basic}' ${url}"/>
+        </exec>
+        <echo message="curl -H 'Authorization: Basic ${passwordBase64Basic}' '${url}'"/>
+        <echo message="OUTPUT__START"/>
+        <echo message="${wfs_output}"/>
+        <echo message="OUTPUT__END"/>
+        
+        <echo message="RESULT__START"/>
+        <echo message="${wfs_result}"/>
+        <echo message="RESULT__END"/>
+        
+        <echo message="ERROR__START"/>
+        <echo message="${wfs_error}"/>
+        <echo message="ERROR__END"/>
+        
+        
+        
+        
     </target>
 
-    <target name="make_inputXML_from_stdin" unless="test_if_INPUTxml">
-        <echo message="make_inputXML_from_stdin is not aviable appending"/>
-        <input addproperty="INPUT_from_stdin"/>
-        <echo message="${INPUT_from_stdin}" file="${INPUT}"/>
-        <!--<echo file="${test_if_INPUTxml}" message=""/>-->
-    </target>
-    <target name="check-info" if="test_if_INPUTxml">
-        <echo message="Using default XML object on input from file ${INPUT} . "/>
-    </target>
 
-    <target name="buildpdf" depends="check,check-info,make_inputXML_from_stdin">
 
-        <echo message="buildpdf to ${test_if_INPUTxml}"/>
+    <target name="buildpdf" depends="get_related_feature">
+
+        
         <!-- przyklad z uzywaniem saxona ktorego wczesniej trzeba pobrac z port install saxon -->
-        <xslt style="copy-no-xml.xsl" in="${INPUT}" out="${Test_z_getfeature_do_parse__noxml.xml}"> <!-- {Test_z_getfeature_do_parse__noxml.xml"-->
+        <xslt style="copy-no-xml.xsl" in="${wfs_result}" out="${Test_z_getfeature_do_parse__noxml.xml}"> <!-- {Test_z_getfeature_do_parse__noxml.xml"-->
             <factory name="net.sf.saxon.TransformerFactoryImpl">
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -81,16 +100,12 @@
         </exec>
 
         <!--<propertyregex  property="out_file" input="${out_task.dita}" regexp="$.*/(.*)" select="\1."/>-->
-        <loadfile property="result" srcFile="out/${out_task_file}.pdf"/>
+        <!--<loadfile property="result" srcFile="out/${out_task_file}.pdf"/>-->
         <!--<echo message="input was : ${input}"/>-->
-        <echo message="OUTPUT_PDF_FILE: out/${out_task_file}.pdf"/>
-        <!-- <echo message="${result}"/> -->
-        <!--<propertyregex
-            name="test"
-            property="current.target.dir"
-            input="com.element.subelement"
-            regexp="\."
-            replace="/"
-            global="true" />-->
+        <!--<echo message="OUTPUT_PDF_FILE: out/${out_task_file}.pdf"/>-->
+        <echo>
+            <br>Wygenerowano druk pdf - sciagnij go <a href="${out_task_file}"> ${out_task_file}</a></br> 
+        </echo>
+        
     </target>
 </project>

+ 12 - 2
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/build.xml

@@ -1,8 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project basedir="." name="example wfs GetFeature" default="http_fist_input">
 
-    <!--<input addproperty="http_input" />-->
-    <!-- dane z apache requesty -->
+    
+    
+    <!-- sample URL which call this exact variables in this ANT build -->
+    <!-- przykladowy URL ktory przekazuje parametry do tego ANT -->
+    <!--https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&
+        path=${default_db.in7_dziennik_koresp/test-get-wfs-xml} -  this is the place to keep ant build (directory name with build.xml)  
+        &namespace=p5_default_db:Rozdzielcza_test_bzyk_PE&featureID=123 - this is setting the <property name="url" value="${url}"/> - to point what is record/table to download
+        <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
+        <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
+        />
+    -->
+
     <property name="uuid" value="${uuid}"/>
     <property name="passwordBase64Basic" value="${passwordBase64Basic}"/>
     <property name="url" value="${url}"/>