Skip Headers
Oracle® Spatial Developer's Guide
11g Release 2 (11.2)

Part Number E11830-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

16 Catalog Services for the Web (CSW) Support

This chapter describes the Oracle Spatial implementation of the Open GIS Consortium specification for catalog services. According to this specification: "Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community."

The Oracle Spatial implementation will be referred to as Catalog Services for the Web, or CSW

This chapter includes the following major sections:

Note:

Before you use CSW, be sure that you understand the concepts described in Chapter 10, "Introduction to Spatial Web Services", and that you have performed any necessary configuration work as described in that chapter.

If you have data from a previous release that was indexed using one or more SYS.XMLTABLEINDEX indexes, you must drop the associated indexes before the upgrade and re-create the indexes after the upgrade, as described in Section A.2.

16.1 CSW Engine and Architecture

This section describes CSW, including its relationship to clients and to the database server. CSW is implemented as a Web service and can be deployed in Oracle Containers for Java (OC4J), which is included with Oracle Application Server.

CSW has a metadata layer, which stores in the database the metadata needed to reply to catalog requests. The metadata includes spatial columns, which can be queried and processed using Oracle Spatial interfaces. The metadata also stores the association of nonspatial and spatial attributes of records, as well as the services that the catalog service provides to its clients.

Figure 16-1 shows the CSW architecture.

Figure 16-1 CSW Architecture

Description of Figure 16-1 follows
Description of "Figure 16-1 CSW Architecture"

As shown in Figure 16-1:

CSW security is implemented using secure transport. User identities and user labels are managed in LDAP, and the middle tier and CSW security combine to perform authentication. Oracle label-based security is used for managing user privileges at the record level.

16.2 CSW APIs and Configuration

The CSW APIs enable you to perform operations that include:

Chapter 22 describes the PL/SQL API (SDO_CSW_PROCESS package), Section 16.3 provides examples of XML requests and responses, and Section 16.4 describes the Java API.

16.2.1 Capabilities Documents

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

A capabilities document is generated by the CSW server in response to a GetCapabilities request. The CSW server uses a capabilities template, and adds information about the record 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.CSWServlet, which can be accessed at an address in the following format:

    http:///machine-name:port/SpatialWS-SpatialWS-context-root/cswservlet?request=GetCapabilities&service=CSW&acceptversion=2.0.0&outputFormat=text/xml
    
  • For the XML interface, use oracle.spatial.ws.servlet.CSWXMLServlet, which can be accessed at an address in the following format:

    http:///machine-name:port/SpatialWS-SpatialWS-context-root/xmlcswservlet?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 OC4J server is running.

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

  • SpatialWS-SpatialWS-context-root is the default root where the Spatial Web services application is mounted.

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

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

16.2.2 Spatial Path Extractor Function (extractSDO)

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 Section 16.2.2.1, so that the Oracle Spatial 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

xmlData

Data of the record instance from which spatial path information needs to be extracted.

srsNs

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.

spPathsSRSNSList

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.)

16.2.2.1 Registering and Unregistering the extractSDO Function

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;
/

16.3 Request and Response XML Examples

This section presents some record requests to the CSW engine, and the response to each request, for each of the following operations:

Example 16-1 is a request to get the capabilities of the CSW server named CSW at a specified namespace URL. T.his request will return a capabilities document, as explained in Section 16.2.1

Example 16-1 GetCapabilities Request

<csw:GetCapabilities service="CSW" xmlns:csw="http://www.opengis.net/cat/csw" xmlns:ows="http://www.opengis.net/ows">
    <ows:AcceptVersions>
      <ows:Version>2.0.0</ows:Version>
    </ows:AcceptVersions>
    <ows:AcceptFormats>
      <ows:OutputFormat>text/xml</ows:OutputFormat>
    </ows:AcceptFormats>
</csw:GetCapabilities>

Example 16-2 is an excerpt of the response from the request in Example 16-1.

Example 16-2 GetCapabilities Response

<Capabilities xmlns="http://www.opengis.net/cat/csw" version="2.0.0" updateSequence="0" xmlns:ows="http://www.opengis.net/ows" xmlns:ogc="http://www.opengis.net/ogc" xmlns:csw="http://www.opengis.net/cat/csw" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns0="http://www.opengis.net/cat/csw" xmlns:ns1="http://www.opengis.net/cat/csw">
  <ows:ServiceIdentification xmlns:ows="http://www.opengis.net/ows">
    <ows:ServiceType>CSW</ows:ServiceType>
    <ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
    <ows:Title>Company CSW</ows:Title>
    <ows:Abstract>
         A catalogue service that conforms to the HTTP protocol
         binding of the OpenGIS Catalogue Service specification
         version 2.0.0.
      </ows:Abstract>
    <ows:Keywords>
      <ows:Keyword>CSW</ows:Keyword>
      <ows:Keyword>Company Name</ows:Keyword>
      <ows:Keyword>geospatial</ows:Keyword>
      <ows:Keyword>catalogue</ows:Keyword>
    </ows:Keywords>
    <ows:Fees>NONE</ows:Fees>
    <ows:AccessConstraints>NONE</ows:AccessConstraints>
  </ows:ServiceIdentification>
  <ows:ServiceProvider xmlns:ows="http://www.opengis.net/ows">
    <ows:ProviderName>Company Name</ows:ProviderName>
    <ows:ProviderSite ans1:href="http://www.oracle.com" xmlns:ans1="http://www.w3.org/1999/xlink"/>
    <ows:ServiceContact>
      <ows:IndividualName> Contact Person Name</ows:IndividualName>
      <ows:PositionName>Staff</ows:PositionName>
      <ows:ContactInfo>
        <ows:Phone>
          <ows:Voice>999-999-9999</ows:Voice>
          <ows:Facsimile>999-999-9999</ows:Facsimile>
        </ows:Phone>
        <ows:Address>
          <ows:DeliveryPoint>1 Street Name</ows:DeliveryPoint>
          <ows:City>CityName</ows:City>
          <ows:AdministrativeArea>StateName</ows:AdministrativeArea>
          <ows:PostalCode>09999</ows:PostalCode>
          <ows:Country>USA</ows:Country>
          <ows:ElectronicMailAddress>
               contact.person@example.com
               </ows:ElectronicMailAddress>
        </ows:Address>
        <ows:OnlineResource ans1:href="mailto:contact.person@example.com" xmlns:ans1="http://www.w3.org/1999/xlink"/>
      </ows:ContactInfo>
    </ows:ServiceContact>
  </ows:ServiceProvider>
  <ows:OperationsMetadata xmlns:ows="http://www.opengis.net/ows">
    <ows:Operation name="GetCapabilities">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet" xmlns:ans1="http://www.w3.org/1999/xlink"/>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Operation name="DescribeRecord">
      <ows:DCP>
        <ows:HTTP>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="typeName"><ows:Value>ns0:SampleRecord</ows:Value><ows:Value>ns1:Record</ows:Value></ows:Parameter>
      <ows:Parameter name="outputFormat">
        <ows:Value>text/xml</ows:Value>
      </ows:Parameter>
      <ows:Parameter name="schemaLanguage">
        <ows:Value>XMLSCHEMA</ows:Value>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetRecords">
      <ows:DCP>
        <ows:HTTP>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="TypeName"><ows:Value>ns0:SampleRecord</ows:Value><ows:Value>ns1:Record</ows:Value></ows:Parameter>
      <ows:Parameter name="outputFormat">
        <ows:Value>text/xml </ows:Value>
      </ows:Parameter>
      <ows:Parameter name="outputSchema">
        <ows:Value>OGCCORE</ows:Value>
      </ows:Parameter>
      <ows:Parameter name="resultType">
        <ows:Value>hits</ows:Value>
        <ows:Value>results</ows:Value>
        <ows:Value>validate</ows:Value>
      </ows:Parameter>
      <ows:Parameter name="ElementSetName">
        <ows:Value>brief</ows:Value>
        <ows:Value>summary</ows:Value>
        <ows:Value>full</ows:Value>
      </ows:Parameter>
      <ows:Parameter name="CONSTRAINTLANGUAGE">
        <ows:Value>Filter</ows:Value>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetRecordById">
      <ows:DCP>
        <ows:HTTP>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="ElementSetName">
        <ows:Value>brief</ows:Value>
        <ows:Value>summary</ows:Value>
        <ows:Value>full</ows:Value>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetDomain">
      <ows:DCP>
        <ows:HTTP>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="ParameterName">
        <ows:Value>GetRecords.resultType</ows:Value>
        <ows:Value>GetRecords.outputFormat</ows:Value>
        <ows:Value>GetRecords.outputRecType</ows:Value>
        <ows:Value>GetRecords.typeNames</ows:Value>
        <ows:Value>GetRecords.ElementSetName</ows:Value>
        <ows:Value>GetRecords.ElementName</ows:Value>
        <ows:Value>GetRecords.CONSTRAINTLANGUAGE</ows:Value>
        <ows:Value>GetRecordById.ElementSetName</ows:Value>
        <ows:Value>DescribeRecord.typeName</ows:Value>
        <ows:Value>DescribeRecord.schemaLanguage</ows:Value>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="Transaction">
      <ows:DCP>
        <ows:HTTP>
          <ows:Post ans1:href="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort" xmlns:ans1="http://www.w3.org/1999/xlink"/>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Parameter name="service">
      <ows:Value>CSW</ows:Value>
    </ows:Parameter>
    <ows:Parameter name="version">
      <ows:Value>2.0.0</ows:Value>
    </ows:Parameter>
    <ows:ExtendedCapabilities>
      <ogc:Filter_Capabilities xmlns:ogc="http://www.opengis.net/ogc">
        <ogc:Spatial_Capabilities>
          <ogc:Spatial_Operators>
            <ogc:BBOX/>
            <ogc:Equals/>
            <ogc:Disjoint/>
            <ogc:Intersect/>
            <ogc:Touches/>
            <ogc:Crosses/>
            <ogc:Within/>
            <ogc:Contains/>
            <ogc:Overlaps/>
            <ogc:Beyond/>
            <ogc:DWithin/>
          </ogc:Spatial_Operators>
        </ogc:Spatial_Capabilities>
        <ogc:Scalar_Capabilities>
          <ogc:Logical_Operators/>
          <ogc:Comparison_Operators>
            <ogc:Simple_Comparisons/>
            <ogc:Like/>
            <ogc:Between/>
            <ogc:NullCheck/>
          </ogc:Comparison_Operators>
          <ogc:Arithmetic_Operators>
            <ogc:Simple_Arithmetic/>
          </ogc:Arithmetic_Operators>
        </ogc:Scalar_Capabilities>
      </ogc:Filter_Capabilities>
    </ows:ExtendedCapabilities>
  </ows:OperationsMetadata>
</Capabilities>

Example 16-3 is a request to describe the record with the type name Record for a specified namespace.

Example 16-3 DescribeRecord Request

<csw:DescribeRecord service="CSW" 
  version="2.0.0" 
  xmlns:csw="http://www.opengis.net/cat/csw" >
  <csw:TypeName targetNamespace="http://www.opengis.net/cat/csw">Record</csw:TypeName>
</csw:DescribeRecord>

Example 16-4 is the response from the request in Example 16-3. The response is an XML schema definition (XSD). See the <documentation> elements in the response for explanatory comments.

Example 16-4 DescribeRecord Response

<xsd:schema targetNamespace="http://www.opengis.net/cat/csw" elementFormDefault="qualified" version="2.0.0" id="csw-record" xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:annotation>
    <xsd:appinfo>
      <dc:identifier xmlns:dc="http://www.purl.org/dc/elements/1.1/">
      http://schemas.opengis.net/csw/2.0.0/record
      </dc:identifier>
    </xsd:appinfo>
    <xsd:documentation xml:lang="en">
    This schema defines the basic record types that are common to all CSW 
    implementations. An application profile may extend AbstractRecordType to 
    represent model-specific content.
    </xsd:documentation>
  </xsd:annotation>
  <xsd:import namespace="http://www.purl.org/dc/terms/" schemaLocation="./recdcterms.xsd"/>
  <xsd:import namespace="http://www.purl.org/dc/elements/1.1/" schemaLocation="./recdcmes.xsd"/>
  <xsd:import namespace="http://www.opengis.net/ows" schemaLocation="./owsboundingbox.xsd"/>
  <xsd:element name="AbstractRecord" type="csw:AbstractRecordType" abstract="true" id="AbstractRecord"/>
  <xsd:complexType name="AbstractRecordType" abstract="true" id="AbstractRecordType"/>
  <xsd:element name="DCMIRecord" type="csw:DCMIRecordType" substitutionGroup="csw:AbstractRecord"/>
  <xsd:complexType name="DCMIRecordType">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
      This type encapsulates all of the standard DCMI metadata terms, 
      including the Dublin Core refinements; these terms may be mapped to the 
      profile-specific information model.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="csw:AbstractRecordType">
        <xsd:sequence>
          <xsd:group ref="dct:DCMI-terms"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="BriefRecord" type="csw:BriefRecordType" substitutionGroup="csw:AbstractRecord"/>
  <xsd:complexType name="BriefRecordType">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
      This type defines a brief representation of the common record format. 
      It extends AbstractRecordType to include only the dc:identifier and 
      dc:type properties.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="csw:AbstractRecordType">
        <xsd:sequence>
          <xsd:element ref="dc:identifier"/>
          <xsd:element ref="dc:type" minOccurs="0"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="SummaryRecord" type="csw:SummaryRecordType" substitutionGroup="csw:AbstractRecord"/>
  <xsd:complexType name="SummaryRecordType">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
      This type defines a summary representation of the common record format. 
      It extends AbstractRecordType to include the core properties.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="csw:AbstractRecordType">
        <xsd:sequence>
          <xsd:choice maxOccurs="unbounded">
            <xsd:element ref="dc:identifier"/>
            <xsd:element ref="dc:type"/>
            <xsd:element ref="dc:title"/>
            <xsd:element ref="dc:subject"/>
            <xsd:element ref="dc:format"/>
            <xsd:element ref="dc:relation"/>
            <xsd:element ref="dct:modified"/>
            <xsd:element ref="dct:abstract"/>
            <xsd:element ref="dct:spatial"/>
          </xsd:choice>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Record" type="csw:RecordType" substitutionGroup="csw:AbstractRecord"/>
  <xsd:complexType name="RecordType">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
      This type extends DCMIRecordType to add ows:BoundingBox; it may be used 
      to specify a bounding envelope for the catalogued resource.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="csw:DCMIRecordType">
        <xsd:sequence>
          <xsd:element ref="ows:BoundingBox" minOccurs="0"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
</xsd:schema>

Example 16-5 is a request to get records where the contributor is equal to Raja.

Note:

Spatial Catalog Service in Oracle Database Release 11.1 supports only synchronous processing of GetRecords requests.

Example 16-5 GetRecords Request

<?xml version="1.0" ?>
<csw:GetRecords
   service="CSW"
   version="2.0.0"
   xmlns:csw="http://www.opengis.net/cat/csw"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:dc="http://www.purl.org/dc/elements/1.1/"
   xmlns:dct="http://www.purl.org/dc/terms/"
   outputFormat="text/xml"
   resultType="results" 
   outputSchema="csw:Record">
<csw:Query typeNames="csw:Record">
<csw:ElementName>/csw:Record/dc:identifier</csw:ElementName>
<csw:ElementName>/csw:Record/dc:contributor</csw:ElementName>
<csw:Constraint version="2.0.0" > 
   <ogc:Filter>
  <ogc:PropertyIsEqualTo>
    <ogc:PropertyName>/csw:Record/dc:contributor</ogc:PropertyName>
    <ogc:Literal>Raja</ogc:Literal>
  </ogc:PropertyIsEqualTo>
   </ogc:Filter>
</csw:Constraint> 
</csw:Query>
</csw:GetRecords>

Example 16-6 is the response from the request in Example 16-5.

Example 16-6 GetRecords Response

<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xsi:schemaLocation="http://www.opengis.net/cat/csw http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet?recordTypeId=1 " version="2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <csw:RequestId>4</csw:RequestId>
   <csw:SearchStatus status="complete"/>
   <csw:SearchResults recordSchema="http://www.opengis.net/cat/csw" numberOfRecordsMatched="1" numberOfRecordsReturned="1" nextRecord="0" expires="2007-02-09T16:32:35.29Z">
      <csw:Record xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:ows="http://www.opengis.net/ows" xmlns:dct="http://www.purl.org/dc/terms/">
         <dc:contributor xmlns:dc="http://www.purl.org/dc/elements/1.1/" scheme="http://www.example.com">Raja</dc:contributor>
         <dc:identifier xmlns:dc="http://www.purl.org/dc/elements/1.1/">REC-1</dc:identifier>
      </csw:Record>
   </csw:SearchResults>
</csw:GetRecordsResponse>

Example 16-7 is a request to get domain information related to a record type.

Example 16-7 GetDomain Request

<csw:GetDomain service="CSW" 
   version="2.0.0" 
   xmlns:csw="http://www.opengis.net/cat/csw" >
   <csw:ParameterName>GetRecords.resultType</csw:ParameterName>
</csw:GetDomain>

Example 16-8 is the response from the request in Example 16-7.

Example 16-8 GetDomain Response

<csw:GetDomainResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/">
   <csw:DomainValues type="csw:SampleRecord">
      <csw:ParameterName>GetRecords.resultType</csw:ParameterName>
      <csw:ListOfValues>
         <csw:Value>hits</csw:Value>
         <csw:Value>results</csw:Value>
         <csw:Value>validate</csw:Value>
      </csw:ListOfValues>
   </csw:DomainValues>
   <csw:DomainValues type="csw:Record">
      <csw:ParameterName>GetRecords.resultType</csw:ParameterName>
      <csw:ListOfValues>
         <csw:Value>hits</csw:Value>
         <csw:Value>results</csw:Value>
         <csw:Value>validate</csw:Value>
      </csw:ListOfValues>
   </csw:DomainValues>
</csw:GetDomainResponse>

Example 16-9 is a request to get the record with the record ID value REC-1.

Example 16-9 GetRecordById Request

<?xml version="1.0" ?>
<csw:GetRecordById
   service="CSW"
   version="2.0.0"
   xmlns:csw="http://www.opengis.net/cat/csw"
   xmlns:ogc="http://www.opengis.net/ogc" >
<csw:Id> REC-1 </csw:Id>
<csw:ElementSetName>brief</csw:ElementSetName>
</csw:GetRecordById>

Example 16-10 is the response from the request in Example 16-9.

Example 16-10 GetRecordById Response

<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xsi:schemaLocation="http://www.opengis.net/cat/csw http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet?recordTypeId=2 http://www.opengis.net/cat/csw http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet?recordTypeId=1 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <csw:BriefRecord xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:ows="http://www.opengis.net/ows" xmlns:dct="http://www.purl.org/dc/terms/">
      <dc:identifier xmlns:dc="http://www.purl.org/dc/elements/1.1/">REC-1</dc:identifier>
   </csw:BriefRecord>
</csw:GetRecordByIdResponse>

Example 16-11 is a request to insert a record for contributor John. The record has an ID value of REC-2, and has the spatial attribute of the specified bounding box (optimized rectangle: lower-left and upper-right coordinates).

Example 16-11 Insert Request

<csw:Transaction service="CSW" 
   version="2.0.0" 
   xmlns:csw="http://www.opengis.net/cat/csw" >
  <csw:Insert>
    <Record xmlns="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" >
       <dc:contributor scheme="http://www.example.com">John</dc:contributor>
       <dc:identifier >REC-2</dc:identifier>
       <ows:WGS84BoundingBox crs="urn:opengis:crs:OGC:2:84" dimensions="2">
               <ows:LowerCorner>12 12</ows:LowerCorner>
               <ows:UpperCorner>102 102</ows:UpperCorner>
       </ows:WGS84BoundingBox>
    </Record>
  </csw:Insert>
</csw:Transaction>

Example 16-12 is the response from the request in Example 16-11.

Example 16-12 Insert Response

<csw:TransactionResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xsi:schemaLocation="http://www.opengis.net/cat/csw http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet?recordTypeId=1 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <csw:TransactionSummary>
      <csw:totalInserted>1</csw:totalInserted>
   </csw:TransactionSummary>
</csw:TransactionResponse>

Example 16-13 is a request to update the contributor value to Jane in the record where the current contributor value is John (that is, change the value from John to Jane).

Example 16-13 Update Request

<csw:Transaction service="CSW" 
   version="2.0.0" 
   xmlns:csw="http://www.opengis.net/cat/csw" 
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:dc="http://www.purl.org/dc/elements/1.1/">
  <csw:Update>
    <csw:RecordProperty>
      <csw:Name>/csw:Record/dc:contributor</csw:Name>
      <csw:Value>Jane</csw:Value>
    </csw:RecordProperty>
    
    <csw:Constraint version="2.0.0">
      <ogc:Filter>
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>/csw:Record/dc:contributor</ogc:PropertyName>
          <ogc:Literal>John</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:Filter>
    </csw:Constraint>
    
  </csw:Update>
</csw:Transaction>

Example 16-14 is the response from the request in Example 16-13.

Example 16-14 Update Response

<csw:TransactionResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/">
   <csw:TransactionSummary>
      <csw:totalUpdated>1</csw:totalUpdated>
   </csw:TransactionSummary>
</csw:TransactionResponse>

Example 16-15 is a request to delete the record where the contributor value is equal to Jane.

Example 16-15 Delete Request

<csw:Transaction service="CSW" 
   version="2.0.0" 
   xmlns:csw="http://www.opengis.net/cat/csw" 
   xmlns:dc="http://www.purl.org/dc/elements/1.1/"
   xmlns:ogc="http://www.opengis.net/ogc">
  <csw:Delete typeName="csw:Record">
    <csw:Constraint version="2.0.0">
      <ogc:Filter>
        <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>/csw:Record/dc:contributor</ogc:PropertyName>
            <ogc:Literal>Jane</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:Filter>
    </csw:Constraint>
  </csw:Delete>
</csw:Transaction>

Example 16-16 is the response from the request in Example 16-15.

Example 16-16 Delete Response

<csw:TransactionResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/">
   <csw:TransactionSummary>
      <csw:totalDeleted>1</csw:totalDeleted>
   </csw:TransactionSummary>
</csw:TransactionResponse>

16.4 Java API for CSW Administration

In addition to the PL/SQL APIs in the SDO_CSW_PROCESS package, you can use a Java API to publish and drop record types, and to grant and revoke access to record types and CSW metadata tables.

This section provides basic reference information about the methods in the oracle.spatial.csw.CSWAdmin class. The methods are presented in alphabetical order.

16.4.1 createXMLTableIndex method

The createXMLTableIndex method creates an index of XDB.XMLINDEX on record type instances. This method has the following format:

public static void createXMLTableIndex(
    OracleConnection conn, 
    String typeNS, 
    String typeName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

16.4.2 deleteDomainInfo method

The deleteDomainInfo method deletes domain information related to the record type. This method has the following format:

public static void deleteDomainInfo(
    OracleConnection conn, 
    int recordTypeId, 
    String parameterName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

recordTypeId is the ID of the record type.

parameterName is the name of the domain parameter to be deleted.

16.4.3 deleteRecordViewMap method

The deleteRecordViewMap method deletes information related to record view transformation. This method has the following format:

public static void deleteRecordViewMap(
    OracleConnection conn, 
    String recordTypeNS, 
    String viewSrcName, 
    String targetTypeName, 
    String  mapType) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

recordTypeNS is the URL of the namespace of the record type.

viewSrcName is the name of the source of the record type.

targetTypeName is the name of the destination of the record type.

mapType is the map type (brief, summary, and so on).

16.4.4 disableVersioning method

The disableVersioning method disables versioning for a record type. This method has the following format:

public static void disableVersioning(
    OracleConnection conn, 
    String rtNSUrl, 
    String rtName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

rtNSUrl is the URL of the namespace of the record type.

rtName is the name of the record type.

16.4.5 dropRecordType method

The dropRecordType method deletes a record type from the CSW repository. This method has the following format:

public static void dropRecordType(
    OracleConnection conn, 
    String rtNSUrl, 
    String rtName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

rtNSUrl is the URL of the namespace of the record type.

rtName is the name of the record type.

16.4.6 dropXMLTableIndex method

The dropXMLTableIndex method drops an index of type XDB.XMLINDEX that was created on record type instances. This method has the following format:

public static void dropXMLTableIndex(
    OracleConnection conn, 
    String typeNS, 
    String typeName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

16.4.7 enableVersioning method

The enableVersioning method enables versioning for a record type. This method has the following format:

public static void enableVersioning(
    OracleConnection conn, 
    String rtNSUrl, 
    String rtName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

rtNSUrl is the URL of the namespace of the record type.

rtName is the name of the record type.

16.4.8 getIsXMLTableIndexCreated method

The getIsXMLTableIndexCreated method returns a Boolean TRUE if an index of type XDB.XMLINDEX has been created on a record type, or a Boolean FALSE if such an index has not been created. This method has the following format:

public static boolean getIsXMLTableIndexCreated(
    OracleConnection conn, 
    String typeNS, 
    String typeName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

16.4.9 getRecordTypeId method

The getRecordTypeId method returns the record type ID for a specified combination of namespace and record type. This method has the following format:

public static boolean getIRecordTypeId(
    OracleConnection conn, 
    String typeNamespace, 
    String typeName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNamespace is the URL of the namespace of the record type.

typeName is the name of the record type.

16.4.10 grantMDAccessToUser method

The grantMDAccessToUser method grants access to the CSW metadata to a database user. This method has the following format:

public static void grantMDAccessToUser(
    OracleConnection conn, 
    String usrName)  throws SQLException;
 

conn is an Oracle Database connection for a user that has been granted the DBA role.

usrName is the name of the database user.

16.4.11 grantRecordTypeToUser method

The grantRecordTypeToUser method grants access to a record type to a database user. This method has the following format:

public static void grantRecordTypeToUser(
    OracleConnection conn, 
    String typeNS, 
    String typeName, 
    String usrName)  throws SQLException;
 

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

usrName is the name of the database user.

16.4.12 publishRecordType method

The publishRecordType method publishes a record type; that is, it registers metadata related to the record type. This method has the following formats:

public static void publishRecordType(OracleConnection conn, 
     XMLType recordTypeMD) throws SQLException , CSWException;
 
public static void publishRecordType(OracleConnection conn,
     String typeNS,
     String typeName,
     ArrayList<String> idPaths,
     ArrayList<PathInfo> spatialPaths,
     ArrayList<PathInfo> tsPaths,
     XMLType schemaDoc,
     XMLType briefXSLPattern,
     XMLType summaryXSLPattern,
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths,
     String idExtractorType, 
     ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias) throws SQLException ;
 
public static void publishRecordType(OracleConnection conn, 
     String typeNS, 
     String typeName, 
     ArrayList<String> idPaths, 
     ArrayList<PathInfo> spatialPaths, 
     ArrayList<PathInfo> tsPaths, 
     XMLType schemaDoc, 
     XMLType briefXSLPattern, 
     XMLType summaryXSLPattern, 
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths, 
     String idExtractorType, 
     ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias,
     String rtXSDRefId,
     boolean genSpatialIndex,
     boolean setDomainInfo,
     Hashtable<String, ArrayList<String>> domainInfo,
     boolean setRecordViewMap,
     ArrayList<ArrayList<Object>> recordViewMap) throws SQLException ;
 
public static void publishRecordType(OracleConnection conn, 
     String typeNS, 
     String typeName, 
     ArrayList<String> idPaths, 
     ArrayList<PathInfo> spatialPaths, 
     ArrayList<PathInfo> tsPaths, 
     XMLType schemaDoc, 
     XMLType briefXSLPattern, 
     XMLType summaryXSLPattern, 
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths, 
     String idExtractorType, 
     ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias,
     String rtXSDRefId,
     boolean genSpatialIndex,
     boolean setDomainInfo,
     Hashtable<String, ArrayList<String>> domainInfo,
     boolean setRecordViewMap, 
     ArrayList<ArrayList<Object>> recordViewMap,
     ArrayList<PathInfo> numPaths,
     ArrayList<PathInfo> idxPaths,
     ArrayList<String[]> idxPathTypes, 
     boolean genXMLIndex) throws SQLException ;
 
public static void publishRecordType(OracleConnection conn, 
     String typeNS, 
     String typeName, 
     ArrayList<String> idPaths, 
     ArrayList<PathInfo> spatialPaths, 
     ArrayList<PathInfo> tsPaths, 
     XMLType schemaDoc, 
     XMLType briefXSLPattern, 
     XMLType summaryXSLPattern, 
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths, 
     String idExtractorType, ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias,
     String rtXSDRefId,
     boolean genSpatialIndex,
     boolean setDomainInfo,
     Hashtable<String, ArrayList<String>> domainInfo,
     boolean setRecordViewMap, 
     ArrayList<ArrayList<Object>> recordViewMap,
     ArrayList<PathInfo> numPaths,
     ArrayList<PathInfo> idxPaths,
     ArrayList<String[]> idxPathTypes, 
     boolean genXMLIndex, 
     boolean isGML3) throws SQLException ;
 
public static void publishRecordType(OracleConnection conn, 
     String typeNS, 
     String typeName, 
     ArrayList<String> idPaths, 
     ArrayList<PathInfo> spatialPaths, 
     ArrayList<PathInfo> tsPaths, 
     XMLType schemaDoc, 
     XMLType briefXSLPattern, 
     XMLType summaryXSLPattern, 
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths, 
     String idExtractorType, 
     ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias,
     String rtXSDRefId,
     boolean genSpatialIndex,
     boolean setDomainInfo,
     Hashtable<String, ArrayList<String>> domainInfo,
     boolean setRecordViewMap, 
     ArrayList<ArrayList<Object>> recordViewMap,
     ArrayList<PathInfo> numPaths,
     ArrayList<PathInfo> idxPaths,
     ArrayList<String[]> idxPathTypes,
     boolean genXMLIndex,
     boolean isGML3,
     CollectionPathInfo collPathInfo) throws SQLException;
 
public static void publishRecordType(OracleConnection conn, 
     String typeNS, 
     String typeName, 
     ArrayList<String> idPaths, 
     ArrayList<PathInfo> spatialPaths, 
     ArrayList<PathInfo> tsPaths, 
     XMLType schemaDoc, 
     XMLType briefXSLPattern, 
     XMLType summaryXSLPattern, 
     XMLType dcmiXSLPattern,
     ArrayList<String> srsPaths, 
     String idExtractorType,
     ArrayList<GeomMetaInfo> sdoMetaInfo,
     String srsNS, String srsNSAlias,
     String rtXSDRefId,
     boolean genSpatialIndex,
     boolean setDomainInfo,
     Hashtable<String, ArrayList<String>> domainInfo,
     boolean setRecordViewMap, 
     ArrayList<ArrayList<Object>> recordViewMap,
     ArrayList<PathInfo> numPaths,
     ArrayList<PathInfo> idxPaths,
     ArrayList<String[]> idxPathTypes,
     boolean genXMLIndex,
     boolean isGML3,
     CollectionPathInfo collPathInfo,
     boolean hasMultipleSRSNS) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

recordTypeMD is the record type registration metadata. This metadata must conform to the recordTypeMd element definition as specified in the wstype_md.xsd file. Examples of record type path registration metadata XML are provided in rt_metadata1.xml and rt_metadata2.xml. These files are included in the ws_client.jar demo file (described in Section 10.4) under the src/data/ path. For information about using the examples to publish record types, see the Readme.txt file, which is included in ws_client.jar under the src/ path.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

idPaths is a list of record ID path elements where each element is a String.

spatialPaths is a list of spatial paths in the record type. It is an ArrayList of class oracle.spatial.ws.PathInfo, which is described in Section 16.4.12.1.

tsPaths is a list of time-related paths in the record type (for example, date, dateTime, gYear, gMonth, gDay, gMonthDay, and gYearMonth). It is an ArrayList of class oracle.spatial.ws.PathInfo, which is described in Section 16.4.12.1.

schemaDoc is the XML schema definition (XSD) of the record type.

briefXSLPattern is the XSLT mapping for transforming the record structure from full to brief format.

summaryXSLPattern is the XSLT mapping for transforming the record structure from summary to brief format.

dcmiXSLPattern is the XSLT mapping for transforming the record structure from dcmi to brief format.

srsPaths is a list of paths representing spatial reference system information.

idExtractorType is Identifier extractor method information (XPATH, USER_FUNC, or NONE). XPATH means that the record identifier will be extracted using an XPath as specified in the idPaths parameter. USER_FUNC means that the record identifier will be extracted by a user-defined function invocation, as specified in the idPaths parameter, to which the entire record document instance will be passed. NONE means that the record identifier will be a system-generated identifier.

sdoMetaInfo is the spatial metadata information for spatial paths. It is an ArrayList of class oracle.spatial.ws.GeomMetaInfo, which is described in Section 16.4.12.1.

srsNS is the user-defined namespace of the spatial reference system (coordinate system) associated with the data in the spatial paths.

srsNSAlias is the namespace alias of the spatial reference system (coordinate system) associated with the data in the spatial paths.

rtXSDRefId is the group record type XML schema definition file name (as a string), for cases where multiple record types are defined in a single XSD file. This parameter is used to store the group XSD definition once in the CSW metadata, and then refer to it from multiple record types whose schema definitions are present in the group record type XSD file.

genSpatialIndex is a Boolean value: TRUE causes a spatial index to be created on the record type at type creation time; FALSE does not cause a spatial index to be created.

setDomainInfo is a Boolean value: TRUE causes domain information for this record type to be set at type creation time; FALSE does not cause domain information for this record type to be set.

domainInfo is domain information.

setRecordViewMap is a Boolean value: TRUE causes the record view transformation map to be set at type creation time; FALSE does not cause the record view transformation map to be set.

recordViewMap is the record view transformation map information (brief to full, summary to full, and dcmi to full). It is of type ArrayList<ArrayList<Object>> where the content of each ArrayList<Object> is: Object[0] = (String) recordTypeNS, Object[1] = (String) viewSrcName, Object[2] = (String) targetTypeName, Object[3]= (oracle.xdb.XMLType) mapInfo, Object[4] = (String) mapType

numPaths is a list of numeric (NUMBER, INTEGER, and so on) related paths in the record type. It is an ArrayList of class oracle.spatial.ws.PathInfo, which is described in Section 16.4.12.1.

idxPaths is the index path list. It is list of paths on which to create an index of type XDB.XMLINDEX when that index is created. It is an ArrayList of class oracle.spatial.ws.PathInfo, which is described in Section 16.4.12.1.

idxPathTypes specifies information about each index path, where each element of string[3] contains the following: string[0] is the type name, string[1] is the type format (such as the type length), and string[2] specifies whether a Btree or unique index, or no index, should be created (CSWAdmin.BTREE, CSWAdmin.UNIQUE, or null).

genXMLIndex is a Boolean value: TRUE causes an index of type XDB.XMLINDEX to be created on the document-based record type; FALSE does not cause an index of type XDB.XMLINDEX to be created on the document-based record type. If you choose not to create the index now, you can create it later using the createXMLTableIndex method (described in Section 16.4.1).

isGML3 is a Boolean value: TRUE means that the geometries inside instances of this record type are GML3.1.1 compliant; FALSE means that the geometries inside instances of this record type are GML 2.1.2 compliant.

collPathInfo is spatial collection path information.

hasMultipleSRSNS is a Boolean value: TRUE means that this record type refers to multiple user-defined spatial reference system namespaces; FALSE means that this record type does not refer to multiple user-defined spatial reference system namespaces.

16.4.12.1 Related Classes for publishRecordType

This section describes some classes used in the definition of parameters of the publishRecordType method.

oracle.spatial.ws.PathElement is a Java class that contains a pair of String objects: the PathElement namespace am the PathElement name. This class includes the getValue() method, which returns a string format of the PathElement object. This class has the following format:

public class PathElement {
// Set namespace and name information for a PathElement.
        public void set(String ns, String name);
 //Get a string value for the PathElement object.
        public String getValue() ;
}

oracle.spatial.ws.Path is a Java class that contains an ordered list of PathElement objects that constitute the path. For example, if an XPath is myns:A/myns:B, then myns:A and myns:B are PathElement objects. This class includes the getValue() method, which returns a string format of the Path object. This class has the following format:

public class Path {
//Add a PathElement.
        public void add(PathElement p) ;
//Get a string Value for the Path object.
        public String getValue() ;
}

oracle.spatial.ws.PathInfo is a container class that contains information about a path or list of paths, including their association and metadata information. This class has the following format:

public class PathInfo {
 
 // Set number of occurrences for the Path. Default value is 1. Number of 
 // occurrences > 1 in case of arrays.
        public void setNumOfOccurrences(int i) ;
 
 // Get number of occurrences for the Path.
        public int getNumOfOccurrences();
 
 // Add a path, in case PathInfo has multiple paths associated via a 
 // choice association
        public void addPath(Path p) ;
 
  // Add path type information. This is relevant for time-related Paths
  // (for example, date, dateTime, gDay, gMonth, gYear, gMonthDay, 
  // gYearMonth, duration, or time).
        public void addPathType(String t) ;
 
  // Add a PathInfo type. This can be PathInfo.CHOICE or 
  // PathInfo.DEFAULT or PathInfo.COLLECTION.
  // PathInfo.CHOICE - means that the list of paths  in this PathInfo are
  // related to each other via choice association. For example, we may have
  // a list of Spatial Paths, which are associated with one another via choice.
  // So, only one of these path can occur in a feature instance/document.
  // PathInfo.COLLECTION - means the list of paths in this PathInfo are part 
  // of a collection (currently spatial collections are 
  // supported) which will be indexed.
  // Default value is PathInfo.DEFAULT for one Path or a finite array Paths.
  //  @param t PathInfo type information. PathInfo.CHOICE or 
  // PathInfo.DEFAULT or PathInfo.COLLECTION
        public void addPathInfoType(int t) ;
 
 //  Returns a  string representation for PathInfo content.
        public String getPathContent() ;
 
 // Returns Path type information (for example, date, dateTime, gDay, gMonth, 
 // gYear, gMonthDay, gYearMonth, duration, or time).
        public String getPathType() ;
 
 // Returns a  string representation for PathInfo path content.
 // param i The index of the path in the PathInfo whose path content needs to
 // be returned
 // @return a  string representation for PathInfo path content
        public String getCollectionPathContent(int i);
 
 // Returns number of paths in the PathInfo. 
 // @return number of paths in the PathInfo which is of type PathInfo.COLLECTION
 // if PathInfo is not of type PathInfo.COLLECTION returns -1
        public int getCollectionPathContentSize();
}

oracle.spatial.ws.CollectionPathInfo is a container class that contains information about a collection of PathInfo objects. Each PathInfo object in this collection, represents a group of spatial paths that will be indexed and searched on. This class will be used to register paths referring to spatial collection-based content in feature and record types. This class has the following format:

public class CollectionPathInfo {
 
  /**
   * Add a PathInfo.
   * @param p PathInfo to be added 
   * @param g geometry related metadata for PathInfo to be added 
   */
  public void addPathInfo(PathInfo p, GeomMetaInfo g) ;
 
  /**
   * Get a PathInfo.
   * @param i index of the PathInfo to be retrieved
   */
  public PathInfo getPathInfo(int i) ;
  /**
   * Get geometry related metadata for a certain PathInfo.
   * @param i index of the PathInfo whose geomMetaInfo is to be retrieved
  */
        public GeomMetaInfo getGeomMetaInfo(int i) ;
 
  /**
   * Get all PathInfo objects in this CollectionPathInfo.
   */
        public ArrayList<PathInfo> getPathInfos() ;
}

oracle.spatial.ws.GeomMetaInfo is a class that contains dimension-related information corresponding to a spatial path in a record type. This information includes the dimension name, the lower and upper bounds, the tolerance, and the coordinate system (SRID). This class has the following format:

public class GeomMetaInfo {
 
  // Default constructor. Creates a GeomMetaInfo object with number of 
  // dimensions equal to 2.
        public GeomMetaInfo() ;
 
  // Creates a GeomMetaInfo object of a specified number of dimensions.
  // Parameter numOfDimensions is the number of dimensions represented
  // in the GeomMetaInfo object.
  // Note: max number of dimensions supported is 4.
        public GeomMetaInfo(int numOfDimensions)  throws  
        ArrayIndexOutOfBoundsException ;
 
  //Set Dimension Name.
  // Parameter index represents the dimension index which needs to be set.
  // Parameter val is dimension name value.
        public void setDimName(int index, String val) throws
        ArrayIndexOutOfBoundsException ;
 
  // Set Dimension Lower Bound.
  // Parameter index represents the dimension index which needs to be set.
  // Parameter val is dimension lower bound value.
        public void setLB(int index, double val) throws 
        ArrayIndexOutOfBoundsException ;
 
  // Set Dimension Upper Bound
  // Parameter index represents the dimension index which needs to be set.
  // Parameter val is dimension upper bound value
        public void setUB(int index, double val) throws 
        ArrayIndexOutOfBoundsException ;
 
  // Set Dimension tolerance value.
  // Parameter index represents the dimension index which needs to be set.
  // Parameter  val is dimension tolerance value.
        public void setTolerance(int index, double val) throws 
        ArrayIndexOutOfBoundsException ;
 
  // Set Coordinate Reference System Identifier
        public void setSRID (int val) ;
 
  // Get dimension Name.
  // Parameter index represents the dimension index whose name needs to be 
  // returned. This method returns the dimension name for the given index.
        public String getDimName(int index) throws 
        ArrayIndexOutOfBoundsException ;
 
  // Get dimension lower bound.
  // Parameter index represents the dimension index whose lower bound needs
  //  to be returned.
  // This method returns the lower bound for the given index.
        public double getLB(int index) throws ArrayIndexOutOfBoundsException ;
 
  // Get dimension upper bound.
  // Parameter index represents the dimension index whose upper bound needs 
  // to be returned.
  // This method returns the upper bound for the given index.
        public double getUB(int index) throws ArrayIndexOutOfBoundsException ;
 
  // Get dimension tolerance.
  // Parameter index represents the dimension index whose tolerance needs 
  // to be returned.
  // This method returns the tolerance value for the given index.
        public double getTolerance(int index) throws
        ArrayIndexOutOfBoundsException ;
 
  // Get coordinate system (spatial reference system) identifier.
        public int getSRID () ;
 
  // Get number of dimensions represented by this GeomMetaInfo object.
        public int getNumOfDimensions() ;
 
  // Sets the spatial index dimension parameter. By default it is 2.
  // return  Coordinate Reference System Identifier value
        public int setSpatialIndexDimension(int d) ;
 
  // Get the spatial index dimension parameter.
  // return  number of dimensions
        public int getSpatialIndexDimension() ;
 
  // Sets the user spatial srs namespace referred to by this GeomMetaInfo object. 
  // Needs to be specified if multiple srs namespace are referred to within 
  // the same feature or record type.
        public void setSRSNS(String s) ;
 
  // Gets the user defined spatial srs namespace referred to by 
  // this GeomMetaInfo object.
        public String getSRSNS() ;
 
  // Sets the user defined spatial srs namespace alias referred to 
  // by this GeomMetaInfo object.
        public void setSRSNSAlias (String s) ;
 
  // Gets the user defined spatial srs namespace  alias 
  // referred to by this  GeomMetaInfo object.
        public String getSRSNSAlias () ;
}

16.4.13 registerTypePluginMap method

The registerTypePluginMap method registers a plugin for processing and extracting spatial content for a record type. This method has the following format:

public static boolean registerTypePluginMap(
    OracleConnection conn, 
    String typeNamespace, 
    String typeName,
    String packageName) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

packageName is the name of the PL/SQL package object for the plugin (for example, scott.my_plugin_pkg).

16.4.14 revokeMDAccessFromUser method

The revokeMDAccessFromUser method revokes access to the CSW metadata from a database user. This method has the following format:

public static void revokeMDAccessFromUser(
    OracleConnection conn, 
    String usrName)  throws SQLException;
 

conn is an Oracle Database connection for a user that has been granted the DBA role.

usrName is the name of the database user.

16.4.15 revokeRecordTypeFromUser method

The revokeRecordTypeFromUser method revokes access to a record type from a database user. This method has the following format:

public static void revokeRecordTypeFromUser(
    OracleConnection conn, 
    String typeNS, 
    String typeName, 
    String usrName)  throws SQLException;
 

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

typeName is the name of the record type.

usrName is the name of the database user.

16.4.16 setCapabilitiesInfo method

The setCapabilitiesInfo method populates the capabilities related information. (For information about capabilities documents, see Section 16.2.1.) This method has the following format:

public static void setCapabilitiesInfo(OracleConnection conn,
   XMLType capabilitiesTemplate) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

capabilitiesTemplate is the Catalog services capabilities document.

16.4.17 setDomainInfo method

The setDomainInfo method sets domain information related to the record type. This method has the following format:

public static void setDomainInfo(OracleConnection conn,
   int recordTypeId,
   String propertyName,
   String parameterName,
   ArrayList<String> values) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

recordTypeId is the ID of the record type.

propertyName is the name of a domain property.

parameterName is the name of a domain parameter.

values specifies values for the domain parameter.

16.4.18 setRecordViewMap method

The setRecordViewMap method populates information related to record view transformation (for example, from BriefRecord to Record). This method has the following format:

public static void setRecordViewMap(OracleConnection conn,
   String recordTypeNS,
   String viewSrcName,
   String targetTypeName,
   oracle.xdb.XMLType mapInfo,
   String  mapType) throws SQLException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

recordTypeNS is the URL of the namespace of the record type.

viewSrcName is the name of the source of the record type.

targetTypeName is the name of the destination of the record type.

mapInfo is the XSLT definition of the mapping.

mapType is the map type (brief, summary, and so on).

16.4.19 setXMLTableIndexInfo method

The setXMLTableIndexInfo method updates the XMLTableIndex index information for a record type, with the option of creating the index. This method has the following format:

Note:

If the XMLTableIndex index already exists, you must drop it (using the dropRecordType method) before you call the setXMLTableIndexInfo method.
public static void setXMLTableIndexInfo(OracleConnection conn,
   String typeNS,
   String ftName,
   ArrayList<PathInfo> idxPaths,
   ArrayList<String[]> idxPathTypes,
   boolean genXMLIndex) throws SQLException , CSWException;

conn is an Oracle Database connection for a user that has been granted the DBA role.

typeNS is the URL of the namespace of the record type.

ftName is the name of the record type.

idxPaths is the index path list. It is list of paths on which to create an index of type XMLTABLEINDEX when that index is created. It is an ArrayList of class oracle.spatial.ws.PathInfo, which is described in Section 16.4.12.1.

idxPathTypes specifies information about each index path, where each element of string[3] contains the following: string[0] is the type name, string[1] is the type format (such as the type length), and string[2] specifies whether a Btree or unique index, or no index, should be created (CSWAdmin.BTREE, CSWAdmin.UNIQUE, or null).

genXMLIndex is a Boolean value: TRUE causes an index of type XDB.XMLINDEX to be created on the record type; FALSE does not cause an index of type XDB.XMLINDEX to be created on the record type. If you choose not to create the index now, you can create it later using the createXMLTableIndex method (described in Section 16.4.1).