oracle.jcr.nodetype

## Interface OracleNodeTypeManager

All Superinterfaces:
  NodeTypeManager

    public interface OracleNodeTypeManager
    extends NodeTypeManager

OracleNodeTypeManager allows discovery of JCR node types.

For the XML DB Content Connector, OracleNodeTypeManager also allows XML schemas to be registered for use in JCR. Doing so creates JCR node types corresponding to the schema types and global element declarations defined by the XML schema. Schema-based content and metadata will then be exposed as JCR nodes of these node types, instead of the nt:unstructured node type.

Before a schema is registered for use in JCR, it should be registered for use in the database using the `DBMS_XMLSCHEMA.registerschema` PL/SQL procedure. Only globally-registered schemas can be used in JCR.

The list of registered XML schemas is cached by the OracleNodeTypeManager object. The cache is automatically refreshed each time `registerXMLSchema` or `unregisterXMLSchema` is called on the OracleNodeTypeManager object. Call `refresh` to explicitly refresh the cache.

Refer to XDBRepositoryConfiguration for further information on how the list of registered XML schemas is stored by the XML DB Content Connector.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `refresh()` Invalidates the in-memory copy of the node type registry and reloads it from the content repository.
`void` `registerXMLSchema(java.lang.String schemaLocation, java.lang.String jcrNodeTypeNamespace)` Registers the XML Schema having the specified schema location URL.
`void` `unregisterXMLSchema(java.lang.String schemaLocation)` Unregisters the XML Schema having the specified schema location URL.

### Methods inherited from interface javax.jcr.nodetype.NodeTypeManager

`getAllNodeTypes, getMixinNodeTypes, getNodeType, getPrimaryNodeTypes`

### Method Detail

#### refresh

    void refresh()
          throws RepositoryException

Invalidates the in-memory copy of the node type registry and reloads it from the content repository.

Throws:
  `RepositoryException` - if the operation fails

#### registerXMLSchema

    void registerXMLSchema(java.lang.String schemaLocation,
                           java.lang.String jcrNodeTypeNamespace)
                    throws AccessDeniedException,
                           RepositoryException

Registers the XML Schema having the specified schema location URL.

If the schema is already registered, the JCR node type namespace is updated to the value specified.

Parameters:
  `schemaLocation` - the schema location; required
  `jcrNodeTypeNamespace` - the namespace into which to create JCR node types, or null to use the target namespace of the schema
Throws:
  `AccessDeniedException` - if the session does not have sufficient privileges to perform the operation
  `RepositoryException` - if the operation otherwise fails

#### unregisterXMLSchema

    void unregisterXMLSchema(java.lang.String schemaLocation)
                      throws AccessDeniedException,
                             RepositoryException

Unregisters the XML Schema having the specified schema location URL.

Parameters:
  `schemaLocation` - the schema location; required
Throws:
  `AccessDeniedException` - if the session does not have sufficient privileges to perform the operation
  `RepositoryException` - if the operation otherwise fails

Copyright © 2003, 2017, Oracle and/or its affiliates. All rights reserved.