Package org.apache.openjpa.meta
Class XMLFieldMetaData
java.lang.Object
org.apache.openjpa.meta.XMLFieldMetaData
- All Implemented Interfaces:
Serializable
,XMLMetaData
Contains metadata about an xml element or attribute
- Since:
- 1.0.0
- Author:
- Catalina Wei
- See Also:
-
Field Summary
Fields inherited from interface org.apache.openjpa.meta.XMLMetaData
ATTRIBUTE, defaultName, ELEMENT, XMLTYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(String name, XMLMetaData field) getFieldMapping
(String name) Return XMLMapping for a given field.getName()
Return the mapping name.getType()
Return type.int
Return type code.Return xml element tag name or xml attribute name.Return xml namespace.int
Return xmltypeboolean
Return true if mapping on an XmlAttribute.boolean
Return true if mapping on an XmlElement.boolean
Return true if mapping on an XmlRootElement.void
Set field name.void
Set type.void
setTypeCode
(int code) void
setXmlname
(String name) Set xml element or attribute name.void
setXmlnamespace
(String name) Set namespace.void
setXmlRootElement
(boolean isXmlRootElement) void
setXmltype
(int type) Set xmltype
-
Constructor Details
-
XMLFieldMetaData
public XMLFieldMetaData() -
XMLFieldMetaData
-
-
Method Details
-
getType
Description copied from interface:XMLMetaData
Return type.- Specified by:
getType
in interfaceXMLMetaData
-
setType
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
Description copied from interface:XMLMetaData
Set field name.- Specified by:
setName
in interfaceXMLMetaData
- Parameters:
name
- the field name.
-
getName
Description copied from interface:XMLMetaData
Return the mapping name.- Specified by:
getName
in interfaceXMLMetaData
-
setXmlname
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
Description copied from interface:XMLMetaData
Return xml element tag name or xml attribute name.- Specified by:
getXmlname
in interfaceXMLMetaData
-
setXmlnamespace
Description copied from interface:XMLMetaData
Set namespace.- Specified by:
setXmlnamespace
in interfaceXMLMetaData
-
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
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
- Specified by:
addField
in interfaceXMLMetaData
-