org.apache.commons.betwixt.io.read
Class ElementMapping

java.lang.Object
  extended by org.apache.commons.betwixt.io.read.ElementMapping

public class ElementMapping
extends java.lang.Object

Describes a mapping between an xml element and a betwixt element.

Since:
0.5
Author:
Robert Burrell Donkin

Constructor Summary
ElementMapping()
          Base constructor
 
Method Summary
 org.xml.sax.Attributes getAttributes()
          Gets the element's attributes.
 ElementDescriptor getDescriptor()
          Gets the mapped element descriptor.
 java.lang.String getName()
          Gets the local name if the parser is namespace aware, otherwise the name.
 java.lang.String getNamespace()
          Gets the namespace URI or an empty string if the parser is not namespace aware or the element has no namespace.
 java.lang.Class getType()
          Gets the base type for this element.
 void setAttributes(org.xml.sax.Attributes attributes)
          Sets the element's attributes
 void setDescriptor(ElementDescriptor descriptor)
          Sets the mapped element descriptor.
 void setName(java.lang.String name)
          Sets the local name for this element.
 void setNamespace(java.lang.String namespace)
          Sets the namespace URI for this element
 void setType(java.lang.Class type)
          Sets the base type for this element.
 java.lang.String toString()
          Returns something useful for logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementMapping

public ElementMapping()
Base constructor

Method Detail

getNamespace

public java.lang.String getNamespace()
Gets the namespace URI or an empty string if the parser is not namespace aware or the element has no namespace.

Returns:
namespace possibly null

setNamespace

public void setNamespace(java.lang.String namespace)
Sets the namespace URI for this element

Parameters:
namespace - the namespace uri, possibly null

getName

public java.lang.String getName()
Gets the local name if the parser is namespace aware, otherwise the name.

Returns:
the element name, possibly null

setName

public void setName(java.lang.String name)
Sets the local name for this element.

Parameters:
name - the element name, possibly null

getAttributes

public org.xml.sax.Attributes getAttributes()
Gets the element's attributes.

Returns:
the Attributes for this element, possibly null.

setAttributes

public void setAttributes(org.xml.sax.Attributes attributes)
Sets the element's attributes

Parameters:
attributes - the element's attributes, possibly null

getType

public java.lang.Class getType()
Gets the base type for this element. The base type may - or may not - correspond to the created type.

Returns:
the Class of the base type for this element

setType

public void setType(java.lang.Class type)
Sets the base type for this element. The base type may - or may not - correspond to the created type.

Parameters:
type - the Class of the base type for this element

getDescriptor

public ElementDescriptor getDescriptor()
Gets the mapped element descriptor.

Returns:
the mapped ElementDescriptor

setDescriptor

public void setDescriptor(ElementDescriptor descriptor)
Sets the mapped element descriptor.

Parameters:
descriptor - set this descriptor

toString

public java.lang.String toString()
Returns something useful for logging.

Overrides:
toString in class java.lang.Object
Since:
0.8


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