com.bea.xml.stream
Class NamespaceBase

java.lang.Object
  extended by com.bea.xml.stream.AttributeBase
      extended by 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


Field Summary
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
NamespaceBase(java.lang.String namespaceURI)
           
NamespaceBase(java.lang.String prefix, java.lang.String namespaceURI)
           
 
Method Summary
 int getEventType()
          Returns an integer code for this event.
 java.lang.String getNamespaceURI()
          Gets the uri bound to the prefix of this namespace
 java.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 namespace
 boolean 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
 
Methods inherited from interface javax.xml.stream.events.Attribute
getDTDType, getName, getValue, isSpecified
 
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isCharacters, isEndDocument, isEndElement, isEntityReference, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
 

Constructor Detail

NamespaceBase

public NamespaceBase(java.lang.String prefix,
                     java.lang.String namespaceURI)

NamespaceBase

public NamespaceBase(java.lang.String namespaceURI)
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 interface javax.xml.stream.events.XMLEvent
Overrides:
getEventType in class AttributeBase
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 interface javax.xml.stream.events.XMLEvent
Overrides:
isAttribute in class AttributeBase
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 interface javax.xml.stream.events.XMLEvent
Overrides:
isNamespace in class AttributeBase
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 interface javax.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 interface javax.xml.stream.events.Namespace
Overrides:
getNamespaceURI in class AttributeBase

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 interface javax.xml.stream.events.Namespace

toString

public java.lang.String toString()
Overrides:
toString in class AttributeBase