1 / 29

Towards Automatic Feature Type Publication

Towards Automatic Feature Type Publication. Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC. Outline. Motivation Our Approach Feature Type Publication by Deegree WFS Algorithm GenerateDataStoreConfigurationFile

lewis
Download Presentation

Towards Automatic Feature Type Publication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. 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. Motivation

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

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

  6. Feature Type • A Feature Type F is defined by a 4-tuple F=< TF, RM, AF > where: • TF is the feature type schema • RM is the Master table (each feature instance of F matches a tuple of RM ) • AF is the set of path correspondence assertions that matches the proprieties of TF with attributes/path of the Master table

  7. Master´s table type TSchoolF code geometry name grade Ttuple_school address street code city zipcode geom project * name grade street city zipcode keyref1-1(&Ttuple_SchoolProj) codeschool code codeproject keyref2 (&Ttuple_Project) title code title description keyref2-1 (&Ttuple_SchoolProj) keyref1 (&Ttuple_School) Feature TypeSchoolF 2 : [TSchoolF/codeF]  [Ttuple_School/code] 3 : [TSchoolF/geometryF]  [Ttuple_School/geom] 4 : [TSchoolF/nameF]  [Ttuple_School/name] 5 : [TSchoolF/gradeF]  [Ttuple_School/grade] 6 : [TSchoolF/addressF,{streetF,cityF,zipcodeF}]  [Ttuple_School/{street,city,zipcode}] 7 : [TSchoolF/projectF] [Ttuple_School/keyref1-1/keyref2] 8 : [TProjectF/codeF]  [Ttuple_Project/code] 9 : [TProjectF/titleF]  [Ttuple_Project/title]

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

  9. 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 [TF/ p][Ttuple_R/e]. • We may have to adjust the feature type schema.

  10. Master´s table type TSchoolF 2 : [TSchoolF/codeF]  [Ttuple_School/code] code 3 : [TSchoolF/geometryF]  [Ttuple_School/geom] geometry 4 : [TSchoolF/nameF]  [Ttuple_School/name] name 5 : [TSchoolF/gradeF]  [Ttuple_School/grade] grade 6 : [TSchoolF/addressF,{streetF,cityF,zipcodeF}]  [Ttuple_School/{street,city,zipcode}] Ttuple_school address street code city zipcode 7 : [TSchoolF/projectF] [Ttuple_School/keyref1-1/keyref2] geom project * 8 : [TProjectF/codeF]  [Ttuple_Project/code] name 9 : [TProjectF/titleF]  [Ttuple_Project/title] grade Cannot represent the mapping fields for PCAs6 and7 street city zipcode keyref1-1(&Ttuple_SchoolProj) codeschool code codeproject keyref2 (&Ttuple_Project) title code title description keyref2-1 (&Ttuple_SchoolProj) keyref1 (&Ttuple_School) Feature TypeSchoolF

  11. TSchoolf code geometry name grade Ttuple_school street TSchoolF city code code zipcode Keyref1-1 geom geometry project * code name name title grade grade Canonical Schema street address street city city zipcode zipcode keyref1-1 project * codeschool code codeproject keyref2 title code title description keyref2-1 keyref1 Feature TypeSchoolF [Tschoolf/codeF]  [Ttuple_School/code] [Tschoolf/geomF]  [Ttuple_School/geom] [Tschoolf/nameF]  [Ttuple_School/name] [Tschoolf/gradeF]  [Ttuple_School/grade] [Tschoolf/streetF]  [Ttuple_School/street] [Tschoolf/cityF]  [Ttuple_School/city] [Tschoolf/zipcodeF][Ttuple_School/zipcode] [Tschoolf/keyref1-1]  [Ttuple_School/keyref1-1] [Tkeyref1-1/project]  [Ttuple_Schoolproj/keyref2] [TProject/codeF]  [Ttuple_Project/code] [TProject/titleF]  [Ttuple_Project/title]

  12. GenerateDeegreeConfigurationFile Algorithm /* INPUT: TF- The Feature Type shema RM- The Master Table AF- The set o PCAs */ Let Map be a string, initially empty. Map + = GenerateFileHeading(); Map + = GenerateMappingFields(TF, Ttuple_RM); Map + = GenerateMappingTables(RM); Map + = GenerateFileFooting(); Return Map

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

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

  15. 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 generatesthe DataStoreConfiguration file required to publish a feature type by a Deegree WFS.

  16. 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. Deegree Feature Publisher

  19. Feature Type Schema Designer

  20. Feature Type Schema Designer

  21. SMT – Schema Matching Tool

  22. Heading (DataStoreConfiguration File) <?xml version="1.0" encoding="UTF-8"?> <DatastoreConfiguration name="SCHOOL" type="ORACLESPATIAL"> <Connection name="SCHOOL_con"> <driver>oracle.jdbc.driver.OracleDriver</driver> <logon>jdbc:oracle:thin:@127.0.0.1:1521:dbGEOM</logon> <user>geoUser</user> <password>geoUser</password> <spatialversion>8.1.6</spatialversion> </Connection> <FeatureType name="SCHOOL"> <OutputFormat> <GML2 responsibleClass="org.deegree_impl.services.wfs.oracle. DataStoreOutputGML"> <Param name="FILTER" value="file:///.../SchoolTransf.xsl"/> <SchemaLocation>file:///…/SCHOOLSchema.xsd </SchemaLocation> </GML2> </OutputFormat> . . .

  23. MappingFields (DataStoreConfiguration File) . . . <MappingField> <Property name="NAME" type="xsd:string"/> -- (4 : [TSchoolF/nameF]  [Ttuple_School/name]) <DatastoreField name="SCHOOLL.NAME" type="VARCHAR2"/> </MappingField> <MappingField> <Property name="GRADE" type="xsd:string"/> -- (5 : [TSchoolF/gradeF]  [Ttuple_School/grade]) <DatastoreField name="SCHOOL.GRADE" type="VARCHAR2"/> </MappingField> <Property name="CODE" type="xsd:integer"/> -- (2 : [TSchoolF/codeF]  [Ttuple_School/code) <DatastoreField name="PROJECT.CODE" type="NUMBER"/> </MappingField> <MappingField> <Property name="TITLE" type="xsd:string"/> -- (9 : [TProjectF/titleF]  [Ttuple_Project/title]) <DatastoreField name="PROJECT.TITLE" type="VARCHAR2"/> </MappingField> . . .

  24. MappingTables (DataStoreConfiguration File) . . . <MasterTable name="SCHOOL" targetName="SCHOOL"> <IdField number="true" auto="false">CODE</IdField> <Reference tableField="CODE" replaceable="true" targetTable="SCHOOLPROJ" targetField="CODESCHOOL"/> <GeoFieldIdentifier>GEOM</GeoFieldIdentifier> </MasterTable> <RelatedTable name="SCHOOLPROJ" targetName="SCHOOLPROJ“ jointable="false"> <IdField number="true" auto="false">CODESCHOOL</IdField> <Reference tableField="CODEPROJECT" replaceable="true" targetTable="PROJECT" targetField="CODE"/> </RelatedTable> <RelatedTable name="PROJECT" targetName="PROJECT" jointable="false"> <IdField number="true" auto="false">CODE</IdField> </RelatedTable> . . .

  25. Footing (DataStoreConfiguration File) . . . <CRS>EPSG:4326</CRS> </FeatureType> </DatastoreConfiguration>

  26. 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][Ttuple_R/e], where the type of e is a simple type. Map + = “<MappingField>” “<Propertyname=’ “+ p + “ ’type=’ “ + getGMLType(p) + “ ’/>” “<DatastoreFieldname=’ “ + R+ "." + e + “ ’type=’ “ + getType(e) + “ ’/>” “</MappingField>” Case 2: If p is of the form[T/p][Ttuple_R/e], where e is a reference element and targetTable(e) = Rt . Map + = “<MappinField>” “<Propertyname=’ “ + p + “ ’type=’ “ + getGMLType(tableField(e)) + “ ’/>“ “<DatastoreFieldname=’ “ + R + “.”+ tableField(e) + “ ‘type= ‘ ”+ getType(tableField(e)) + “ ’/> ” “</MappingField>” If RtvisitedTables[ ] Then GenerateMappingFields(Tp , Ttuple_Rt) End If End For

  27. GenerateMappingTables Procedure Procedure GenerateMappingTables(RM) Let Map be a string, initially empty. Let RM be the Master table where Key(RM) = {kM}. Let Ag the geometric atribute of RM. Map = “<MasterTablename=’ "+ RM + " ‘targetName= ‘ "+ RM + " ’> “ “<IdFieldnumber= ‘ " + IsNumber(getType(kM)) + " ‘auto=’false’> “ + kM + “ </IdField>” Map += GenerateReferenceFields(RM) Map += “<GeomFieldIdentifier>” + Ag + “</GeomFieldIdentifier>” Map += “</MasterTable>” For each R in RelTab(RM) Do Map += “<RelatedTablename=’ "+ R + " ’targetName= ‘ "+ R + " ‘>“ “<IdFieldnumber=’ “ + IsNumber(getType(kR)) + " ‘auto=’false’> ” + KR + “</IdField>” Map += GenerateReferenceFields (R) Map += “</RelatedTable>” End For Return Map

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

  29. WFS Capabilities <WFS_Capabilities version="1.0.0"> . . . <FeatureTypeList> . . . <FeatureType> <ResponsibleClass className="org.deegree_impl.services.wfs.oracle.OracleDataStore" configURL="file:///...SCHOOL_DSC.xml"/> <Name>SCHOOL</Name> <Title> Feature type automatically publicated by Deegree Feature Publisher </Title> <SRS>4326</SRS> <LatLonBoundingBox minx="0" miny="0" maxx="180" maxy="90"/> </FeatureType> </FeatureTypeList> </WFS_Capabilities>

More Related