15.2 Managing Feature Types

WFS supports relational and document-based feature types:

  • Relational feature types expose the content of database tables as feature instances. Relational feature types are well suited for those who use Oracle Spatial and Graph to manage their geospatial data and use Oracle Database to manage other business data. The Spatial and Graph WFS implementation provides ways to access the data, especially in service-oriented architecture (SOA) systems implemented using web services.

    Use PL/SQL application programming interfaces (APIs) to manage relational feature types. The PL/SQL packages SDO_WFS_LOCK and SDO_WFS_PROCESS (described in SDO_WFS_LOCK Package (WFS) and SDO_WFS_PROCESS Package (WFS Processing) , respectively) enable you to manage relational feature types.

  • Document-based feature types expose XML schema-based XML content as feature instances. Document-based feature types are well suited for those who use XML as their main data source and who might not currently use Oracle Spatial and Graph with such data. For this data, the Spatial and Graph WFS implementation extracts the geometry components and stores them using the SDO_GEOMETRY type; it stores the remaining XML components in Oracle XDB and builds appropriate XMLIndex indexes for them.

    Use Java APIs (described in Java API for WFS Administration) to manage document-based feature types.

These APIs enable you to perform operations that include:

  • Publishing feature types

  • Dropping (unpublishing) feature types

  • Granting to users and revoking from users privileges of WFS metadata and feature types

  • For relational feature types: lock-enabling and lock-disabling feature tables (with lock-enabling on by default for document-based feature types)

15.2.1 Capabilities Documents

A capabilities document describes an instance of a capability. The document specifies a feature type (such as roads or rivers) and the type of operations supported (such as insert and delete).

A capabilities document is generated by the WFS server in response to a GetCapabilities request. The WFS server uses a capabilities template, and adds information about the feature type and operations to this template to create the capabilities document.

The client can use the HTTP GET method to access this capabilities document using either the SOAP interface or the XML interface:

  • For the SOAP interface, use oracle.spatial.ws.servlet.WFSServlet, which can be accessed at an address in the following format:

    http://machine-name:port/SpatialWS-SpatialWS-context-root/wfsservlet?request=GetCapabilities&service=WFS&version=1.0.0
    
  • For the XML interface, use oracle.spatial.ws.servlet.WFSXMLServlet, which can be accessed at an address in the following format:

    http://machine-name:port/SpatialWS-SpatialWS-context-root/xmlwfsservlet?request=GetCapabilities&service=WFS&version=1.0.0
    

In the preceding formats:

  • machine-name is the name of the system where the application server or OC4J server is running.

  • port is the port number where the application server or OC4J server is running.

  • SpatialWS-SpatialWS-context-root is the default root where the Spatial and Graph web services application is mounted.

  • wfsservlet is the servlet-mapping url-pattern for oracle.spatial.ws.servlet.WFSServlet, as specified by default in the web.xml file.

  • xmlwfsservlet is the servlet-mapping url-pattern for oracle.spatial.ws.servlet.WFSXMLServlet, as specified by default in the web.xml file.