23.3 SDO_CSW.INITIALIZE_CSW

Format

SDO_CSW.INITIALIZE_CSW(
    owner          IN VARCHAR2, 
    csw_version    IN VARCHAR2, 
    csw_xsd_id     IN NUMBER, 
    csw_table_name IN VARCHAR2, 
    srid           IN NUMBER, 
    generate_index IN NUMBER);

Description

Initializes the Oracle Spatial Catalog Services for the Web (CSW) version 2.0.2 service database instance. This makes the schema of the current user the CSW schema, creates the CSW catalog table if it does not already exist, and prepares the indexes, as explained in the Usage Notes.

Parameters

owner

Name of the database schema to own the created table and indexes.

csw_version

CSW version number. Example: 2.0.2.

csw_xsd_id

ID of the XSD in the MDSYS.SDO_XSD_TABLE table. Possible values: 1 for DCMI, 2 for ISO 19139.

csw_table_name

Name of the table to hold the CSW catalog data.

srid

The coordinate system (or SRID: spatial reference system) associated with the CSW data. It should be the SRID in the geometry column of the CSW table. Example: 4326 (EPSG SRID value equivalent to Oracle SRID 8307).

You can specify a 2D or 3D SRID value, but the geometry column of the CSW table must have the appropriate number of dimensions for the specified SRID.

generate_index

Determines whether to build indexes on the data in the csw_table_name table. 0 (zero) does not create any indexes on the table; 1 (or any positive nonzero value) builds all appropriate indexes on the table.

Usage Notes

This procedure lets you create the user table, specify an SRID value for the data, and control whether indexes are built on that table. It also populates the CSW metadata in the USER_CSW_SERVICE_INFO view to register the schema as the CSW schema. If owner.csw_table_name does not already exist, this procedure creates that table with the following columns:

(Metadata_Id          VARCHAR(4000) PRIMARY KEY,
 Record_Instance_Xml  XMLType,
 Record_Geometry      SDO_GEOMETRY,
 XMLTYPE COLUMN       Record_Instance_Xml STORE AS BINARY XML)

If the CSW catalog table (and any indexes) already exist, then this procedure can also be used just to register the CSW catalog table by setting SRID parameter to NULL and GENERATE_INDEX parameter to 0. It then only populates the CSW metadata in the USER_CSW_SERVICE_INFO view to register the schema as the CSW schema.

For information about support for Catalog Services for the Web, see Catalog Services for the Web (CSW) Support.

Examples

The following example uses the first format of the procedure. It makes SCOTT the CSW schema, associates SRID 4326 with the spatial data, and builds indexes on the data in the MY_CSW_CATALOG_TABLE table.

DECLARE
BEGIN
sdo_csw.initialize_csw(
        'SCOTT',
        '2.0.2', -- must be 2.0.2
        1, -- for DCMI
        'MY_CSW_CATALOG_TABLE',
        4326,
        1
    );
END;
/