Top Constructors Methods
com.sun.xml.internal.stream.events

public Class NamespaceImpl

extends AttributeImpl
implements Namespace
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.Namespace, javax.xml.stream.events.Attribute, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
javax.xml.stream.events.Namespace, .XMLEvent, javax.xml.namespace.QName, javax.xml.XMLConstants

Author
Neeraj Bajaj,K Venugopal

Constructor Summary

AccessConstructor and Description
public
public
NamespaceImpl(String namespaceURI)

Creates a new instance of NamespaceImpl

public
NamespaceImpl(String prefix, String namespaceURI)

Method Summary

Modifier and TypeMethod and Description
public int
public String
getNamespaceURI()

Implements javax.xml.stream.events.Namespace.getNamespaceURI.

Gets the uri bound to the prefix of this namespace

public String
getPrefix()

Implements javax.xml.stream.events.Namespace.getPrefix.

Gets the prefix, returns "" if this is a default namespace declaration.

protected void
public boolean
isDefaultNamespaceDeclaration()

Implements javax.xml.stream.events.Namespace.isDefaultNamespaceDeclaration.

returns true if this attribute declares the default namespace

public boolean
isNamespace()

Overrides com.sun.xml.internal.stream.events.DummyEvent.isNamespace.

Implements javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.

pack-priv void
pack-priv void
setPrefix(String prefix)

Inherited from com.sun.xml.internal.stream.events.AttributeImpl:
getDTDTypegetNamegetNonNormalizedValuegetValueisSpecifiedsetAttributeTypesetNamesetNonNormalizedValuesetSpecifiedsetValuetoStringwriteAsEncodedUnicodeEx

Constructor Detail

NamespaceImplback to summary
public NamespaceImpl()
NamespaceImplback to summary
public NamespaceImpl(String namespaceURI)

Creates a new instance of NamespaceImpl

NamespaceImplback to summary
public NamespaceImpl(String prefix, String namespaceURI)

Method Detail

getEventTypeback to summary
public int getEventType()

Overrides com.sun.xml.internal.stream.events.DummyEvent.getEventType.

Implements javax.xml.stream.events.XMLEvent.getEventType.

Doc from javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

Returns:int

the event type

getNamespaceURIback to summary
public String getNamespaceURI()

Implements javax.xml.stream.events.Namespace.getNamespaceURI.

Doc from javax.xml.stream.events.Namespace.getNamespaceURI.

Gets the uri bound to the prefix of this namespace

Returns:String

the NamespaceURI

getPrefixback to summary
public String getPrefix()

Implements javax.xml.stream.events.Namespace.getPrefix.

Doc from javax.xml.stream.events.Namespace.getPrefix.

Gets the prefix, returns "" if this is a default namespace declaration.

Returns:String

the prefix

initback to summary
protected void init()

Overrides com.sun.xml.internal.stream.events.AttributeImpl.init.

isDefaultNamespaceDeclarationback to summary
public boolean isDefaultNamespaceDeclaration()

Implements javax.xml.stream.events.Namespace.isDefaultNamespaceDeclaration.

Doc from javax.xml.stream.events.Namespace.isDefaultNamespaceDeclaration.

returns true if this attribute declares the default namespace

Returns:boolean

true if this is default namespace, false otherwise

isNamespaceback to summary
public boolean isNamespace()

Overrides com.sun.xml.internal.stream.events.DummyEvent.isNamespace.

Implements javax.xml.stream.events.XMLEvent.isNamespace.

Doc from javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.

Returns:boolean

true if the event is Namespace, false otherwise

setNamespaceURIback to summary
pack-priv void setNamespaceURI(String uri)
setPrefixback to summary
pack-priv void setPrefix(String prefix)