public class XMLFieldInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
VERSION |
static java.lang.String |
XMLTAG |
Constructor and Description |
---|
XMLFieldInfo()
Default constructor
|
XMLFieldInfo(java.lang.String[] path)
Create a XMLFieldInfo object from path, a string array
|
XMLFieldInfo(java.lang.String[] path,
java.lang.String attrName)
Create a XMLFieldInfo object from path and a specified attribute
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createAttributeNameFromString(java.lang.String str)
for internal use only
|
static java.lang.String |
createAttributeNameFromString(java.lang.String str,
java.lang.String delimiter)
for internal use only
|
static java.lang.String[] |
createPathFromString(java.lang.String pathStr)
for internal use only
|
static java.lang.String[] |
createPathFromString(java.lang.String pathStr,
java.lang.String delimiter)
for internal use only
|
static XMLFieldInfo |
createXMLFieldInfo(java.io.DataInput in,
int version)
for internal use only
|
static XMLFieldInfo |
createXMLFieldInfo(java.io.DataInput in,
int version,
boolean decode)
for internal use only
|
boolean |
equalsPath(XMLFieldInfo tmp)
for internal use only
|
java.lang.String |
getAlias()
Return the alias of this field If no alias defined, return the path string
|
java.lang.String |
getAttributeDataType()
Returns the attribute data type
|
java.lang.String |
getAttributeName()
Returns the attribute name
|
java.lang.String |
getColumnName() |
java.lang.String |
getDataType() |
java.lang.String |
getDateFormat()
Returns the date format
|
java.lang.String |
getDisplayName()
for internal use only
|
static java.lang.String |
getDisplayName(java.lang.String[] path,
java.lang.String attrName)
for internal use only
|
java.lang.String |
getElementDataType()
Returns the element data type
|
java.lang.String[] |
getPath()
for internal use only
|
java.lang.String |
getPathToString()
for internal use only
|
int |
getXMLType()
Returns the XML type
|
boolean |
isExpandable()
for internal use only
|
boolean |
isRecursive()
for internal use only
|
boolean |
isRequired()
for internal use only
|
static XMLFieldInfo |
readXML(org.w3c.dom.Node dnode,
int version)
for internal use only
|
void |
setAlias(java.lang.String alias)
Sets the alias of this field
|
void |
setAttributeDataType(java.lang.String type)
Sets the attribute data type
|
void |
setAttributeName(java.lang.String attr)
Sets the attribute name
|
void |
setDateFormat(java.lang.String format)
Sets the date format
|
void |
setElementDataType(java.lang.String type)
Sets the element data type
|
void |
setIsExpandable(boolean state)
for internal use only
|
void |
setIsRequired(boolean state)
for internal use only
|
void |
setPath(java.lang.String[] path)
for internal use only
|
void |
setRecursive(boolean state)
for internal use only
|
void |
setXMLType(int type)
Sets the xml type
|
java.lang.String |
toString()
Returns the string representation of this field
|
void |
write(java.io.DataOutput out)
for internal use only
|
void |
write(java.io.DataOutput out,
boolean encode)
for internal use only
|
void |
writeXML(java.io.Writer dout)
for internal use only
|
public static final java.lang.String XMLTAG
public static final int VERSION
public XMLFieldInfo()
public XMLFieldInfo(java.lang.String[] path)
path
- , a string array represents the path to this fieldpublic XMLFieldInfo(java.lang.String[] path, java.lang.String attrName)
path
- , a string array represents the path to the elementattrName
- , the attribute namepublic boolean equalsPath(XMLFieldInfo tmp)
public java.lang.String[] getPath()
public void setPath(java.lang.String[] path)
public java.lang.String getDisplayName()
public java.lang.String getPathToString()
public java.lang.String getColumnName()
public static java.lang.String getDisplayName(java.lang.String[] path, java.lang.String attrName)
public static java.lang.String[] createPathFromString(java.lang.String pathStr)
public static java.lang.String[] createPathFromString(java.lang.String pathStr, java.lang.String delimiter)
public static java.lang.String createAttributeNameFromString(java.lang.String str)
public static java.lang.String createAttributeNameFromString(java.lang.String str, java.lang.String delimiter)
public java.lang.String getElementDataType()
public void setElementDataType(java.lang.String type)
type
- a string represents the element data typepublic java.lang.String getAttributeDataType()
public void setAttributeDataType(java.lang.String type)
type
- a string represents the attribute data typepublic java.lang.String getAttributeName()
public void setAttributeName(java.lang.String attr)
attr
- a string represents the attribute namepublic java.lang.String getDateFormat()
public void setDateFormat(java.lang.String format)
the
- date formatpublic java.lang.String getDataType()
public int getXMLType()
public void setXMLType(int type)
type
- , an integer of xml typepublic boolean isExpandable()
public void setIsExpandable(boolean state)
public boolean isRequired()
public void setIsRequired(boolean state)
public boolean isRecursive()
public void setRecursive(boolean state)
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
alias
- , a string represents the alias of this fieldpublic void write(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void write(java.io.DataOutput out, boolean encode) throws java.io.IOException
java.io.IOException
public static XMLFieldInfo createXMLFieldInfo(java.io.DataInput in, int version) throws java.io.IOException
java.io.IOException
public static XMLFieldInfo createXMLFieldInfo(java.io.DataInput in, int version, boolean decode) throws java.io.IOException
java.io.IOException
public void writeXML(java.io.Writer dout) throws java.io.IOException
java.io.IOException
public static XMLFieldInfo readXML(org.w3c.dom.Node dnode, int version) throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object