org.apache.commons.betwixt
Class NodeDescriptor

java.lang.Object
  extended by org.apache.commons.betwixt.Descriptor
      extended by org.apache.commons.betwixt.NodeDescriptor
Direct Known Subclasses:
AttributeDescriptor, ElementDescriptor

public class NodeDescriptor
extends Descriptor

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.

Version:
$Revision: 438373 $
Author:
James Strachan

Constructor Summary
NodeDescriptor()
          Base constructor
NodeDescriptor(java.lang.String localName)
          Creates a NodeDescriptor with no namespace URI or prefix.
NodeDescriptor(java.lang.String localName, java.lang.String qualifiedName, java.lang.String uri)
          Creates a NodeDescriptor with namespace URI and qualified name
 
Method Summary
 java.lang.String getLocalName()
          Gets the local name, excluding any namespace prefix
 java.lang.String getQualifiedName()
          Gets the qualified name, including any namespace prefix
 java.lang.String getURI()
          Gets the (xml) namespace URI prefix for this node.
 void setLocalName(java.lang.String localName)
          Sets the local name
 void setQualifiedName(java.lang.String qualifiedName)
          Sets the qualified name
 void setURI(java.lang.String uri)
          Sets the namespace URI that this node belongs to.
 
Methods inherited from class org.apache.commons.betwixt.Descriptor
getOptions, getPropertyName, getPropertyType, getSingularPropertyType, getTextExpression, getUpdater, setOptions, setPropertyName, setPropertyType, setSingularPropertyType, setTextExpression, setUpdater
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeDescriptor

public NodeDescriptor()
Base constructor


NodeDescriptor

public NodeDescriptor(java.lang.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.

NodeDescriptor

public NodeDescriptor(java.lang.String localName,
                      java.lang.String qualifiedName,
                      java.lang.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
Method Detail

getLocalName

public java.lang.String getLocalName()
Gets the local name, excluding any namespace prefix

Returns:
the (xml) local name of this node

setLocalName

public void setLocalName(java.lang.String localName)
Sets the local name

Parameters:
localName - the (xml) local name of this node

getQualifiedName

public java.lang.String getQualifiedName()
Gets the qualified name, including any namespace prefix

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

setQualifiedName

public void setQualifiedName(java.lang.String qualifiedName)
Sets the qualified name

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

getURI

public java.lang.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

setURI

public void setURI(java.lang.String uri)
Sets the namespace URI that this node belongs to.

Parameters:
uri - the new namespace uri for this node


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.