|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ispsoft.jaxme.NamespaceSupport
Similar to org.xml.sax.NamespaceSupport, but optimized for frequent use.
Constructor Summary | |
NamespaceSupport()
Creates a new instance of NamespaceSupport. |
Method Summary | |
protected java.lang.String |
createPrefix()
Creates a new default mapping for the given namespace URI. |
void |
endPrefixMapping(java.lang.String pPrefix)
Implements org.xml.sax.ContentHandler.endPrefixMapping() . |
java.lang.String |
getAttrQName(java.lang.String pNamespaceURI,
java.lang.String pLocalName,
org.xml.sax.ContentHandler pContentHandler)
Returns a qualified attribute name for the given namespace URI and local name. |
int |
getContext()
Returns the NamespaceSupports current state. |
java.lang.String |
getDefaultPrefix()
Returns the String being used to construct a default mapping. |
org.xml.sax.Locator |
getDocumentLocator()
Returns a Locator previously set with setDocumentLocator() . |
MarshallerImpl |
getMarshaller()
Returns the Marshaller that created this instance. |
java.lang.String |
getPrefix(java.lang.String pNamespaceURI)
Returns a prefix currently mapped to the given URI or null, if there is no such mapping. |
java.lang.String |
getQName(java.lang.String pNamespaceURI,
java.lang.String pLocalName,
org.xml.sax.ContentHandler pContentHandler)
Returns a qualified element name for the given namespace URI and local name. |
void |
initPrefixMapping(org.xml.sax.ContentHandler pContentHandler)
Initializes the given ContentHandler by firing SAX events of type startPrefixMapping . |
void |
setContext(org.xml.sax.ContentHandler pContentHandler,
int pState)
Restores the Namespacesupports state. |
void |
setDefaultPrefix(java.lang.String pDefaultPrefix)
Sets the String being used to construct a default mapping. |
void |
setDocumentLocator(org.xml.sax.Locator pLocator)
Implements org.xml.sax.ContentHandler.setDocumentLocator() . |
void |
setMarshaller(MarshallerImpl pMarshaller)
Sets the Marshaller that created this instance. |
void |
startPrefixMapping(java.lang.String pPrefix,
java.lang.String pNamespaceURI)
Implements org.xml.sax.ContentHandler.startPrefixMapping() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NamespaceSupport()
Creates a new instance of NamespaceSupport.
Method Detail |
public void initPrefixMapping(org.xml.sax.ContentHandler pContentHandler) throws org.xml.sax.SAXException
Initializes the given ContentHandler by firing SAX events of
type startPrefixMapping
.
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String pPrefix, java.lang.String pNamespaceURI) throws org.xml.sax.SAXException
Implements org.xml.sax.ContentHandler.startPrefixMapping()
.
org.xml.sax.SAXException
public java.lang.String getPrefix(java.lang.String pNamespaceURI)
Returns a prefix currently mapped to the given URI or null, if there is no such mapping.
pNamespaceURI
- The namespace URI in questionpublic void endPrefixMapping(java.lang.String pPrefix) throws org.xml.sax.SAXException
Implements org.xml.sax.ContentHandler.endPrefixMapping()
.
org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator pLocator)
Implements org.xml.sax.ContentHandler.setDocumentLocator()
.
public org.xml.sax.Locator getDocumentLocator()
Returns a Locator previously set with setDocumentLocator()
.
public int getContext()
Returns the NamespaceSupports current state. The
state can later be restored by calling setContext()
.
public void setContext(org.xml.sax.ContentHandler pContentHandler, int pState) throws org.xml.sax.SAXException
Restores the Namespacesupports state. The argument must have
been obtained by a previous call to getContext()
.
org.xml.sax.SAXException
public java.lang.String getQName(java.lang.String pNamespaceURI, java.lang.String pLocalName, org.xml.sax.ContentHandler pContentHandler) throws org.xml.sax.SAXException
Returns a qualified element name for the given namespace URI and local name. If there is no mapping for the namespace URI, a default mapping is established.
org.xml.sax.SAXException
getAttrQName(java.lang.String, java.lang.String, org.xml.sax.ContentHandler)
public java.lang.String getAttrQName(java.lang.String pNamespaceURI, java.lang.String pLocalName, org.xml.sax.ContentHandler pContentHandler) throws org.xml.sax.SAXException
Returns a qualified attribute name for the given namespace
URI and local name. Mostly the same than getQName()
,
except that a possible default mapping does not apply.
org.xml.sax.SAXException
getQName(java.lang.String, java.lang.String, org.xml.sax.ContentHandler)
public java.lang.String getDefaultPrefix()
Returns the String being used to construct a default mapping. A unique number will be appended to the String.
public void setDefaultPrefix(java.lang.String pDefaultPrefix)
Sets the String being used to construct a default mapping. A unique number will be appended to the String.
protected java.lang.String createPrefix()
Creates a new default mapping for the given namespace URI.
public MarshallerImpl getMarshaller()
Returns the Marshaller that created this instance.
public void setMarshaller(MarshallerImpl pMarshaller)
Sets the Marshaller that created this instance.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |