public class

NodeDescriptor

extends Descriptor
java.lang.Object
   ↳ org.apache.commons.betwixt.Descriptor
     ↳ org.apache.commons.betwixt.NodeDescriptor
Known Direct Subclasses

Class Overview

Common superclass for ElementDescriptor and AttributeDescriptor.

Nodes can have just a local name or they can have a local name, qualified name and a namespace uri.

Summary

Public Constructors
NodeDescriptor()
Base constructor
NodeDescriptor(String localName)
Creates a NodeDescriptor with no namespace URI or prefix.
NodeDescriptor(String localName, String qualifiedName, String uri)
Creates a NodeDescriptor with namespace URI and qualified name
Public Methods
String getLocalName()
Gets the local name, excluding any namespace prefix
String getQualifiedName()
Gets the qualified name, including any namespace prefix
String getURI()
Gets the (xml) namespace URI prefix for this node.
void setLocalName(String localName)
Sets the local name
void setQualifiedName(String qualifiedName)
Sets the qualified name
void setURI(String uri)
Sets the namespace URI that this node belongs to.
[Expand]
Inherited Methods
From class org.apache.commons.betwixt.Descriptor
From class java.lang.Object

Public Constructors

public NodeDescriptor ()

Base constructor

public NodeDescriptor (String localName)

Creates a NodeDescriptor with no namespace URI or prefix.

Parameters
localName the (xml) local name of this node. This will be used to set both qualified and local name for this name.

public NodeDescriptor (String localName, String qualifiedName, String uri)

Creates a NodeDescriptor with namespace URI and qualified name

Parameters
localName the (xml) local name of this node
qualifiedName the (xml) qualified name of this node
uri the (xml) namespace prefix of this node

Public Methods

public String getLocalName ()

Gets the local name, excluding any namespace prefix

Returns
  • the (xml) local name of this node

public String getQualifiedName ()

Gets the qualified name, including any namespace prefix

Returns
  • the (xml) qualified name of this node. This may be null.

public String getURI ()

Gets the (xml) namespace URI prefix for this node.

Returns
  • the namespace URI that this node belongs to or "" if there is no namespace defined

public void setLocalName (String localName)

Sets the local name

Parameters
localName the (xml) local name of this node

public void setQualifiedName (String qualifiedName)

Sets the qualified name

Parameters
qualifiedName the new (xml) qualified name for this node

public void setURI (String uri)

Sets the namespace URI that this node belongs to.

Parameters
uri the new namespace uri for this node