|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.config.xml.AbstractNamespaceHandler
public abstract class AbstractNamespaceHandler
An AbstractNamespaceHandler provides a base implementation of a NamespaceHandler with support for implicit and explicit registration of ElementProcessors and AttributeProcessors for those xml attributes and elements occurring in the associated xml namespace.
| Constructor Summary | |
|---|---|
AbstractNamespaceHandler()Construct an AbstractNamespaceHandler. |
|
| Method Summary | |
|---|---|
AttributeProcessor |
getAttributeProcessor(java.lang.String localName)Obtains the AttributeProcessor registered with the specified localName (in the namespace). |
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(java.lang.String localName)Obtains the ElementProcessor registered with the specified localName (in the namespace). |
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 prefix, 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 prefix, java.net.URI uri)Called when the xml namespace associated with the NamespaceHandler is first encountered in an xml document. |
protected AttributeProcessor |
onUnknownAttribute(XmlAttribute attribute)A call-back to handle when an XmlAttribute is unknown to the NamespaceHandler. |
protected ElementProcessor |
onUnknownElement(XmlElement element)A call-back to handle when an XmlElement is unknown to the NamespaceHandler. |
void |
registerAttributeType(java.lang.String sLocalName, java.lang.Class clzType)Registers (internally creates) an appropriate AttributeProcessor for XmlAttributes with the specified local name so that they produce the specified type of value when processed. |
void |
registerElementType(java.lang.String sLocalName, java.lang.Class clzType)Registers (internally creates) an appropriate ElementProcessor for XmlElements with the specified local name so that they produce the specified type of value when processed. |
void |
registerProcessor(java.lang.Class clzProcessor)Registers the specified processor as an ElementProcessor or AttributeProcessor (based on the interfaces it implements) using the XmlSimpleName annotation to determine the localName of the said processor. |
void |
registerProcessor(java.lang.String sLocalName, AttributeProcessor processor)Registers an AttributeProcessor for XmlAttributes with the specified name. |
void |
registerProcessor(java.lang.String sLocalName, ElementProcessor processor)Registers an ElementProcessor for XmlElements with a name with in the context of the NamespaceHandler namespace. |
void |
setDocumentPreprocessor(DocumentPreprocessor preprocessor)Sets the DocumentPreprocessor for the NamespaceHandler. |
| Constructor Detail |
|---|
public AbstractNamespaceHandler()
AbstractNamespaceHandler.| Method Detail |
|---|
public DocumentPreprocessor getDocumentPreprocessor()
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.getDocumentPreprocessor in interface NamespaceHandlerDocumentPreprocessor or null if one is not required or defined for the NamespaceHandlerpublic AttributeProcessor getAttributeProcessor(XmlAttribute attribute)
AttributeProcessor that is suitable for processing the specified XmlAttribute in the xml namespace associated with this NamespaceHandler.getAttributeProcessor in interface NamespaceHandlerattribute - the XmlAttributeAttributeProcessor or null if a suitable AttributeProcessor could not be foundpublic ElementProcessor getElementProcessor(XmlElement element)
ElementProcessor that is suitable for processing the specified XmlElement in the xml namespace associated with this NamespaceHandler.getElementProcessor in interface NamespaceHandlerelement - the XmlElementElementProcessor or null if a suitable ElementProcessor could not be found
public void onStartNamespace(ProcessingContext context,
XmlElement element,
java.lang.String prefix,
java.net.URI uri)
NamespaceHandler is first encountered in an xml document.onStartNamespace in interface NamespaceHandlercontext - the document ProcessingContext in which the xml namespace was encounteredelement - the XmlElement in which the xml namespace was encounteredprefix - the prefix of the declared xml namespaceuri - the URI of the declared xml namespace
public void onEndNamespace(ProcessingContext context,
XmlElement element,
java.lang.String prefix,
java.net.URI uri)
NamespaceHandler is last encountered in an xml document.onEndNamespace in interface NamespaceHandlercontext - the document ProcessingContext in which the xml namespace was encounteredelement - the XmlElement in which the xml namespace was encounteredprefix - the prefix of the declared xml namespaceuri - the URI of the declared xml namespacepublic void setDocumentPreprocessor(DocumentPreprocessor preprocessor)
DocumentPreprocessor for the NamespaceHandler.preprocessor - the DocumentPreprocessorpublic void registerProcessor(java.lang.Class clzProcessor)
ElementProcessor or AttributeProcessor (based on the interfaces it implements) using the XmlSimpleName annotation to determine the localName of the said processor.
Note: The specified class must have a no-args constructor.
clzProcessor - A class that implements either (or both) ElementProcessor or AttributeProcessor that is annotated with @XmlSimpleName to specify it's localName.
public void registerProcessor(java.lang.String sLocalName,
ElementProcessor processor)
ElementProcessor for XmlElements with a name with in the context of the NamespaceHandler namespace.sLocalName - The local name of the XmlElement to be processed with the ElementProcessorprocessor - The ElementProcessor
public void registerProcessor(java.lang.String sLocalName,
AttributeProcessor processor)
AttributeProcessor for XmlAttributes with the specified name.sLocalName - The local name of the XmlAttribute to be processed with the AttributeProcessorprocessor - The AttributeProcessor
public void registerElementType(java.lang.String sLocalName,
java.lang.Class clzType)
ElementProcessor for XmlElements with the specified local name so that they produce the specified type of value when processed.sLocalName - The local name of the XmlElements to be associated with the typeclzType - The Class of value that should be produced for the XmlElement
public void registerAttributeType(java.lang.String sLocalName,
java.lang.Class clzType)
AttributeProcessor for XmlAttributes with the specified local name so that they produce the specified type of value when processed.sLocalName - The local name of the XmlElements to be associated with the typeclzType - The Class of value that should be produced for the XmlAttributeprotected AttributeProcessor onUnknownAttribute(XmlAttribute attribute)
XmlAttribute is unknown to the NamespaceHandler.
Override this method to provide specialized foreign XmlAttribute processing. By default, null will be returned for unknown XmlAttributes.
attribute - The XmlAttribute that was unknown.AttributeProcessor that may be used to process the unknown XmlAttribute or null if no special processing should occur.protected ElementProcessor onUnknownElement(XmlElement element)
XmlElement is unknown to the NamespaceHandler.
Override this method to provide specialized foreign XmlElement processing. By default, unknown XmlElement will return an ElementProcessor that when attempting to process the said element, will throw a ConfigurationException.
element - The XmlElement that was unknown.ElementProcessor that may be used to process the unknown XmlElement or null if no special processing should occur.public AttributeProcessor getAttributeProcessor(java.lang.String localName)
AttributeProcessor registered with the specified localName (in the namespace).localName - the name of the AttributeProcessor to returnAttributeProcessor or null if not foundpublic ElementProcessor getElementProcessor(java.lang.String localName)
ElementProcessor registered with the specified localName (in the namespace).localName - the name of the ElementProcessor to returnElementProcessor or null if not found
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||