Package org.apache.openjpa.meta
Interface XMLMetaData
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
XMLClassMetaData
,XMLFieldMetaData
public interface XMLMetaData extends java.io.Serializable
Describe metadata about an xml type.- Since:
- 1.0.0
- Author:
- Catalina Wei
-
-
Field Summary
Fields Modifier and Type Field Description static int
ATTRIBUTE
static java.lang.String
defaultName
JAXB XML binding default namestatic int
ELEMENT
static int
XMLTYPE
-
Method Summary
All Methods Instance Methods Abstract 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
setXmlname(java.lang.String name)
Set xml element or attribute name.void
setXmlnamespace(java.lang.String namespace)
Set namespace.void
setXmlRootElement(boolean isXmlRootElement)
void
setXmltype(int type)
Set xmltype
-
-
-
Field Detail
-
defaultName
static final java.lang.String defaultName
JAXB XML binding default name- See Also:
- Constant Field Values
-
XMLTYPE
static final int XMLTYPE
- See Also:
- Constant Field Values
-
ELEMENT
static final int ELEMENT
- See Also:
- Constant Field Values
-
ATTRIBUTE
static final int ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
XMLMetaData getFieldMapping(java.lang.String name)
Return XMLMapping for a given field.- Parameters:
name
- the field name.- Returns:
- XMLMapping.
-
setType
void setType(java.lang.Class type)
Set type.
-
getType
java.lang.Class getType()
Return type.
-
getTypeCode
int getTypeCode()
Return type code.
-
getName
java.lang.String getName()
Return the mapping name.
-
getXmlname
java.lang.String getXmlname()
Return xml element tag name or xml attribute name.
-
getXmlnamespace
java.lang.String getXmlnamespace()
Return xml namespace.
-
setName
void setName(java.lang.String name)
Set field name.- Parameters:
name
- the field name.
-
setXmlname
void setXmlname(java.lang.String name)
Set xml element or attribute name.- Parameters:
name
- the element name or attribute name
-
setXmlnamespace
void setXmlnamespace(java.lang.String namespace)
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
void addField(java.lang.String name, XMLMetaData field)
-
-