org.apache.openjpa.meta
Class XMLClassMetaData

java.lang.Object
  extended by org.apache.openjpa.meta.XMLClassMetaData
All Implemented Interfaces:
Serializable, XMLMetaData

public class XMLClassMetaData
extends Object
implements XMLMetaData

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.openjpa.meta.XMLMetaData
ATTRIBUTE, defaultName, ELEMENT, XMLTYPE
 
Constructor Summary
XMLClassMetaData(Class type)
          Constructor.
XMLClassMetaData(Class type, String name)
          Constructor.
 
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 name)
          Set namespace.
 void setXmlRootElement(boolean isXMLRootElement)
           
 void setXmltype(int type)
          Set xmltype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLClassMetaData

public XMLClassMetaData(Class type,
                        String name)
Constructor.

Parameters:
type - the class that contains XmlType annotation.

XMLClassMetaData

public XMLClassMetaData(Class type)
Constructor.

Parameters:
type - the class that contains XmlType annotation.
Method Detail

setName

public void setName(String name)
Description copied from interface: XMLMetaData
Set field name.

Specified by:
setName in interface XMLMetaData
Parameters:
name - the field name.

getName

public String getName()
Description copied from interface: XMLMetaData
Return the mapping name.

Specified by:
getName in interface XMLMetaData

setXmlname

public void setXmlname(String name)
Description copied from interface: XMLMetaData
Set xml element or attribute name.

Specified by:
setXmlname in interface XMLMetaData
Parameters:
name - the element name or attribute name

getXmlname

public String getXmlname()
Description copied from interface: XMLMetaData
Return xml element tag name or xml attribute name.

Specified by:
getXmlname in interface XMLMetaData

setXmlnamespace

public void setXmlnamespace(String name)
Description copied from interface: XMLMetaData
Set namespace.

Specified by:
setXmlnamespace in interface XMLMetaData

getXmlnamespace

public String getXmlnamespace()
Description copied from interface: XMLMetaData
Return xml namespace.

Specified by:
getXmlnamespace in interface XMLMetaData

setXmlRootElement

public void setXmlRootElement(boolean isXMLRootElement)
Specified by:
setXmlRootElement in interface XMLMetaData

isXmlRootElement

public boolean isXmlRootElement()
Description copied from interface: XMLMetaData
Return true if mapping on an XmlRootElement.

Specified by:
isXmlRootElement in interface XMLMetaData

isXmlElement

public boolean isXmlElement()
Description copied from interface: XMLMetaData
Return true if mapping on an XmlElement.

Specified by:
isXmlElement in interface XMLMetaData

isXmlAttribute

public boolean isXmlAttribute()
Description copied from interface: XMLMetaData
Return true if mapping on an XmlAttribute.

Specified by:
isXmlAttribute in interface XMLMetaData

getFieldMapping

public XMLMetaData getFieldMapping(String name)
Description copied from interface: XMLMetaData
Return XMLMapping for a given field.

Specified by:
getFieldMapping in interface XMLMetaData
Parameters:
name - the field name.
Returns:
XMLMapping.

setType

public void setType(Class type)
Description copied from interface: XMLMetaData
Set type.

Specified by:
setType in interface XMLMetaData

getType

public Class getType()
Description copied from interface: XMLMetaData
Return type.

Specified by:
getType in interface XMLMetaData

getTypeCode

public int getTypeCode()
Description copied from interface: XMLMetaData
Return type code.

Specified by:
getTypeCode in interface XMLMetaData

setXmltype

public void setXmltype(int type)
Description copied from interface: XMLMetaData
Set xmltype

Specified by:
setXmltype in interface XMLMetaData
Parameters:
type - XMLTYPE, ELEMENT, or ATTRIBUTE

getXmltype

public int getXmltype()
Description copied from interface: XMLMetaData
Return xmltype

Specified by:
getXmltype in interface XMLMetaData
Returns:
xmltype

addField

public void addField(String name,
                     XMLMetaData field)
Specified by:
addField in interface XMLMetaData


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