Package org.apache.openjpa.meta
Class XMLFieldMetaData
- java.lang.Object
-
- org.apache.openjpa.meta.XMLFieldMetaData
-
- All Implemented Interfaces:
java.io.Serializable
,XMLMetaData
public class XMLFieldMetaData extends java.lang.Object implements XMLMetaData
Contains metadata about an xml element or attribute- Since:
- 1.0.0
- Author:
- Catalina Wei
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.meta.XMLMetaData
ATTRIBUTE, defaultName, ELEMENT, XMLTYPE
-
-
Constructor Summary
Constructors Constructor Description XMLFieldMetaData()
XMLFieldMetaData(java.lang.Class type, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(java.lang.String name, XMLMetaData field)
XMLMetaData
getFieldMapping(java.lang.String name)
Return XMLMapping for a given field.java.lang.String
getName()
Return the mapping name.java.lang.Class
getType()
Return type.int
getTypeCode()
Return type code.java.lang.String
getXmlname()
Return xml element tag name or xml attribute name.java.lang.String
getXmlnamespace()
Return xml namespace.int
getXmltype()
Return xmltypeboolean
isXmlAttribute()
Return true if mapping on an XmlAttribute.boolean
isXmlElement()
Return true if mapping on an XmlElement.boolean
isXmlRootElement()
Return true if mapping on an XmlRootElement.void
setName(java.lang.String name)
Set field name.void
setType(java.lang.Class type)
Set type.void
setTypeCode(int code)
void
setXmlname(java.lang.String name)
Set xml element or attribute name.void
setXmlnamespace(java.lang.String name)
Set namespace.void
setXmlRootElement(boolean isXmlRootElement)
void
setXmltype(int type)
Set xmltype
-
-
-
Method Detail
-
getType
public java.lang.Class getType()
Description copied from interface:XMLMetaData
Return type.- Specified by:
getType
in interfaceXMLMetaData
-
setType
public void setType(java.lang.Class type)
Description copied from interface:XMLMetaData
Set type.- Specified by:
setType
in interfaceXMLMetaData
-
getTypeCode
public int getTypeCode()
Description copied from interface:XMLMetaData
Return type code.- Specified by:
getTypeCode
in interfaceXMLMetaData
-
setTypeCode
public void setTypeCode(int code)
-
setName
public void setName(java.lang.String name)
Description copied from interface:XMLMetaData
Set field name.- Specified by:
setName
in interfaceXMLMetaData
- Parameters:
name
- the field name.
-
getName
public java.lang.String getName()
Description copied from interface:XMLMetaData
Return the mapping name.- Specified by:
getName
in interfaceXMLMetaData
-
setXmlname
public void setXmlname(java.lang.String name)
Description copied from interface:XMLMetaData
Set xml element or attribute name.- Specified by:
setXmlname
in interfaceXMLMetaData
- Parameters:
name
- the element name or attribute name
-
getXmlname
public java.lang.String getXmlname()
Description copied from interface:XMLMetaData
Return xml element tag name or xml attribute name.- Specified by:
getXmlname
in interfaceXMLMetaData
-
setXmlnamespace
public void setXmlnamespace(java.lang.String name)
Description copied from interface:XMLMetaData
Set namespace.- Specified by:
setXmlnamespace
in interfaceXMLMetaData
-
getXmlnamespace
public java.lang.String getXmlnamespace()
Description copied from interface:XMLMetaData
Return xml namespace.- Specified by:
getXmlnamespace
in interfaceXMLMetaData
-
setXmltype
public void setXmltype(int type)
Description copied from interface:XMLMetaData
Set xmltype- Specified by:
setXmltype
in interfaceXMLMetaData
- Parameters:
type
- XMLTYPE, ELEMENT, or ATTRIBUTE
-
getXmltype
public int getXmltype()
Description copied from interface:XMLMetaData
Return xmltype- Specified by:
getXmltype
in interfaceXMLMetaData
- Returns:
- xmltype
-
isXmlRootElement
public boolean isXmlRootElement()
Description copied from interface:XMLMetaData
Return true if mapping on an XmlRootElement.- Specified by:
isXmlRootElement
in interfaceXMLMetaData
-
isXmlElement
public boolean isXmlElement()
Description copied from interface:XMLMetaData
Return true if mapping on an XmlElement.- Specified by:
isXmlElement
in interfaceXMLMetaData
-
isXmlAttribute
public boolean isXmlAttribute()
Description copied from interface:XMLMetaData
Return true if mapping on an XmlAttribute.- Specified by:
isXmlAttribute
in interfaceXMLMetaData
-
getFieldMapping
public XMLMetaData getFieldMapping(java.lang.String name)
Description copied from interface:XMLMetaData
Return XMLMapping for a given field.- Specified by:
getFieldMapping
in interfaceXMLMetaData
- Parameters:
name
- the field name.- Returns:
- XMLMapping.
-
setXmlRootElement
public void setXmlRootElement(boolean isXmlRootElement)
- Specified by:
setXmlRootElement
in interfaceXMLMetaData
-
addField
public void addField(java.lang.String name, XMLMetaData field)
- Specified by:
addField
in interfaceXMLMetaData
-
-