The MDSYS.SDO_WFS_PROCESS package contains subprograms for various processing operations related to support for Web Feature Services.
To use the subprograms in this chapter, you must understand the conceptual and usage information about Web Feature Services in Chapter 15.
Table 34-1 lists the WFS processing subprograms.
Table 34-1 Subprograms for WFS Processing Operations
Subprogram | Description |
---|---|
Deletes a specified feature type. |
|
Deletes all feature types in a specified namespace. |
|
Generates helper procedures for relational feature types that have collection-based columns (for example, VARRAYs or nested tables). |
|
Gets the feature type ID of a specified feature type. |
|
Grants access to a feature type to a database user. |
|
Grants access to WFS metadata tables to a database user. |
|
Inserts the capabilities template information. |
|
Inserts a notification that the data for one or more feature instances was updated in the database. |
|
Inserts a notification that the metadata for a feature type was updated in the database. |
|
Populates metadata for relational feature types that have XMLType columns. |
|
Publishes a feature type; that is, registers metadata related to the feature type. |
|
Enables the publishing of content from a multitable view as a feature instance. |
|
Revokes access to a feature type from a database user. |
|
Revokes access to WFS metadata tables from a database user. |
|
Disables the publishing of content from a multitable view as a feature instance. |
The rest of this chapter provides reference information on the subprograms, listed in alphabetical order.
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
If you want to drop a feature type whose content comes from a multitable view, you must call the SDO_WFS_PROCESS.UnRegisterMTableView procedure before you call the SDO_WFS_PROCESS.DropFeatureType procedure.
If you want to drop all feature types in the namespace, you can use the SDO_WFS_PROCESS.DropFeatureTypes procedure.
For information about support for Web Feature Services, see Chapter 15.
To drop a single feature type in a namespace, use the SDO_WFS_PROCESS.DropFeatureType procedure.
For information about support for Web Feature Services, see Chapter 15.
Generates helper procedures for relational feature types that have collection-based columns (for example, VARRAYs or nested tables).
Use this procedure if any feature tables have features that are defined in collection-based columns (for example, VARRAYs or nested tables).
For information about support for Web Feature Services, see Chapter 15.
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
For information about support for Web Feature Services, see Chapter 15.
SDO_WFS_PROCESS.GrantFeatureTypeToUser(
ftnsUrl IN VARCHAR2,
ftName IN VARCHAR2,
userName IN VARCHAR2);
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
Name of the database user.
To revoke access to a feature type from a database user, use the SDO_WFS_PROCESS.RevokeFeatureTypeFromUser procedure.
For information about support for Web Feature Services, see Chapter 15.
To call this procedure, you should be connected to the database as a user with the DBA role.
To revoke access to Web Feature Service metadata tables from a database user, use the SDO_WFS_PROCESS.RevokeMDAccessFromUser procedure.
For information about support for Web Feature Services, see Chapter 15.
XML document for the capabilities template, which is used at runtime to generate capabilities documents.
At runtime, the capabilities document is dynamically generated by binding feature type information from the WFS metadata with the capabilities template. For information about capabilities documents, see Section 15.2.1.
For information about support for Web Feature Services, see Chapter 15.
SDO_WFS_PROCESS.InsertFtDataUpdated(
ns IN VARCHAR2,
name IN VARCHAR2,
updatedRowList IN ROWPOINTERLIST,
updateTs IN TIMESTAMP);
Inserts a notification that the data for one or more feature instances was updated in the database.
Namespace of the feature type.
Name of the feature type.
Rowids of feature instances that have been updated.
Date and time when the data was updated.
This procedure is used for WFS cache data synchronization.
For information about support for Web Feature Services, see Chapter 15.
The following example inserts a notification that the data for the feature instances associated with specific rowids in the COLA_MARKETS_CS table was updated in the database.
. . . begin updatedRowIdList:= . . . -- list of rowIds of the -- WFS_REL_USER.COLA_MARKETS_CS table -- that have been updated. . . . SDO_WFS_PROCESS.InsertFtDataUpdated( 'http://www.example.com/myns','COLA', updatedRowIdList, sysdate); . . . end; /
Inserts a notification that the metadata for a feature type was updated in the database.
Namespace of the feature type.
Name of the feature type.
Date and time when the metadata was updated.
This procedure is used for WFS cache metadata synchronization.
For information about support for Web Feature Services, see Chapter 15.
SDO_WFS_PROCESS.PopulateFeatureTypeXMLInfo(
xmlColTypeXsd IN XMLTYPE,
fTypeId IN NUMBER,
columnName IN VARCHAR2,
objPathInfo IN MDSYS.STRINGLIST);
Schema definition of the relational feature type that has an XMLType column.
ID of the relational feature type that has an XMLType column.
Name of the XMLType column in the feature table
Path information. The MDSYS.STRINGLIST type is defined as VARRAY(1000000) OF VARCHAR2(4000)
.
For information about support for Web Feature Services, see Chapter 15.
The following example populates the metadata for the relational feature type described by the XML schema definition in ROADS.xsd
and stored in an XMLType column named DATACOL
BEGIN SDO_WFS_PROCESS.populateFeatureTypeXMLInfo( xmltype(bfilename('WFSUSERDIR', 'ROADS.xsd'), nls_charset_id('AL32UTF8')), 1, 'DATACOL', mdsys.StringList('METADATA')); END; /
SDO_WFS_PROCESS.PublishFeatureType(
dataSrc IN VARCHAR2,
ftNsUrl IN VARCHAR2,
ftName IN VARCHAR2,
ftNsAlias IN VARCHAR2,
featureDesc IN XMLTYPE,
schemaLocation IN VARCHAR2,
pkeyCol IN VARCHAR2,
columnInfo IN MDSYS.STRINGLIST,
pSpatialCol IN VARCHAR2,
featureMemberNs IN VARCHAR2,
featureMemberName IN VARCHAR2,
srsNs IN VARCHAR2,
srsNsAlias IN VARCHAR2,
mandatoryColumnInfo IN MDSYS.STRINGLIST);
or
SDO_WFS_PROCESS.PublishFeatureType(
dataSrc IN VARCHAR2,
ftNsUrl IN VARCHAR2,
ftName IN VARCHAR2,
ftNsAlias IN VARCHAR2,
featureDesc IN XMLTYPE,
schemaLocation IN VARCHAR2,
pkeyCol IN VARCHAR2,
columnInfo IN MDSYS.STRINGLIST,
pSpatialCol IN VARCHAR2,
featureMemberNs IN VARCHAR2,
featureMemberName IN VARCHAR2,
srsNs IN VARCHAR2,
srsNsAlias IN VARCHAR2,
viewTableName IN VARCHAR2,
viewTablepkeyCol IN VARCHAR2,
mandatoryColumnInfo IN MDSYS.STRINGLIST);
or
SDO_WFS_PROCESS.PublishFeatureType(
dataSrc IN VARCHAR2,
ftNsUrl IN VARCHAR2,
ftName IN VARCHAR2,
ftNsAlias IN VARCHAR2,
featureDesc IN XMLTYPE,
schemaLocation IN VARCHAR2,
pkeyCol IN VARCHAR2,
columnInfo IN MDSYS.STRINGLIST,
pSpatialCol IN VARCHAR2,
featureMemberNs IN VARCHAR2,
featureMemberName IN VARCHAR2,
srsNs IN VARCHAR2,
srsNsAlias IN VARCHAR2,
featureCollectionNs IN VARCHAR2,
featureCollectionName IN VARCHAR2,
isGML3 IN VARCHAR2,
formattedKeyCols IN MDSYS.STRINGLIST,
viewTableName IN VARCHAR2,
viewTablepkeyCol IN VARCHAR2,
viewTableFmtKeyCols IN VARCHAR2,
mandatoryColumnInfo IN MDSYS.STRINGLIST);
Name of the feature table or view containing the spatial features. It must be in the format schema-name.table-name or schema-name.view-name; that is, the name of the database user that owns the table must be included.
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
Alias of the namespace for the feature type.
Feature type description to be reported in the capabilities document, as a document of type XMLTYPE.
String to be used to populate the xsi:schemaLocation
attribute in the feature type XSD. If this parameter is null, a string is automatically generated.
Primary key column in the feature table or view identified in dataSrc
. If a feature type table or view has a multicolumn primary key, use a semicolon to separate the columns in the primary key. For example: 'COL1;COL2'
Type string associated with each spatial column (SDO_GEOMETRY type) in the feature table identified in dataSrc
., as an object of type MDSYS.STRINGLIST (for example, for WFS 1.0.n, MDSYS.STRINGLIST('<GEOM_COL1_GEOMETRYTYPE>PolygonMemberType', '<GEOM_COL2_GEOMETRYTYPE>PointMemberType')
.
See the Usage Notes for information about any spatial columns specified in the columnInfo
parameter.
Spatial column of type SDO_GEOMETRY in the feature table.
Namespace of the feature member element that will contain feature instances in a feature collection. If this parameter is null, the default is: http://www.opengis.net/gml
Name of the feature member element that will contain feature instances in a feature collection. If this parameter is null, the default is featureMember
.
User-defined namespace of the spatial reference system (coordinate system) associated with the spatial data for the feature type. This namespace (if specified) is also used to generate the srsName
attribute in the <boundedBy>
element of the FeatureCollection result generated for the GetFeature request.
Namespace alias of the namespace of the spatial reference system (coordinate system) associated with the spatial data for the feature type.
Namespace of the WFS feature collection within which this feature type instances can occur.
Name of the WFS feature collection within which this feature type instances can occur.
A string value: Y
means that the geometries inside instances of this feature type are GML3.1.1 compliant; N
means that the geometries inside instances of this feature type are GML 2.1.2 compliant.
String formatted representation of the content of the primary key column or (for a multicolumn primary key) columns. For example, if ROAD_ID is the primary key column of type NUMBER, specify MDSYS.STRINGLIST('to_char(ROAD_ID)')
. To specify multiple strings in the MDSYS.STRINGLIST type constructor, separate each with a comma. The list of string formatted primary key columns should be specified in the same order as the primary key columns specified in the pkeyCol
parameter.
Name of the underlying table if the feature type will by defined on a view based on a single underlying table. The published feature type will be based on the view, specified in the dataSrc
parameter (user-name.view-name). Do not enter a value for the viewTableName
parameter if the feature type is based on a table or on a multitable view.
Primary key column of the table specified in the viewTableName
parameter, if the feature type will by defined on a view based on a single underlying table.
If the feature type is based on a view defined on a single table, and if the view has one or more formatted primary key columns, this parameter represents a list of string formatted primary key columns in the underlying table that correspond to the string formatted primary key columns in the view (specified by formattedkeyCols
parameter). For example, if ROAD_ID is the primary key column of type NUMBER, specify MDSYS.STRINGLIST('to_char(ROAD_ID)')
. To specify multiple strings in the MDSYS.STRINGLIST type constructor, separate each with a comma.
If feature type is not based on a single table view, or if the feature type is based on a single table view but the feature type does not have formatted primary key columns, this parameter should be null.
List of columns that must be returned in the GetFeature request, irrespective of the columns requested. (The requested columns will be returned in all cases.) If this parameter is omitted, all columns are mandatory (that is, all columns will be returned). However, if this parameter is specified as NULL, no columns are mandatory (that is, only the requested columns will be returned). To specify column names, use the MDSYS.STRINGLIST type constructor as in the following example: MDSYS.STRINGLIST('COL1', 'COL2', 'COL5')
In the columnInfo
parameter, each column of type SDO_GEOMETRY in the feature type instances table must have the correct associated string value specified in the columnInfo
parameter, with the string values in the same order as the order of the spatial columns in the table definition.
For WFS 1.0.n, for example, if the single SDO_GEOMETRY column named SHAPE in the feature type instances table contains polygon geometries, the columnInfo
value must be SHAPE_GEOMETRYTYPE>PolygonMemberType
. Table 34-2 lists the geometry types and their required associated columnInfo
parameter values for WFS version 1.0.n. (Replace <column-name> with the name of the column.)
Table 34-2 Geometry Types and columnInfo Parameter Values (WFS 1.0.n)
Geometry Type | columnInfo Parameter Value |
---|---|
Polygon or Surface |
<column-name>_GEOMETRYTYPE>PolygonMemberType |
Multipolygon or Multisurface |
<column-name>_GEOMETRYTYPE>MultiPolygonMemberType |
Point |
<column-name>_GEOMETRYTYPE>PointMemberType |
Multipoint |
<column-name>_GEOMETRYTYPE>MultiPointMemberType |
Line or Curve |
<column-name>_GEOMETRYTYPE>CurveMemberType |
Multiline or multicurve |
<column-name>_GEOMETRYTYPE>MultiCurveMemberType |
Solid |
<column-name>_GEOMETRYTYPE>SolidMemberType |
Multisolid |
<column-name>_GEOMETRYTYPE>MultiSolidMemberType |
Collection |
<column-name>_GEOMETRYTYPE>GeometryMemberType |
For information about support for Web Feature Services, see Chapter 15.
The following example registers metadata for a feature type named COLA
with the polygon geometries stored in the column named SHAPE
. (It assumes the use of WFS 1.0.n.)
DECLARE columnInfo MDSYS.StringList := MDSYS.StringList('SHAPE_GEOMETRYTYPE>PolygonMemberType'); BEGIN SDO_WFS_PROCESS.publishFeatureType( 'WFS_USER.COLA_MARKETS_VIEW', 'http://www.example.com/myns', 'COLA', 'myns', xmltype(bfilename('WFSUSERDIR', 'featuredesct.xml'), nls_charset_id('AL32UTF8')), null, 'MKT_ID', columnInfo, 'SHAPE', null, null, null, null); END; /
SDO_WFS_PROCESS.RegisterMTableView(
ftNsUrl IN VARCHAR2,
ftName IN VARCHAR2,
viewTableList IN MDSYS.STRINGLIST,
viewTablePkeyColList IN MDSYS.STRINGLIST,
tablePkeyColList IN MDSYS.STRINGLIST);
or
SDO_WFS_PROCESS.RegisterMTableView(
ftNsUrl IN VARCHAR2,
ftName IN VARCHAR2,
viewTableList IN MDSYS.STRINGLIST,
viewTablePkeyColList IN MDSYS.STRINGLIST,
formattedViewTableColList IN MDSYS.STRINGLISTLIST,
tablePkeyColList IN MDSYS.STRINGLIST);
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
List of tables in the view. To specify table names, use the MDSYS.STRINGLIST type constructor as in the following example: MDSYS.STRINGLIST('MYUSER.ROADS', 'MYUSER.ROADS_DESC')
List of view columns that correspond to the primary key columns in the tables in the view, in the order that corresponds to the order of the tables in viewTableList
. To specify column names, use the MDSYS.STRINGLIST type constructor as in the following example: MDSYS.STRINGLIST('ROAD_ID', 'ROAD_ID')
, where both the ROADS and ROAD_DESC table have ROAD_ID as primary key.
If the view has columns that correspond to table columns in a multicolumn primary key, use a semicolon to separate the columns in the primary key. For example: 'COL1;COL2'
A list of string formatted table primary key columns that correspond to the string formatted primary key columns in the view, in the order that corresponds to the order of the tables in viewTableList
. To specify column names, use the MDSYS.STRINGLISTLIST type constructor as in the following example: MDSYS.STRINGLISTLIST(MDSYS.STRINGLIST('to_char(ROAD_ID)'), MDSYS.STRINGLIST('to_char(ROAD_ID)'))
The list of string formatted primary key columns for each table should be specified in the same order as the primary key columns for each table specified in tablePkeyColList
parameter.
List of the primary key columns in the tables, in the order that corresponds to the order of the tables in viewTableList
. For each table the primary key columns should be specified in the order that correspond to the key columns in the view as specified in viewTablePkeyColList
parameter. To specify column names, use the MDSYS.STRINGLIST type constructor as in the following example: MDSYS.STRINGLIST('ROAD_ID', 'ROAD_ID')
If a table has a multicolumn primary key, use a semicolon to separate the columns in the primary key. For example : 'COL1;COL2'
If you need to publish content from a multitable view as a feature instance, you must call this procedure after calling the SDO_WFS_PROCESS.PublishFeatureType procedure.
To disable the publishing of content from a multitable view as a feature instance, use the SDO_WFS_PROCESS.UnRegisterMTableView procedure.
For information about support for Web Feature Services, see Chapter 15.
The following example creates two feature tables, creates a view based on these tables. publishes a feature type, and registers the multitable view to enable the publishing of content from the view.
CREATE TABLE cola_markets_cs ( mkt_id NUMBER PRIMARY KEY, name VARCHAR2(32), shape MDSYS.SDO_GEOMETRY); CREATE TABLE cola_markets_cs_details ( mkt_id NUMBER PRIMARY KEY, description VARCHAR2(400)); create view cola_markets_view as select t1.mkt_id, t1.name, t1.shape, t2.description from cola_markets_cs t1, cola_markets_cs_details t2 where t1.mkt_id = t2.mkt_id; DECLARE cm MDSYS.StringList := MDSYS.StringList('PolygonMemberType'); BEGIN SDO_WFS_PROCESS.publishFeatureType( 'WFS_USER.COLA_MARKETS_VIEW', 'http://www.example.com/myns', 'COLA', 'myns', xmltype(bfilename('WFSUSERDIR', 'featuredesct.xml'), nls_charset_id('AL32UTF8')), null, 'MKT_ID', cm, 'SHAPE', null, null, null, null); END; / BEGIN SDO_WFS_PROCESS.registerMTableView('http://www.example.com/myns', 'COLA', mdsys.StringList('WFS_USER.COLA_MARKETS_CS', 'WFS_USER.COLA_MARKETS_CS_DETAILS'), mdsys.StringList('MKT_ID', 'MKT_ID'), -- view keys per table mdsys.StringList('MKT_ID', 'MKT_ID'));-- corresponding table keys END; /
SDO_WFS_PROCESS.RevokeFeatureTypeFromUser(
ftnsUrl IN VARCHAR2,
ftName IN VARCHAR2,
userName IN VARCHAR2);
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
Name of the database user.
To grant access to a feature type to a database user, use the SDO_WFS_PROCESS.GrantFeatureTypeToUser procedure.
For information about support for Web Feature Services, see Chapter 15.
To call this procedure, you should be connected to the database as a user with the DBA role.
To grant access to Web Feature Service metadata tables to a database user, use the SDO_WFS_PROCESS.GrantMDAccessToUser procedure.
For information about support for Web Feature Services, see Chapter 15.
Uniform resource locator (URL) of the namespace for the feature type.
Name of the feature type.
The SDO_WFS_PROCESS.RegisterMTableView procedure must have been called previously to enable the publishing of content from the multitable view as a feature instance.
If you want to drop a feature type whose content comes from a multitable view, you must call this procedure before you call the SDO_WFS_PROCESS.DropFeatureType procedure.
For information about support for Web Feature Services, see Chapter 15.