Package com.bea.xml.stream
Class NamespaceBase
- java.lang.Object
-
- com.bea.xml.stream.AttributeBase
-
- com.bea.xml.stream.NamespaceBase
-
- All Implemented Interfaces:
javax.xml.stream.events.Attribute
,javax.xml.stream.events.Namespace
,javax.xml.stream.events.XMLEvent
,javax.xml.stream.Location
,javax.xml.stream.XMLStreamConstants
public class NamespaceBase extends AttributeBase implements javax.xml.stream.events.Namespace
The default implementation of the namespace class
-
-
Constructor Summary
Constructors Constructor Description NamespaceBase(java.lang.String namespaceURI)
NamespaceBase(java.lang.String prefix, java.lang.String namespaceURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEventType()
Returns an integer code for this event.java.lang.String
getNamespaceURI()
Gets the uri bound to the prefix of this namespacejava.lang.String
getPrefix()
Gets the prefix, returns "" if this is a default namespace declaration.boolean
isAttribute()
A utility function to check if this event is an Attribute.boolean
isDefaultNamespaceDeclaration()
returns true if this attribute declares the default namespaceboolean
isNamespace()
A utility function to check if this event is a Namespace.java.lang.String
toString()
-
Methods inherited from class com.bea.xml.stream.AttributeBase
asCharacters, asEndElement, asStartElement, getCharacterOffset, getColumnNumber, getDTDType, getLineNumber, getLocalName, getLocation, getLocationURI, getName, getPublicId, getSchemaType, getSourceName, getSystemId, getValue, hasName, isCharacters, isDefault, isEndDocument, isEndElement, isEndEntity, isEntityReference, isNamespaceDeclaration, isProcessingInstruction, isSpecified, isStartDocument, isStartElement, isStartEntity, recycle, setCharacterOffset, setColumnNumber, setLineNumber, setLocationURI, setNamespaceURI, writeAsEncodedUnicode, writeEncodedChar
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getEventType
public int getEventType()
Description copied from interface:javax.xml.stream.events.XMLEvent
Returns an integer code for this event.- Specified by:
getEventType
in interfacejavax.xml.stream.events.XMLEvent
- Overrides:
getEventType
in classAttributeBase
- See Also:
XMLStreamConstants.START_ELEMENT
,XMLStreamConstants.END_ELEMENT
,XMLStreamConstants.CHARACTERS
,XMLStreamConstants.ATTRIBUTE
,XMLStreamConstants.NAMESPACE
,XMLStreamConstants.PROCESSING_INSTRUCTION
,XMLStreamConstants.COMMENT
,XMLStreamConstants.START_DOCUMENT
,XMLStreamConstants.END_DOCUMENT
,XMLStreamConstants.DTD
-
isAttribute
public boolean isAttribute()
Description copied from interface:javax.xml.stream.events.XMLEvent
A utility function to check if this event is an Attribute.- Specified by:
isAttribute
in interfacejavax.xml.stream.events.XMLEvent
- Overrides:
isAttribute
in classAttributeBase
- See Also:
Attribute
-
isNamespace
public boolean isNamespace()
Description copied from interface:javax.xml.stream.events.XMLEvent
A utility function to check if this event is a Namespace.- Specified by:
isNamespace
in interfacejavax.xml.stream.events.XMLEvent
- Overrides:
isNamespace
in classAttributeBase
- See Also:
Namespace
-
getPrefix
public java.lang.String getPrefix()
Description copied from interface:javax.xml.stream.events.Namespace
Gets the prefix, returns "" if this is a default namespace declaration.- Specified by:
getPrefix
in interfacejavax.xml.stream.events.Namespace
-
getNamespaceURI
public java.lang.String getNamespaceURI()
Description copied from interface:javax.xml.stream.events.Namespace
Gets the uri bound to the prefix of this namespace- Specified by:
getNamespaceURI
in interfacejavax.xml.stream.events.Namespace
- Overrides:
getNamespaceURI
in classAttributeBase
-
isDefaultNamespaceDeclaration
public boolean isDefaultNamespaceDeclaration()
Description copied from interface:javax.xml.stream.events.Namespace
returns true if this attribute declares the default namespace- Specified by:
isDefaultNamespaceDeclaration
in interfacejavax.xml.stream.events.Namespace
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAttributeBase
-
-