The CSW APIs enable you to perform operations that include:
Specifying information about record type domains and record view transformations
Publishing record types
Dropping (unpublishing) record types
Granting to users and revoking from users privileges on CSW record types
SDO_CSW_PROCESS Package (CSW Processing) describes the PL/SQL API (SDO_CSW_PROCESS package), Request and Response XML Examples provides examples of XML requests and responses, and Java API for CSW Administration describes the Java API.
A client can get information about the server’s capabilities. A capabilities document is generated by the CSW server in response to a GetCapabilities request. The capabilities document contains information extracted from CSW metadata stored in an Oracle database, including a record type and the type of operations supported.
The client can use HTTP GET, POST, and SOAP protocols to access this capabilities document. The following example uses the HTTP protocol:
http:///<machine-name:port>/oraclespatial/csw?request=GetCapabilities&service=CSW&acceptversion=2.0.0&outputFormat=text/xml
In the preceding formats:
machine-name is the name of the system where the application server is running.
port is the port number where the application server is running.
oraclespatial is the default root where the Oracle Spatial and Graph web services application is mounted.
If you need CSW to process any spatial content that is not in GML format, you must create a user-defined function named extractSDO
to extract the spatial path information. This function must be implemented for each record type that has spatial content in non-GML format and on which you want to create a spatial index. (This function is not needed if all spatial content for a record type is in GML format.)
This function must be registered, as explained in Registering and Unregistering the extractSDO Function, so that the Oracle Spatial and Graph CSW server can find and invoke this function when it needs to extract spatial path content that is not in GML format.
The extractSDO
function has the following format:
extractSDO(
xmlData IN XMLType, srsNs IN VARCHAR2, spPathsSRSNSList IN MDSYS.STRINGLISTLIST); ) RETURN MDSYS.SDO_GEOM_PATH_INFO;
Parameters
Data of the record instance from which spatial path information needs to be extracted.
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.
If a record type has multiple user-defined spatial reference system namespaces associated with different spatial paths, this parameter specifies the list of spatial reference system namespace information corresponding to the different spatial paths specified during type registration. It is an object of type MDSYS.STRINGLISTLIST, which is defined as VARRAY(1000000) OF MDSYS.STRINGLIST
, and where MDSYS.STRINGLIST is defined as VARRAY(1000000) OF VARCHAR2(4000)
. If a record type does not have multiple user-defined spatial reference system namespaces associated with different spatial columns, this parameter should be null.
In each MDSYS.STRINGLIST object, the first element is the spatial reference system namespace, and second element is the spatial reference system namespace alias (if any).
Usage Notes
This function parses the non-GML spatial content and returns an object of type MDSYS.SDO_GEOM_PATH_INFO, which is defined as follows:
(path MDSYS.STRINGLIST, geom SDO_GEOMETRY, arrindex NUMBER)
The path
attribute specifies path to the spatial content that is to be extracted and stored in the geom
attribute. It is an object of MDSYS.STRINGLIST, which is defined as: VARRAY(1000000) OF VARCHAR2(4000)
. The path attribute has the following pattern: MDSYS.STRINGLIST('pe_namespace1','pe_name1', 'pe_namespace2','pe_name2',...);
where:
pe_namespace1
is the namespace of the first path element.
pe_name1
is the name of the first path element.
pe_namespace2
is the namespace of the second path element.
pe_name2
is the name of the second path element.
and so on, for any remaining namespace and name pairs.
In the path, /typeNameNSAlias:typeName/pe_namespace1_Alias:pe_name1/pe_namespace2_Alias:pe_name2...
is an XPath representation of spatial content, in non-GML format, that will be extracted by the user-defined function extractSDO
:
typeNameNSAlias
is an alias to record type name namespace.
typeName
is the type name of the record type.
pe_namespace1_Alias
is a namespace alias for namespace pe_namespace1
pe_namespace2_Alias
is a namespace alias for namespace pe_namespace2
.
The geom
attribute is the spatial content (corresponding to the path
parameter) extracted as an SDO_GEOMETRY object. The extracted geometry can then be indexed using a spatial index.
The arrindex
attribute is not currently used, and should be set to 1. (It is reserved for future use as an array index of paths.)
After you create the extractSDO
function, you must register it to enable it to be used for processing spatial path content in record types that is not in GML format. To register the function, call the SDO_CSW_PROCESS.InsertPluginMap procedure. For example:
BEGIN SDO_CSW_PROCESS.insertPluginMap('http://www.opengis.net/cat/csw', 'Record', 'csw_admin_usr.csw_RT_1_package'); END; /
If you no longer want the extractSDO
function to be used for processing spatial path content that is not in GML format, you can unregister the function by calling the SDO_CSW_PROCESS.DeletePluginMap procedure. For example:
BEGIN SDO_CSW_PROCESS.deletePluginMap('http://www.opengis.net/cat/csw', 'Record'); END; /