Package org.apache.openjpa.meta
Interface XMLMetaData
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
XMLClassMetaData
,XMLFieldMetaData
Describe metadata about an xml type.
- Since:
- 1.0.0
- Author:
- Catalina Wei
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
JAXB XML binding default namestatic final int
static final int
-
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
setXmlname
(String name) Set xml element or attribute name.void
setXmlnamespace
(String namespace) Set namespace.void
setXmlRootElement
(boolean isXmlRootElement) void
setXmltype
(int type) Set xmltype
-
Field Details
-
defaultName
JAXB XML binding default name- See Also:
-
XMLTYPE
static final int XMLTYPE- See Also:
-
ELEMENT
static final int ELEMENT- See Also:
-
ATTRIBUTE
static final int ATTRIBUTE- See Also:
-
-
Method Details
-
isXmlRootElement
boolean isXmlRootElement()Return true if mapping on an XmlRootElement. -
isXmlElement
boolean isXmlElement()Return true if mapping on an XmlElement. -
isXmlAttribute
boolean isXmlAttribute()Return true if mapping on an XmlAttribute. -
getFieldMapping
Return XMLMapping for a given field.- Parameters:
name
- the field name.- Returns:
- XMLMapping.
-
setType
Set type. -
getType
Class getType()Return type. -
getTypeCode
int getTypeCode()Return type code. -
getName
String getName()Return the mapping name. -
getXmlname
String getXmlname()Return xml element tag name or xml attribute name. -
getXmlnamespace
String getXmlnamespace()Return xml namespace. -
setName
Set field name.- Parameters:
name
- the field name.
-
setXmlname
Set xml element or attribute name.- Parameters:
name
- the element name or attribute name
-
setXmlnamespace
Set namespace. -
setXmltype
void setXmltype(int type) Set xmltype- Parameters:
type
- XMLTYPE, ELEMENT, or ATTRIBUTE
-
getXmltype
int getXmltype()Return xmltype- Returns:
- xmltype
-
setXmlRootElement
void setXmlRootElement(boolean isXmlRootElement) -
addField
-