public class StructureObject
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static org.jdom.Namespace |
XSI_NAMESPACE |
Constructor and Description |
---|
StructureObject()
Default constructor.
|
StructureObject(org.jdom.Element data)
Construct the Structure Object object.
|
Modifier and Type | Method and Description |
---|---|
void |
createChildrenData(java.lang.String name)
Create Child level from current level
|
java.lang.String |
getAttr(java.lang.String attr)
Return Attribute Value from current level if Attribute found else return null
|
java.lang.String |
getAttr(java.lang.String col,
java.lang.String attr)
Return Attribute Value if Attribute found else return null
|
java.util.List |
getChildrenData()
Get child Elements as a list
|
java.util.List |
getChildrenData(java.lang.String tag)
Get list of Elements for the given tag name
|
java.lang.String |
getCurrentAction()
Return value for the current level action
|
org.jdom.Element |
getCurrentData()
Return currentData Element
|
java.lang.String |
getCurrentData(java.lang.String col)
Return value for the column name in CurrentData Element as String Value
|
java.lang.String |
getCurrentDataAsBinaryText(java.lang.String col)
Return value for the column name in CurrentData Element as binry text
|
boolean |
getCurrentDataAsBoolean(java.lang.String col)
Return value for the column name in CurrentData Element as boolean
|
byte[] |
getCurrentDataAsBytes(java.lang.String col)
Return value for the column name in CurrentData Element as byte Value
|
java.util.Date |
getCurrentDataAsDate(java.lang.String col)
Return value for the column name in CurrentData Element as date
|
double |
getCurrentDataAsDouble(java.lang.String col)
Return value for the column name in CurrentData Element as double
|
org.jdom.Element |
getCurrentDataAsElement(java.lang.String key)
Return value for the column name in CurrentData Element as Element object
|
int |
getCurrentDataAsInt(java.lang.String col)
Return value for the column name in CurrentData Element as integer
|
java.util.List |
getCurrentDataAsList(java.lang.String key)
Return value for the column name in CurrentData Element as Element Array
object
|
long |
getCurrentDataAsLong(java.lang.String col)
Return value for the column name in CurrentData Element as long
|
java.lang.String |
getCurrentDataAsString(java.lang.String col)
Return value for the column name in CurrentData Element as String Value
|
java.lang.String |
getCurrentNamespacePrefix()
Return current namespace value
|
java.lang.String |
getCurrentNamespaceURI()
Return current namespace URI value
|
StructureObject |
getCurrentObject()
Return Main MBO which associated with current noun
|
java.lang.String |
getGL(java.lang.String col)
Return value for the GL column name in CurrentData Element as String
Value
|
java.lang.String |
getGL(java.lang.String col,
java.lang.String orgId)
Return value for the GL column name in CurrentData Element as String
Value
|
java.lang.String |
getGLComponent(java.lang.String col,
int order,
java.lang.String orgId)
Return value GL component for the specified order
|
java.lang.String |
getName()
Get Name of the Element
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
Get Map of all namespaces
|
int |
getOverrideType(java.lang.String col,
int currentType)
Return current type of the field
|
org.jdom.Element |
getParentData()
Return parentData Element
|
java.lang.String |
getParentData(java.lang.String col)
Return value for the column name from the parent Data Element as String
Value
|
java.lang.String |
getRowStamp()
Return value for the column name in CurrentData Element as String Value
|
boolean |
hasChildren()
Get child Elements as a list
|
boolean |
hasDetailData(java.lang.String tag)
Get list of Elements for the given Object Structure detail level
|
boolean |
isCurrentActionNull()
Determine whether Action of the current data of
Structure Object is null
|
boolean |
isCurrentDataChanged(java.lang.String col)
Return TRUE or FALSE depending of null value in the column
|
boolean |
isCurrentDataNull(java.lang.String col)
Return TRUE or FALSE depending of null value in the column
|
boolean |
isGLDataNull(java.lang.String col)
Return TRUE or FALSE depending of null value in the GL column
|
boolean |
isGLDataNull(java.lang.String col,
java.lang.String orgId)
Return TRUE or FALSE depending of null value in the GL column
|
boolean |
isInCurrentData(java.lang.String col)
Return TRUE or FALSE depending of null value in the column
|
void |
removeChildData(java.lang.String childName,
int index)
Remove the specified child of the CurrentData Element at the specified
index.
|
void |
removeChildren(java.lang.String childName)
Remove the specified child of the CurrentData Element
|
void |
removeFromCurrentData(java.lang.String col)
Remove a column from the currentdata
|
void |
setCurrentAction(java.lang.String action)
Set current Element action
|
void |
setCurrentData(java.lang.String colname,
byte[] data)
Put element to Current Data Element object as bytes
|
void |
setCurrentData(java.lang.String colname,
java.util.Date data)
Put element to Current Data Element object as date
|
void |
setCurrentData(java.lang.String colname,
double data)
Put element to Current Data Element object as double
|
void |
setCurrentData(java.lang.String colname,
int data)
Put element to Current Data Element object as integer
|
void |
setCurrentData(java.lang.String colname,
long data)
Put element to Current Data Element object as long
|
void |
setCurrentData(java.lang.String colname,
java.lang.String data)
Add element to Current Data Element object as string
|
void |
setCurrentDataNull(java.lang.String colname)
Set data in curent data to null
|
void |
setCurrentNamespace(java.lang.String pref,
java.lang.String uri)
Srt current namespace value
|
void |
setGL(java.lang.String colname,
java.lang.String glString)
Construct and set the GLAccount from the given gl string
|
void |
setGL(java.lang.String colname,
java.lang.String[] glSegments)
Deprecated.
- Please use method with orgId
|
void |
setGL(java.lang.String colname,
java.lang.String[] glSegments,
java.lang.String orgId)
Construct and set the GLAccount from the given gl segments
|
void |
setNamespaces(java.lang.String key,
java.lang.String data)
Set Map of all namespaces
|
void |
setXPathData(java.lang.String xPathExpression,
java.lang.String data)
Get Data using XPath expression
|
java.lang.String |
toString()
return a string for structure to be able to use the structure as a string
anywhere such as in System.out.println
|
public StructureObject()
public StructureObject(org.jdom.Element data)
data
- Current element.public java.lang.String getName()
public void createChildrenData(java.lang.String name)
name
- Name of the child level. This will still maintain the current
data pointer to the current level and not move to the child
level.public java.util.List getChildrenData(java.lang.String tag)
tag
- The name of the child level.public boolean hasDetailData(java.lang.String tag)
tag
- The name of the child level.public java.util.List getChildrenData()
public boolean hasChildren()
public boolean isCurrentActionNull()
public org.jdom.Element getCurrentData()
public StructureObject getCurrentObject()
public org.jdom.Element getParentData()
public java.lang.String getAttr(java.lang.String col, java.lang.String attr)
col
- Give column name.attr
- Give Attribute name.public java.lang.String getAttr(java.lang.String attr)
attr
- Give Attribute name.public void removeFromCurrentData(java.lang.String col)
col
- Give element name to remove.public void removeChildData(java.lang.String childName, int index)
childName
- Give element name to remove.index
- Give index of the element to remove.public void removeChildren(java.lang.String childName)
childName
- Give column name.public java.lang.String getCurrentData(java.lang.String col) throws MXException
col
- Give column name.MXException
public byte[] getCurrentDataAsBytes(java.lang.String col) throws MXException
col
- Give column name.MXException
public java.lang.String getCurrentDataAsBinaryText(java.lang.String col) throws MXException
col
- Give column name.MXException
public java.lang.String getParentData(java.lang.String col)
col
- Give column name.public boolean isCurrentDataNull(java.lang.String col) throws MXException
col
- Give column name.MXException
public boolean isGLDataNull(java.lang.String col) throws MXException
col
- Give GL column name.MXException
public boolean isGLDataNull(java.lang.String col, java.lang.String orgId) throws MXException
col
- Give GL column name.orgId
- Give organization.MXException
public boolean isInCurrentData(java.lang.String col)
col
- Give column name.public boolean isCurrentDataChanged(java.lang.String col)
col
- Give column name.public double getCurrentDataAsDouble(java.lang.String col) throws MXException
col
- Give column name.MXException
public int getCurrentDataAsInt(java.lang.String col) throws MXException
col
- Give column name.MXException
public long getCurrentDataAsLong(java.lang.String col) throws MXException
col
- Give column name.MXException
public java.util.Date getCurrentDataAsDate(java.lang.String col) throws MXException
col
- Give column name.MXException
public boolean getCurrentDataAsBoolean(java.lang.String col) throws MXException
col
- Give column name.MXException
public org.jdom.Element getCurrentDataAsElement(java.lang.String key)
key
- Give key name.public java.util.List getCurrentDataAsList(java.lang.String key)
key
- Give key name.public java.lang.String getGL(java.lang.String col) throws MXException
col
- Give column name.MXException
public java.lang.String getGL(java.lang.String col, java.lang.String orgId) throws MXException
col
- Give column name.orgId
- Give organization.MXException
public java.lang.String getGLComponent(java.lang.String col, int order, java.lang.String orgId) throws MXException
col
- Give column name.order
- GL order.orgId
- the ORGID.MXException
public java.lang.String getCurrentAction()
public void setCurrentData(java.lang.String colname, java.lang.String data)
col
- Give column name.data
- Give column value as string.public void setCurrentAction(java.lang.String action)
action
- action value to be set.public void setCurrentDataNull(java.lang.String colname)
colname
- Give column name.public void setCurrentData(java.lang.String colname, java.util.Date data)
colname
- Give column name.data
- Give column value as date.public void setCurrentData(java.lang.String colname, double data)
colname
- Give column name.data
- Give column value as double.public void setCurrentData(java.lang.String colname, long data)
colname
- Give column name.data
- Give column value as long.public void setCurrentData(java.lang.String colname, int data)
colname
- Give column name.data
- Give column value as integer.public void setCurrentData(java.lang.String colname, byte[] data) throws MXException
colname
- Give column name.data
- Give column value as bytes.MXException
public void setGL(java.lang.String colname, java.lang.String[] glSegments) throws MXException
colname
- the column nameglSegments
- the gl segments arrayMXException
public void setGL(java.lang.String colname, java.lang.String[] glSegments, java.lang.String orgId) throws MXException
colname
- the column nameglSegments
- the gl segments arrayorgId
- the organizationMXException
public void setGL(java.lang.String colname, java.lang.String glString)
colname
- the column nameglString
- the gl segments arraypublic void setXPathData(java.lang.String xPathExpression, java.lang.String data) throws MXException
MXException
public int getOverrideType(java.lang.String col, int currentType) throws MXException
col
- Give column name.currentType
- max typeMXException
public java.lang.String getCurrentDataAsString(java.lang.String col) throws MXException
col
- Give column name.MXException
public java.lang.String getRowStamp() throws MXException
col
- Give column name.MXException
public java.lang.String getCurrentNamespacePrefix()
public java.lang.String getCurrentNamespaceURI()
public void setCurrentNamespace(java.lang.String pref, java.lang.String uri)
pref
- Give namespace prefix value.uri
- Give namespace uri value.public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
public void setNamespaces(java.lang.String key, java.lang.String data)
key
- key to access namespacedata
- namespacepublic java.lang.String toString()
toString
in class java.lang.Object