org.apache.openjpa.meta
Class XMLFieldMetaData

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

public class XMLFieldMetaData
extends Object
implements XMLMetaData

Contains metadata about an xml element or attribute

Since:
1.0.0
Author:
Catalina Wei
See Also:
Serialized Form

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

Constructor Detail

XMLFieldMetaData

public XMLFieldMetaData()

XMLFieldMetaData

public XMLFieldMetaData(Class type,
                        String name)
Method Detail

getType

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

Specified by:
getType in interface XMLMetaData

setType

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

Specified by:
setType in interface XMLMetaData

getTypeCode

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

Specified by:
getTypeCode in interface XMLMetaData

setTypeCode

public void setTypeCode(int code)

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

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

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.

setXmlRootElement

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

addField

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


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