Presentation is loading. Please wait.

Presentation is loading. Please wait.

Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC.

Similar presentations


Presentation on theme: "Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC."— Presentation transcript:

1 Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC

2 GeoInfo 2004 Outline Motivation Our Approach Feature Type Publication by Deegree WFS Algorithm GenerateDataStoreConfigurationFile DFP: An Environment for Deegree Feature Type Publication Conclusions

3 GeoInfo 2004 Motivation The purpose of the WFS specification is to describe the manipulation operations over geospatial data using GML WFS Servers provide queries, update and exchange of geospatial data, stored in data sources, as geographic features instances encoded in GML. The publication of a feature type is largely manual The generation of the configuration file is a tedious and error-prone task. In case of modifications of the database schema, many feature types can be affected.

4 GeoInfo 2004 Automatic Feature Type Publication 1. The base source schema is converted to an XML schema. 2. The User defines the feature type XML schema; 3. The correspondence assertions of the feature type are generated by matching the feature type schema and the base source XML schema. 4. The configuration file required to publish the feature type is automatically generated.

5 Mapping Relational Schema to XMLS + Schema SchoolProj codeschool codeproject Project code (PK) title description School code (PK) name grade street city zipcode geom FK 2 FK 1 Project (TProject) tuple_project * (Ttuple_Project) code (integer) title (string) description (string) keyRef 2 -1 (&Ttuple_SchoolProj) SchoolProj (TSchoolProj) tuple_schoolproj * (Ttuple_SchoolProj) codeschool (integer) codeproject (integer) keyRef 1 (&Ttuple_School) keyRef 2 (&Ttuple_Project) Troot [XML_School] School (TSchool) tuple_school * (Ttuple_School) code (integer) name (string) keyRef 1 -1 (&Ttuple_SchoolProj) grade (string) street (string) city (string) zipcode (string) geom (geometry)

6 GeoInfo 2004 Feature Type A Feature Type F is defined by a 4-tuple F= where: T F is the feature type schema R M is the Master table (each feature instance of F matches a tuple of R M ) A F is the set of path correspondence assertions that matches the proprieties of T F with attributes/path of the Master table

7 GeoInfo 2004 Feature Type School F 2 : [TSchool F /code F ] [Ttuple_School/code] 3 : [TSchool F /geometry F ] [Ttuple_School/geom] 4 : [TSchool F /name F ] [Ttuple_School/name] 5 : [TSchool F /grade F ] [Ttuple_School/grade] 6 : [TSchool F /address F,{street F,city F,zipcode F }] [Ttuple_School/{street,city,zipcode}] 7 : [TSchool F /project F ] [Ttuple_School/keyref1 -1 /keyref2] 8 : [TProject F /code F ] [Ttuple_Project/code] 9 : [TProject F /title F ] [Ttuple_Project/title] T School F code name geometry grade city zipcode address street project * code title T tuple_school zipcode grade street code geom name city codeschool codeproject keyref1 -1 (&Ttuple_SchoolProj) keyref2 (&Ttuple_Project) keyref1 (&Ttuple_School) code title description keyref2 -1 (&Ttuple_SchoolProj) Master´s table type

8 GeoInfo 2004 Feature Publication by Deegree WFS 1. Register the Feature Type in the capabilities document (WFS Capabilities)WFS Capabilities 2. Generate the DataStoreConfiguration (DSC) File. The DSC file consists of three parts: Heading MappingFields MappingTables Footing XML

9 GeoInfo 2004 Feature Publication by Deegree WFS The MappingFields and MappingTables can be automatically generated based on the feature type schema and its set of Correspondence Assertions. All the assertions should be of the form [ T F / p ] [ T tuple_R / e ]. We may have to adjust the feature type schema.

10 GeoInfo 2004 Feature Type School F 2 : [TSchool F /code F ] [Ttuple_School/code] 3 : [TSchool F /geometry F ] [Ttuple_School/geom] 4 : [TSchool F /name F ] [Ttuple_School/name] 5 : [TSchool F /grade F ] [Ttuple_School/grade] 6 : [TSchool F /address F,{street F,city F,zipcode F }] [Ttuple_School/{street,city,zipcode}] 7 : [TSchool F /project F ] [Ttuple_School/keyref1 -1 /keyref2] 8 : [TProject F /code F ] [Ttuple_Project/code] 9 : [TProject F /title F ] [Ttuple_Project/title] T School F code name geometry grade city zipcode address street project * code title T tuple_school zipcode grade street code geom name city codeschool codeproject keyref1 -1 (&Ttuple_SchoolProj) keyref2 (&Ttuple_Project) keyref1 (&Ttuple_School) code title description keyref2 -1 (&Ttuple_SchoolProj) Master´s table type Cannot represent the mapping fields for PCAs 6 and 7

11 GeoInfo 2004 Feature Type School F T School F code name geometry grade address street city zipcode project * code title T tuple_school zipcode grade street code geom name city codeschool codeproject keyref1 -1 keyref2 keyref1 code title description keyref2 -1 Canonical Schema TSchool f code title project * code zipcode Keyref 1 -1 grade street geometry name city [Tschool f /code F ] [Ttuple_School/code] [Tschool f /geom F ] [Ttuple_School/geom] [Tschool f /name F ] [Ttuple_School/name] [Tschool f /grade F ] [Ttuple_School/grade] [Tschool f /street F ] [Ttuple_School/street] [Tschool f /city F ] [Ttuple_School/city] [Tschool f /zipcode F ] [Ttuple_School/zipcode] [Tschool f /keyref 1 -1 ] [Ttuple_School/keyref 1 -1 ] [TProject/code F ] [Ttuple_Project/code] [TProject/title F ] [Ttuple_Project/title] [Tkeyref 1 -1 /project] [Ttuple_Schoolproj/keyref 2 ]

12 GeoInfo 2004 GenerateDeegreeConfigurationFile Algorithm /* INPUT : T F - The Feature Type shema R M - The Master Table A F - The set o PCAs */ Let Map be a string, initially empty. Map + = GenerateFileHeading(); Map + = GenerateMappingFields( T F, Ttuple_R M );GenerateMappingFields Map + = GenerateMappingTables(R M );GenerateMappingTables Map + = GenerateFileFooting(); Return Map

13 GeoInfo 2004 Feature Type Schema Designer 1 Feature Type Schema Matching Tool 2 DFP: An Environment for Deegree Feature Type Publication User BD Base Source Schema Correspondence Assertions Canonical Feature Type Schema Style File DSC File Generator 3 DSC File

14 DFP and Deegree Files Capabilities (.xml) Feature Type Schema (.xsd) DSC File (.xml) FeatureType Feature Type Properties Repository (.xml) Correspondence Assertions Repository (.xml) DB Master Table and Related Tables Repository (.xml) Extract Deegree Servers List (.xml) Oracle Servers List (.xml) Feature Types list (.xml) Register Generate General informations and local path of capabilities file Connection informations and local path of tables repository file Feature Types and l local path of their repositories files Legend: Deegree Files DFP Files Generate

15 GeoInfo 2004 Conclusions We proposed an approach for automatic feature type publication by WFS servers. A feature type is specified by a Schema and a set of Corresp. Assertions. Our formalism handles schematic heterogeneity, and allows complex mappings to be specified quite simply. We presented an algorithm that automatically generates the DataStoreConfiguration file required to publish a feature type by a Deegree WFS.

16 GeoInfo 2004 Conclusions We have developed DFP, a tool to support the publication of features by Deegree WFS.

17 Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC

18 GeoInfo 2004 Deegree Feature Publisher

19 GeoInfo 2004 Feature Type Schema Designer

20 GeoInfo 2004 Feature Type Schema Designer

21 GeoInfo 2004 SMT – Schema Matching Tool

22 GeoInfo 2004 Heading (DataStoreConfiguration File) oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@127.0.0.1:1521:dbGEOM geoUser 8.1.6 <GML2 responsibleClass="org.deegree_impl.services.wfs.oracle. DataStoreOutputGML"> file:///…/SCHOOLSchema.xsd...

23 GeoInfo 2004 MappingFields (DataStoreConfiguration File)... -- ( 4 : [TSchool F /name F ] [Ttuple_School/name] ) -- ( 5 : [TSchool F /grade F ] [Ttuple_School/grade] ) -- ( 2 : [TSchool F /code F ] [Ttuple_School/code ) -- ( 9 : [TProject F /title F ] [Ttuple_Project/title] )...

24 GeoInfo 2004 MappingTables (DataStoreConfiguration File)... CODE <Reference tableField="CODE" replaceable="true" targetTable="SCHOOLPROJ" targetField="CODESCHOOL"/> GEOM <RelatedTable name="SCHOOLPROJ" targetName="SCHOOLPROJ jointable="false"> CODESCHOOL <Reference tableField="CODEPROJECT" replaceable="true" targetTable="PROJECT" targetField="CODE"/> CODE...

25 GeoInfo 2004 Footing (DataStoreConfiguration File)... EPSG:4326

26 GeoInfo 2004 GenerateMappingFields Procedure Procedure GenerateMappingFields (T, Ttuple_R) Let Map be a string, initially empty and visitedTables[ ] be a set. visitedTables[ ] = visitedTables[ ] R For each property p of T Do Case 1: If p is of the form [ T / p ] [ T tuple_R / e ], where the type of e is a simple type. Map + = Case 2: If p is of the form [ T / p ] [ T tuple_R / e ], where e is a reference element and targetTable(e) = R t. Map + = <DatastoreField name= + R +.+ tableField(e) + type= + getType(tableField(e)) + /> If R t visitedTables[ ] Then GenerateMappingFields(T p, Ttuple_R t ) End If End For

27 GeoInfo 2004 GenerateMappingTables Procedure Procedure GenerateMappingTables(R M ) Let Map be a string, initially empty. Let R M be the Master table where Key(R M ) = {k M }. Let A g the geometric atribute of R M. Map = + k M + Map += GenerateReferenceFields(R M )GenerateReferenceFields Map += + A g + Map += For each R in RelTab( R M ) Do Map += + K R + Map += GenerateReferenceFields (R) Map += End For Return Map

28 GeoInfo 2004 GenerateReferenceFields Procedure Procedure GenerateReferenceFields(R) Let Reference be a string, initially empty. For each e in Ref( R ) Do Reference += <Reference tableField=" + tableField(e) + replaceable=true targetTable=" + targetTable(e) + " targetField=" + targetField(e) + /> End For Return Reference

29 GeoInfo 2004 WFS Capabilities...... <ResponsibleClass className="org.deegree_impl.services.wfs.oracle.OracleDataStore" configURL="file:///...SCHOOL_DSC.xml"/> SCHOOL Feature type automatically publicated by Deegree Feature Publisher 4326


Download ppt "Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC."

Similar presentations


Ads by Google