Class XMLFieldMetaData

java.lang.Object
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:
  • Constructor Details

    • XMLFieldMetaData

      public XMLFieldMetaData()
    • XMLFieldMetaData

      public XMLFieldMetaData(Class type, String name)
  • Method Details

    • 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