Top Fields Constructors Methods
com.sun.xml.fastinfoset.stax.events

public Class NamespaceBase

extends AttributeBase
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.namespace.QName, javax.xml.stream.events.Namespace, java.util.Objects

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private boolean
pack-priv static final String
pack-priv static final String
pack-priv static final String
pack-priv static final String
pack-priv static final String
pack-priv static final String

Constructor Summary

AccessConstructor and Description
public
NamespaceBase(String namespaceURI)

a namespace attribute has a form: xmlns:NCName="URI reference"

public
NamespaceBase(String
prefix of a namespace is the local name for an attribute
prefix
,
String
the uri reference of a namespace is the value for an attribute
namespaceURI
)

Create a new Namespace

Method Summary

Modifier and TypeMethod and Description
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.

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.fastinfoset.stax.events.EventBase.isNamespace.

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

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

pack-priv void
setNamespaceURI(String
the uri reference of a namespace is the value for an attribute
uri
)

set Namespace URI reference (xmlns:prefix = "uri")

pack-priv void
setPrefix(String prefix)

Inherited from com.sun.xml.fastinfoset.stax.events.AttributeBase:
getDTDTypegetLocalNamegetNamegetValueisSpecifiedsetAttributeTypesetNamesetSpecifiedsetValuetoString

Field Detail

DEFAULT_NS_PREFIXback to summary
pack-priv static final String DEFAULT_NS_PREFIX
defaultDeclarationback to summary
private boolean defaultDeclaration
W3C_XML_SCHEMA_INSTANCE_NS_URIback to summary
pack-priv static final String W3C_XML_SCHEMA_INSTANCE_NS_URI
W3C_XML_SCHEMA_NS_URIback to summary
pack-priv static final String W3C_XML_SCHEMA_NS_URI
XML_NS_PREFIXback to summary
pack-priv static final String XML_NS_PREFIX
XML_NS_URIback to summary
pack-priv static final String XML_NS_URI
XMLNS_ATTRIBUTEback to summary
pack-priv static final String XMLNS_ATTRIBUTE
XMLNS_ATTRIBUTE_NS_URIback to summary
pack-priv static final String XMLNS_ATTRIBUTE_NS_URI

Constructor Detail

NamespaceBaseback to summary
public NamespaceBase(String namespaceURI)

a namespace attribute has a form: xmlns:NCName="URI reference"

NamespaceBaseback to summary
public NamespaceBase(String prefix, String namespaceURI)

Create a new Namespace

Parameters
prefix:String

prefix of a namespace is the local name for an attribute

namespaceURI:String

the uri reference of a namespace is the value for an attribute

Annotations
@SuppressWarnings:this-escape

Method Detail

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

Annotations
@Override
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.

Annotations
@Override
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

Annotations
@Override
isNamespaceback to summary
public boolean isNamespace()

Overrides com.sun.xml.fastinfoset.stax.events.EventBase.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.

Annotations
@Override
setNamespaceURIback to summary
pack-priv void setNamespaceURI(String uri)

set Namespace URI reference (xmlns:prefix = "uri")

Parameters
uri:String

the uri reference of a namespace is the value for an attribute

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