Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.config.xml
Interface NamespaceHandler

All Known Implementing Classes:
AbstractNamespaceHandler, CacheConfigNamespaceHandler

public interface NamespaceHandler

A NamespaceHandler is responsible for defining the DocumentPreprocessor, ElementProcessors and AttributeProcessors required for processing xml content belonging to a specific xml namespace used in an xml document.

Since:
Coherence 12.1.2
Author:
bo 2011.06.14
See Also:
DocumentPreprocessor, ElementProcessor, AttributeProcessor, DocumentProcessor, AbstractNamespaceHandler

Method Summary
 AttributeProcessor getAttributeProcessor(XmlAttribute attribute)
          Obtains the AttributeProcessor that is suitable for processing the specified XmlAttribute in the xml namespace associated with this NamespaceHandler.
 DocumentPreprocessor getDocumentPreprocessor()
          Obtains the DocumentPreprocessor that must be applied to the XmlElement (ie: document) in which the NamespaceHandler is defined, prior to XmlElements and XmlAttributes being processed defined by this NamespaceHandler.
 ElementProcessor getElementProcessor(XmlElement element)
          Obtains the ElementProcessor that is suitable for processing the specified XmlElement in the xml namespace associated with this NamespaceHandler.
 void onEndNamespace(ProcessingContext context, XmlElement element, java.lang.String sPrefix, java.net.URI uri)
          Called when the xml namespace associated with the NamespaceHandler is last encountered in an xml document.
 void onStartNamespace(ProcessingContext context, XmlElement element, java.lang.String sPrefix, java.net.URI uri)
          Called when the xml namespace associated with the NamespaceHandler is first encountered in an xml document.

 

Method Detail

getDocumentPreprocessor

DocumentPreprocessor getDocumentPreprocessor()
Obtains the DocumentPreprocessor that must be applied to the XmlElement (ie: document) in which the NamespaceHandler is defined, prior to XmlElements and XmlAttributes being processed defined by this NamespaceHandler.
Returns:
the DocumentPreprocessor or null if one is not required or defined for the NamespaceHandler

getAttributeProcessor

AttributeProcessor getAttributeProcessor(XmlAttribute attribute)
Obtains the AttributeProcessor that is suitable for processing the specified XmlAttribute in the xml namespace associated with this NamespaceHandler.
Parameters:
attribute - the XmlAttribute
Returns:
the AttributeProcessor or null if a suitable AttributeProcessor could not be found

getElementProcessor

ElementProcessor getElementProcessor(XmlElement element)
Obtains the ElementProcessor that is suitable for processing the specified XmlElement in the xml namespace associated with this NamespaceHandler.
Parameters:
element - the XmlElement
Returns:
the ElementProcessor or null if a suitable ElementProcessor could not be found

onStartNamespace

void onStartNamespace(ProcessingContext context,
                      XmlElement element,
                      java.lang.String sPrefix,
                      java.net.URI uri)
Called when the xml namespace associated with the NamespaceHandler is first encountered in an xml document.
Parameters:
context - the document ProcessingContext in which the xml namespace was encountered
element - the XmlElement in which the xml namespace was encountered
sPrefix - the prefix of the declared xml namespace
uri - the URI of the declared xml namespace

onEndNamespace

void onEndNamespace(ProcessingContext context,
                    XmlElement element,
                    java.lang.String sPrefix,
                    java.net.URI uri)
Called when the xml namespace associated with the NamespaceHandler is last encountered in an xml document.
Parameters:
context - the document ProcessingContext in which the xml namespace was encountered
element - the XmlElement in which the xml namespace was encountered
sPrefix - the prefix of the declared xml namespace
uri - the URI of the declared xml namespace

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.