org.apache.openjpa.meta
Interface XMLMetaData

All Superinterfaces:
Serializable
All Known Implementing Classes:
XMLClassMetaData, XMLFieldMetaData

public interface XMLMetaData
extends Serializable

Describe metadata about an xml type.

Since:
1.0.0
Author:
Catalina Wei

Field Summary
static int ATTRIBUTE
           
static String defaultName
          JAXB XML binding default name
static int ELEMENT
           
static int XMLTYPE
           
 
Method Summary
 void addField(String name, XMLMetaData field)
           
 XMLMetaData getFieldMapping(String name)
          Return XMLMapping for a given field.
 String getName()
          Return the mapping name.
 Class getType()
          Return type.
 int getTypeCode()
          Return type code.
 String getXmlname()
          Return xml element tag name or xml attribute name.
 String getXmlnamespace()
          Return xml namespace.
 int getXmltype()
          Return xmltype
 boolean 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(String name)
          Set field name.
 void setType(Class type)
          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 Detail

defaultName

static final 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(String name)
Return XMLMapping for a given field.

Parameters:
name - the field name.
Returns:
XMLMapping.

setType

void setType(Class type)
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

void setName(String name)
Set field name.

Parameters:
name - the field name.

setXmlname

void setXmlname(String name)
Set xml element or attribute name.

Parameters:
name - the element name or attribute name

setXmlnamespace

void setXmlnamespace(String namespace)
Set namespace.

Parameters:
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(String name,
              XMLMetaData field)


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.