|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.XMLBeanInfo
public class XMLBeanInfo
XMLBeanInfo
represents the XML metadata information
used to map a Java Bean cleanly to XML. This provides a default
introspection mechansim, rather like BeanInfo
which can be customized through some mechansim, either via Java code
or XSLT for example.
ID
and IDREF
Attribute NamesThese special attributes are defined in the xml specification. They are used by Betwixt to write bean graphs with cyclic references. In most cases, these will take the values 'id' and 'idref' respectively but these names can be varied in the DTD. Therefore, these names are specified by this class but default to the usual values.
Constructor Summary | |
---|---|
XMLBeanInfo(java.lang.Class beanClass)
Base constructor |
Method Summary | |
---|---|
java.lang.Class |
getBeanClass()
Gets the beans class that this XML info refers to |
ElementDescriptor |
getElementDescriptor()
Gets descriptor for bean represention |
AttributeDescriptor |
getIDAttribute()
Search attributes for one matching ID attribute name |
java.lang.String |
getIDAttributeName()
Get name of ID attribute. |
java.lang.String |
getIDREFAttributeName()
Get IDREF attribute name
This is used (for example) to deal with cyclic references. |
void |
setBeanClass(java.lang.Class beanClass)
Sets the beans class that this XML info refers to |
void |
setElementDescriptor(ElementDescriptor elementDescriptor)
Sets descriptor for bean represention |
void |
setIDAttributeName(java.lang.String idAttributeName)
Set name of ID attribute
This is used to write (for example) automatic ID
attribute values. |
void |
setIDREFAttributeName(java.lang.String idrefAttributeName)
Set IDREF attribute name
This is used (for example) to deal with cyclic references. |
java.lang.String |
toString()
Gets log-friendly string representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLBeanInfo(java.lang.Class beanClass)
beanClass
- for this ClassMethod Detail |
---|
public ElementDescriptor getElementDescriptor()
public void setElementDescriptor(ElementDescriptor elementDescriptor)
elementDescriptor
- descriptor for beanpublic java.lang.Class getBeanClass()
public void setBeanClass(java.lang.Class beanClass)
beanClass
- the class that this refers topublic AttributeDescriptor getIDAttribute()
ID
attribute name
public java.lang.String getIDAttributeName()
Get name of ID
attribute.
This is used to write (for example) automatic ID
attribute values.
The default name is 'id'.
ID
attributepublic void setIDAttributeName(java.lang.String idAttributeName)
ID
attribute
This is used to write (for example) automatic ID
attribute values.
The default name is 'id'.
idAttributeName
- the attribute name for the special ID
attributepublic java.lang.String getIDREFAttributeName()
Get IDREF
attribute name
This is used (for example) to deal with cyclic references.
The default name is 'idref'.
IDREF
attributepublic void setIDREFAttributeName(java.lang.String idrefAttributeName)
IDREF
attribute name
This is used (for example) to deal with cyclic references.
The default name is 'idref'.
idrefAttributeName
- the attribute name for the special IDREF
attributepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |