Pārlūkot izejas kodu

upd do schema bzyka teryt aktualnego. przydaly by sie ID_teryt_powiaty itp w SIMC i TERC, oraz TERYT_ULIC nie wiem czy tez nie w TERYT_adresy

a.binder 8 gadi atpakaļ
vecāks
revīzija
067ee2511c

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 303 - 497
SE/schema/ant-object/default_db.DEVICES/DEVICES/DEVICES.xsd


+ 34 - 7
SE/schema/ant-object/default_db.TERYT_gminy/TERYT_gminy/TERYT_gminy.xsd

@@ -15,11 +15,15 @@
    <xs:annotation>
       <xs:documentation>CREATE ALGORITHM=UNDEFINED DEFINER=`bzyk`@`94.158.130.34` SQL SECURITY DEFINER VIEW `TERYT_gminy`
 AS SELECT
+   ((((`TERYT_TERC`.`WOJ` * 16777216) + (`TERYT_TERC`.`POW` * 65536)) + (`TERYT_TERC`.`GMI` * 256)) + `TERYT_TERC`.`RODZ`) AS `ID`,
+   `TERYT_TERC`.`WOJ` AS `ID_TERYT_wojewodztwa`,((`TERYT_TERC`.`WOJ` * 256) + `TERYT_TERC`.`POW`) AS `ID_TERYT_powiaty`,
    `TERYT_TERC`.`WOJ` AS `WOJ`,
    `TERYT_TERC`.`POW` AS `POW`,
    `TERYT_TERC`.`GMI` AS `GMI`,
-   `TERYT_TERC`.`NAZWA` AS `NAZWA`
-FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` > 0);</xs:documentation>
+   `TERYT_TERC`.`RODZ` AS `RODZ`,
+   `TERYT_TERC`.`NAZWA` AS `NAZWA`,
+   `TERYT_TERC`.`NAZWA_DOD` AS `NAZWA_DOD`
+FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` is not null);</xs:documentation>
    </xs:annotation>
    <xs:import schemaLocation="../../default_db.TERYT_adresy/TERYT_adresy/TERYT_adresy.xsd"
       namespace="https://biuro.biall-net.pl/wfs/default_db/table/TERYT_adresy.xsd"/>
@@ -35,7 +39,28 @@ FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` > 0);</xs:documentation>
       schemaLocation="../../default_db.TERYT_adresy/TERYT_adresy/TERYT_adresy.xsd"/>
    <xs:complexType name="TERYT_gminy">
       <xs:sequence>
-         <xs:element name="WOJ" type="xs:int"/>
+         <xs:element name="ID" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>((((`TERYT_TERC`.`WOJ` * 16777216) + (`TERYT_TERC`.`POW` * 65536)) + (`TERYT_TERC`.`GMI` * 256)) + `TERYT_TERC`.`RODZ`) AS `ID`</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="ID_TERYT_wojewodztwa" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>To samo co WOJ
+`TERYT_TERC`.`WOJ` AS `ID_TERYT_wojewodztwa`</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="ID_TERYT_powiaty" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>((`TERYT_TERC`.`WOJ` * 256) + `TERYT_TERC`.`POW`) AS `ID_TERYT_powiaty`</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="WOJ" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>`TERYT_TERC`.`WOJ` AS `WOJ`
+to samo co ID_TERYT_wojewodztwa</xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__TERYT_wojewodztwa:TERYT_wojewodztwa">
             <xs:annotation>
                <xs:appinfo>
@@ -58,8 +83,10 @@ FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` > 0);</xs:documentation>
             <xs:annotation>
                <xs:appinfo>
                      <system_cache__appinfo:flat_relation_cache>
-                        <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
-                           <fes:Filter>
+                        <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                           system_cache__appinfo:name="ID_TERYT_powiaty" 
+                           system_cache__appinfo:xpath="default_db__x3A__TERYT_powiaty:TERYT_powiaty/ID_TERYT_powiaty">
+                           <!--<fes:Filter>
                               <fes:And>
                                  <fes:PropertyIsEqualTo>
                                     <fes:ValueReference>WOJ</fes:ValueReference>
@@ -70,7 +97,7 @@ FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` > 0);</xs:documentation>
                                     <fes:ValueReference>default_db__x3A__TERYT_powiaty:TERYT_powiaty/POW</fes:ValueReference>
                                  </fes:PropertyIsEqualTo>
                               </fes:And>
-                           </fes:Filter>
+                           </fes:Filter>-->
                         </system_cache__appinfo:source>
                      </system_cache__appinfo:flat_relation_cache>
                   </xs:appinfo>
@@ -127,7 +154,7 @@ FROM `TERYT_TERC` where (`TERYT_TERC`.`GMI` > 0);</xs:documentation>
          <xs:element maxOccurs="unbounded" minOccurs="0"
             ref="default_db__x3A__TERYT_adresy:TERYT_adresy">
             <xs:annotation>
-                  <xs:appinfo>
+               <xs:appinfo>
                      <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
                            <fes:Filter>

+ 24 - 20
SE/schema/ant-object/default_db.TERYT_powiaty/TERYT_powiaty/TERYT_powiaty.xsd

@@ -32,18 +32,34 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` > 0) and ((`TERYT_TERC`.`GMI` = 0)
       schemaLocation="../../default_db.TERYT_ULIC/TERYT_ULIC/TERYT_ULIC.xsd"/>
    <xs:complexType name="TERYT_powiaty">
       <xs:sequence>
-         <xs:element name="WOJ" type="xs:int"/>
+         <xs:element name="ID" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>((`TERYT_TERC`.`WOJ` * 256) + `TERYT_TERC`.`POW`) AS `ID`</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="ID_TERYT_wojewodztwa" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>To samo co WOJ
+`TERYT_TERC`.`WOJ` AS `ID_TERYT_wojewodztwa`</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="WOJ" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>to samo co ID_TERYT_wojewodztwa= select `TERYT_TERC`.`WOJ` AS `WOJ`,
+</xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__TERYT_wojewodztwa:TERYT_wojewodztwa">
             <xs:annotation>
                <xs:appinfo>
-                  <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
-                        <fes:Filter>
+                  <system_cache__appinfo:flat_relation_cache system_cache__appinfo:backref_evaluate="true">
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="ID_TERYT_wojewodztwa" system_cache__appinfo:xpath="default_db__x3A__TERYT_wojewodztwa:TERYT_wojewodztwa/ID">
+                        <!--<fes:Filter><!-\- equal ? -\->
                               <fes:PropertyIsEqualTo>
                                  <fes:ValueReference>WOJ</fes:ValueReference>
                                  <fes:ValueReference>default_db__x3A__TERYT_wojewodztwa:TERYT_wojewodztwa/WOJ</fes:ValueReference>
                               </fes:PropertyIsEqualTo>
-                        </fes:Filter>
+                        </fes:Filter>-->
                      </system_cache__appinfo:source>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
@@ -56,21 +72,9 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` > 0) and ((`TERYT_TERC`.`GMI` = 0)
             minOccurs="0">
             <xs:annotation>
                <xs:appinfo>
-                  <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
-                        <fes:Filter>
-                           <fes:And>
-                              <fes:PropertyIsEqualTo>
-                                 <fes:ValueReference>WOJ</fes:ValueReference>
-                                 <fes:ValueReference>default_db__x3A__TERYT_gminy:TERYT_gminys/WOJ</fes:ValueReference>
-                              </fes:PropertyIsEqualTo>
-                              <fes:PropertyIsEqualTo>
-                                 <fes:ValueReference>POW</fes:ValueReference>
-                                 <fes:ValueReference>default_db__x3A__TERYT_gminy:TERYT_gminys/POW</fes:ValueReference>
-                              </fes:PropertyIsEqualTo>
-                           </fes:And>
-                        </fes:Filter>
-                     </system_cache__appinfo:source>
+                  <system_cache__appinfo:flat_relation_cache system_cache__appinfo:ref_engine="view">
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="ID" 
+                        system_cache__appinfo:xpath="default_db__x3A__TERYT_gminy:TERYT_gminy/ID_TERYT_powiaty"/>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                <xs:documentation>Moze byc dostepnych wiecej gmin z jednego powiatuy</xs:documentation>

+ 29 - 14
SE/schema/ant-object/default_db.TERYT_wojewodztwa/TERYT_wojewodztwa/TERYT_wojewodztwa.xsd

@@ -31,20 +31,33 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` = 0) or isnull(`TERYT_TERC`.`POW`))
       schemaLocation="../../default_db.TERYT_ULIC/TERYT_ULIC/TERYT_ULIC.xsd"/>
    <xs:complexType name="TERYT_wojewodztwa">
       <xs:sequence>
-         <xs:element name="WOJ" type="xs:int"/>
+         <xs:element name="ID" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>to samo `TERYT_TERC`.`WOJ` AS `ID`,
+   `TERYT_TERC`.`WOJ` AS `WOJ`,</xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="WOJ" type="xs:int">
+            <xs:annotation>
+               <xs:documentation>to samo `TERYT_TERC`.`WOJ` AS `ID`,
+   `TERYT_TERC`.`WOJ` AS `WOJ`,</xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="NAZWA" type="xs:string"/>
          <xs:element maxOccurs="unbounded" ref="default_db__x3A__TERYT_powiaty:TERYT_powiaty"
             minOccurs="0">
             <xs:annotation>
                <xs:appinfo>
                   <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
-                        <fes:Filter>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                        system_cache__appinfo:name="ID" 
+                        system_cache__appinfo:xpath="default_db__x3A__TERYT_powiaty:TERYT_powiaty/ID_TERYT_wojewodztwa">
+                        <!--<fes:Filter>
                            <fes:PropertyIsEqualTo>
                               <fes:ValueReference>WOJ</fes:ValueReference>
                               <fes:ValueReference>default_db__x3A__TERYT_powiaty:TERYT_powiaty/WOJ</fes:ValueReference>
                            </fes:PropertyIsEqualTo>
-                        </fes:Filter>
+                        </fes:Filter>-->
                      </system_cache__appinfo:source>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
@@ -55,9 +68,11 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` = 0) or isnull(`TERYT_TERC`.`POW`))
             ref="default_db__x3A__TERYT_gminy:TERYT_gminy">
             <xs:annotation>
                <xs:appinfo>
-                  <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view">
-                        <fes:Filter>
+                  <system_cache__appinfo:flat_relation_cache system_cache__appinfo:backref_evaluate="true">
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                        system_cache__appinfo:name="ID" 
+                        system_cache__appinfo:xpath="default_db__x3A__TERYT_gminy:TERYT_gminy/ID_TERYT_wojewodztwa">
+                        <!--<fes:Filter>
                            <fes:And>
                               <fes:PropertyIsEqualTo>
                                  <fes:ValueReference>WOJ</fes:ValueReference>
@@ -68,11 +83,14 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` = 0) or isnull(`TERYT_TERC`.`POW`))
                                  <fes:ValueReference>default_db__x3A__TERYT_gminy:TERYT_gminy/POW</fes:ValueReference>
                               </fes:PropertyIsEqualTo>
                            </fes:And>
-                        </fes:Filter>
+                        </fes:Filter>-->
                      </system_cache__appinfo:source>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
-               <xs:documentation>Przejście do gminy wymagać będzie skomplikowanego 3 stronnego joina</xs:documentation>
+               <xs:documentation>Przejście do gminy wymagać będzie skomplikowanego 3 stronnego joina. 
+                  Backref evaluate - dla tego, ze ten przeskok jest dodatkowy - powinno isc normalnie przez powiaty najpierw - to jest krot - wiec zaznaczam jako backref evaluate? Czy to dobra zaleznosc? 
+                  Moze lepiej nie dawac takich dodatkowych skrotow do grupowania - lepiej liczyc na tozsamosc w silniku agregujaca docelowo?
+               </xs:documentation>
             </xs:annotation>
          </xs:element>
          <xs:element maxOccurs="unbounded" minOccurs="1"
@@ -80,8 +98,7 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` = 0) or isnull(`TERYT_TERC`.`POW`))
             <xs:annotation>
                <xs:appinfo>
                   <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source 
-                        system_cache__appinfo:name="WOJ" 
+                     <system_cache__appinfo:source system_cache__appinfo:name="ID" 
                         system_cache__appinfo:ref_engine="view" 
                         system_cache__appinfo:xpath="default_db__x3A__TERYT_SIMC:TERYT_SIMC/WOJ"/>
                   </system_cache__appinfo:flat_relation_cache>
@@ -102,9 +119,7 @@ FROM `TERYT_TERC` where ((`TERYT_TERC`.`POW` = 0) or isnull(`TERYT_TERC`.`POW`))
                <xs:appinfo>
                   <system_cache__appinfo:flat_relation_cache>
                      <system_cache__appinfo:flat_relation_cache>
-                        <system_cache__appinfo:source 
-                           system_cache__appinfo:name="WOJ" 
-                           system_cache__appinfo:ref_engine="view" 
+                        <system_cache__appinfo:source system_cache__appinfo:name="ID" system_cache__appinfo:ref_engine="view" 
                            system_cache__appinfo:xpath="default_db__x3A__TERYT_ULIC:TERYT_ULIC/WOJ"/>
                      </system_cache__appinfo:flat_relation_cache>
                      <!--<system_cache__appinfo:source system_cache__appinfo:ref_engine="view">

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels