public class

ElementMapping

extends Object
java.lang.Object
   ↳ org.apache.commons.betwixt.io.read.ElementMapping

Class Overview

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

Summary

Public Constructors
ElementMapping()
Base constructor
Public Methods
Attributes getAttributes()
Gets the element's attributes.
ElementDescriptor getDescriptor()
Gets the mapped element descriptor.
String getName()
Gets the local name if the parser is namespace aware, otherwise the name.
String getNamespace()
Gets the namespace URI or an empty string if the parser is not namespace aware or the element has no namespace.
Class getType()
Gets the base type for this element.
void setAttributes(Attributes attributes)
Sets the element's attributes
void setDescriptor(ElementDescriptor descriptor)
Sets the mapped element descriptor.
void setName(String name)
Sets the local name for this element.
void setNamespace(String namespace)
Sets the namespace URI for this element
void setType(Class type)
Sets the base type for this element.
String toString()
Returns something useful for logging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ElementMapping ()

Base constructor

Public Methods

public Attributes getAttributes ()

Gets the element's attributes.

Returns
  • the Attributes for this element, possibly null.

public ElementDescriptor getDescriptor ()

Gets the mapped element descriptor.

Returns
  • the mapped ElementDescriptor

public String getName ()

Gets the local name if the parser is namespace aware, otherwise the name.

Returns
  • the element name, possibly null

public 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

public 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

public void setAttributes (Attributes attributes)

Sets the element's attributes

Parameters
attributes the element's attributes, possibly null

public void setDescriptor (ElementDescriptor descriptor)

Sets the mapped element descriptor.

Parameters
descriptor set this descriptor

public void setName (String name)

Sets the local name for this element.

Parameters
name the element name, possibly null

public void setNamespace (String namespace)

Sets the namespace URI for this element

Parameters
namespace the namespace uri, possibly null

public void setType (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

public String toString ()

Returns something useful for logging.