Top Description Inners Fields Constructors Methods
com.sun.tools.rngom.digested

public Class DAnnotation

extends Object
Class Inheritance
Imports
org.xml.sax.Locator, org.w3c.dom.Element, javax.xml.namespace.QName, java.util.Map, .HashMap, .List, .ArrayList, .Collections

Annotation.
Author
Kohsuke Kawaguchi ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
pack-priv final Map<QName, DAnnotation.Attribute>
attributes

Keyed by QName.

pack-priv final List<Element>
contents

List of nested elements.

pack-priv static final DAnnotation
EMPTY

Instance reserved to be empty.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DAnnotation.Attribute

Returns:

null if no such attribute is found.
getAttribute
(String
can be empty but must not be null.
nsUri
,
String localName)

Gets the attribute of a given name.

public DAnnotation.Attribute
public Map<QName, DAnnotation.Attribute>

Returns:

can be empty but never null. the returned map is read-only.
getAttributes
()

Gets the read-only view of all the attributes.

public List<Element>

Returns:

can be empty but never null. the returned list is read-only.
getChildren
()

Gets the read-only view of all the child elements of this annotation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributesback to summary
pack-priv final Map<QName, DAnnotation.Attribute> attributes

Keyed by QName.

contentsback to summary
pack-priv final List<Element> contents

List of nested elements.

EMPTYback to summary
pack-priv static final DAnnotation EMPTY

Instance reserved to be empty.

Constructor Detail

DAnnotationback to summary
public DAnnotation()

Method Detail

getAttributeback to summary
public DAnnotation.Attribute getAttribute(String nsUri, String localName)

Gets the attribute of a given name.

Parameters
nsUri:String

can be empty but must not be null.

Returns:DAnnotation.Attribute

null if no such attribute is found.

getAttributeback to summary
public DAnnotation.Attribute getAttribute(QName n)
getAttributesback to summary
public Map<QName, DAnnotation.Attribute> getAttributes()

Gets the read-only view of all the attributes.

Returns:Map<QName, DAnnotation.Attribute>

can be empty but never null. the returned map is read-only.

getChildrenback to summary
public List<Element> getChildren()

Gets the read-only view of all the child elements of this annotation.

Returns:List<Element>

can be empty but never null. the returned list is read-only.

com.sun.tools.rngom.digested back to summary

public Class DAnnotation.Attribute

extends Object
Class Inheritance

Attribute.

Field Summary

Modifier and TypeField and Description
private Locator
private final String
private final String
private final String
private String

Constructor Summary

AccessConstructor and Description
public
Attribute(String ns, String localName, String prefix)

public
Attribute(String ns, String localName, String prefix, String value, Locator loc)

Method Summary

Modifier and TypeMethod and Description
public Locator

Returns:

never null.
getLoc
()

Gets the location in the source schema file where this annotation was present.

public String

Returns:

always non-null.
getLocalName
()

Gets the local name of this attribute.

public String

Returns:

can be empty (to represent the default namespace), but never null.
getNs
()

Gets the namespace URI of this attribute.

public String

Returns:

null if this attribute didn't have a prefix.
getPrefix
()

Gets the prefix of thie attribute.

public String

Returns:

never null.
getValue
()

Gets the attribute value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

locback to summary
private Locator loc
localNameback to summary
private final String localName
nsback to summary
private final String ns
prefixback to summary
private final String prefix
valueback to summary
private String value

Constructor Detail

Attributeback to summary
public Attribute(String ns, String localName, String prefix)
Attributeback to summary
public Attribute(String ns, String localName, String prefix, String value, Locator loc)

Method Detail

getLocback to summary
public Locator getLoc()

Gets the location in the source schema file where this annotation was present.

Returns:Locator

never null.

getLocalNameback to summary
public String getLocalName()

Gets the local name of this attribute.

Returns:String

always non-null.

getNsback to summary
public String getNs()

Gets the namespace URI of this attribute.

Returns:String

can be empty (to represent the default namespace), but never null.

getPrefixback to summary
public String getPrefix()

Gets the prefix of thie attribute.

Returns:String

null if this attribute didn't have a prefix.

getValueback to summary
public String getValue()

Gets the attribute value.

Returns:String

never null.