org.xeril.xml
Class XmlMapDescriptor

java.lang.Object
  |
  +--org.xeril.xml.XmlMapDescriptor

public class XmlMapDescriptor
extends java.lang.Object

This class holds the information for mapping a java field to an XML tag, and also to a type if necessary.

By default there are no mapper, no indexed mapper and the field is shown


Constructor Summary
XmlMapDescriptor(java.lang.String field_name)
          Builds a map descriptor by providing the field name.
XmlMapDescriptor(java.lang.String field_name, java.lang.String xml_name)
          Builds a map descriptor by providing the field name and the xml name
 
Method Summary
 java.lang.String getFieldName()
          Access function
 XmlMapper getIndexedMapper()
          Access function.
 XmlMapper getMapper()
          Access function.
 java.lang.String getXmlName()
          Access function
 void hide()
          Hides this field
 boolean isHidden()
          Access function.
 void setIndexedMapper(XmlMapper indexed_mapper)
          Access function.
 void setMapper(XmlMapper mapper)
          Access function.
 void setXmlName(java.lang.String xml_name)
          Access function.
 void show()
          Shows this field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMapDescriptor

public XmlMapDescriptor(java.lang.String field_name,
                        java.lang.String xml_name)
Builds a map descriptor by providing the field name and the xml name

Parameters:
field_name - the name of the field
xml_name - the name of the xml tag

XmlMapDescriptor

public XmlMapDescriptor(java.lang.String field_name)
Builds a map descriptor by providing the field name. The xml tag will then have the same value.

Parameters:
field_name - the name of the field
Method Detail

getFieldName

public java.lang.String getFieldName()
Access function

Returns:
the field name

getXmlName

public java.lang.String getXmlName()
Access function

Returns:
the name of the xml tag

setXmlName

public void setXmlName(java.lang.String xml_name)
Access function. Sets the name of the xml tag

Parameters:
xml_name - the name of the xml tag

getMapper

public XmlMapper getMapper()
Access function. A mapper is used to map or unmap values between XML (String) and Java.

Returns:
the mapper

setMapper

public void setMapper(XmlMapper mapper)
Access function. Sets the mapper

Parameters:
mapper - the mapper to set

getIndexedMapper

public XmlMapper getIndexedMapper()
Access function. A mapper is used to map or unmap values between XML (String) and Java. This one is used for each element of an array.

Returns:
the mapper

setIndexedMapper

public void setIndexedMapper(XmlMapper indexed_mapper)
Access function. Sets the indexed mapper

Parameters:
indexed_mapper - the indexed mapper to set

isHidden

public boolean isHidden()
Access function. Returns true if this field should be hidden

Returns:
true if field is hidden

hide

public void hide()
Hides this field


show

public void show()
Shows this field