psdi.iface.mic

Class StructureObject

  • java.lang.Object
    • psdi.iface.mic.StructureObject
  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    StructureData


    public class StructureObject
    extends java.lang.Object
    implements java.lang.Cloneable
    Structure Object. Used to work with individual level
    • Constructor Summary

      Constructors 
      Constructor and Description
      StructureObject()
      Default constructor.
      StructureObject(org.jdom2.Element data)
      Construct the Structure Object object.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      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.util.Iterator getChildrenKeys()
      Get child Elements as a list
      java.lang.String getCurrentAction()
      Return value for the current level action
      org.jdom2.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.jdom2.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 getLocalRef() 
      java.lang.String getName()
      Get Name of the Element
      java.util.Map getNamespaces()
      Get Map of all namespaces
      int getOverrideType(java.lang.String col, int currentType)
      Return current type of the field
      org.jdom2.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 isContentLocalized() 
      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 isCurrentDataObject(java.lang.String col)
      Is child JSONObject or JSONArray so it is not an attribute but child object
      boolean isEditMode()
      Return indicator of edit mode
      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 isHidden()
      Determine whether Action of the current data of Structure Object is null
      boolean isInCurrentData(java.lang.String col)
      Return TRUE or FALSE depending of null value in the column
      boolean isSaveEditMode()
      Return indicator of edit mode
      boolean isSetValueMode()
      Return indicator of edit mode
      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
      protected org.jdom2.Element setCurrentData(java.lang.String colname)
      Add element to Current Data Element object
      void setCurrentData(java.lang.String colname, boolean data)
      Put element to Current Data Element object as long
      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 setEditMode(boolean editMode)
      Always return false if not JSON
      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 setSaveEditMode(boolean saveEditMode)
      Always return false if not JSON
      void setSetValueMode(boolean setValueMode)
      Always return false if not JSON
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • currentNamespacePrefix

        protected java.lang.String currentNamespacePrefix
      • currentNamespaceURI

        protected java.lang.String currentNamespaceURI
      • integrationLogger

        protected static final MXLogger integrationLogger
      • namespaces

        protected java.util.Map namespaces
      • XSI_NAMESPACE

        public static org.jdom2.Namespace XSI_NAMESPACE
      • editMode

        protected boolean editMode
      • setValueMode

        protected boolean setValueMode
      • saveEditMode

        protected boolean saveEditMode
      • contentLocalized

        protected boolean contentLocalized
    • Constructor Detail

      • StructureObject

        public StructureObject()
        Default constructor.
      • StructureObject

        public StructureObject(org.jdom2.Element data)
        Construct the Structure Object object.
        Parameters:
        data - Current element.
    • Method Detail

      • isContentLocalized

        public boolean isContentLocalized()
      • getName

        public java.lang.String getName()
        Get Name of the Element
        Returns:
        name of the element
      • createChildrenData

        public void createChildrenData(java.lang.String name)
        Create Child level from current level
        Parameters:
        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.
      • getChildrenData

        public java.util.List getChildrenData(java.lang.String tag)
        Get list of Elements for the given tag name
        Parameters:
        tag - The name of the child level.
        Returns:
        list of Elements for the given tag name
      • hasDetailData

        public boolean hasDetailData(java.lang.String tag)
        Get list of Elements for the given Object Structure detail level
        Parameters:
        tag - The name of the child level.
        Returns:
        list of Elements for the given tag name
      • getLocalRef

        public java.lang.String getLocalRef()
      • getChildrenKeys

        public java.util.Iterator getChildrenKeys()
        Get child Elements as a list
        Returns:
        list of Element for children
      • isCurrentDataObject

        public boolean isCurrentDataObject(java.lang.String col)
                                    throws MXException
        Is child JSONObject or JSONArray so it is not an attribute but child object
        Parameters:
        col - Give column name.
        Returns:
        true if object or false if not
        Throws:
        MXException
      • getChildrenData

        public java.util.List getChildrenData()
        Get child Elements as a list
        Returns:
        list of Element for children
      • hasChildren

        public boolean hasChildren()
        Get child Elements as a list
        Returns:
        list of Element for children
      • isCurrentActionNull

        public boolean isCurrentActionNull()
        Determine whether Action of the current data of Structure Object is null
        Returns:
        true is Action is null or empty string, false otherwise
      • isHidden

        public boolean isHidden()
                         throws MXException
        Determine whether Action of the current data of Structure Object is null
        Returns:
        true is Action is null or empty string, false otherwise
        Throws:
        MXException
      • getCurrentData

        public org.jdom2.Element getCurrentData()
        Return currentData Element
        Returns:
        Current Element
      • getCurrentObject

        public StructureObject getCurrentObject()
        Return Main MBO which associated with current noun
        Returns:
        Current object
      • getParentData

        public org.jdom2.Element getParentData()
        Return parentData Element
        Returns:
        Parent object
      • getAttr

        public java.lang.String getAttr(java.lang.String col,
                                        java.lang.String attr)
        Return Attribute Value if Attribute found else return null
        Parameters:
        col - Give column name.
        attr - Give Attribute name.
        Returns:
        attribute value
      • getAttr

        public java.lang.String getAttr(java.lang.String attr)
        Return Attribute Value from current level if Attribute found else return null
        Parameters:
        attr - Give Attribute name.
        Returns:
        attribute value
      • removeFromCurrentData

        public void removeFromCurrentData(java.lang.String col)
        Remove a column from the currentdata
        Parameters:
        col - Give element name to remove.
      • removeChildData

        public void removeChildData(java.lang.String childName,
                                    int index)
        Remove the specified child of the CurrentData Element at the specified index.
        Parameters:
        childName - Give element name to remove.
        index - Give index of the element to remove.
      • removeChildren

        public void removeChildren(java.lang.String childName)
        Remove the specified child of the CurrentData Element
        Parameters:
        childName - Give column name.
      • getCurrentData

        public java.lang.String getCurrentData(java.lang.String col)
                                        throws MXException
        Return value for the column name in CurrentData Element as String Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getCurrentDataAsBytes

        public byte[] getCurrentDataAsBytes(java.lang.String col)
                                     throws MXException
        Return value for the column name in CurrentData Element as byte Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getCurrentDataAsBinaryText

        public java.lang.String getCurrentDataAsBinaryText(java.lang.String col)
                                                    throws MXException
        Return value for the column name in CurrentData Element as binry text
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getParentData

        public java.lang.String getParentData(java.lang.String col)
        Return value for the column name from the parent Data Element as String Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from parent level
      • isCurrentDataNull

        public boolean isCurrentDataNull(java.lang.String col)
                                  throws MXException
        Return TRUE or FALSE depending of null value in the column
        Parameters:
        col - Give column name.
        Returns:
        Indicator for data to be null or not null
        Throws:
        MXException
      • isGLDataNull

        public boolean isGLDataNull(java.lang.String col)
                             throws MXException
        Return TRUE or FALSE depending of null value in the GL column
        Parameters:
        col - Give GL column name.
        Returns:
        Indicator for data to be null or not null
        Throws:
        MXException
      • isGLDataNull

        public boolean isGLDataNull(java.lang.String col,
                                    java.lang.String orgId)
                             throws MXException
        Return TRUE or FALSE depending of null value in the GL column
        Parameters:
        col - Give GL column name.
        orgId - Give organization.
        Returns:
        Indicator for data to be null or not null
        Throws:
        MXException
      • isInCurrentData

        public boolean isInCurrentData(java.lang.String col)
        Return TRUE or FALSE depending of null value in the column
        Parameters:
        col - Give column name.
        Returns:
        Indicator for data to be null or not null
      • isCurrentDataChanged

        public boolean isCurrentDataChanged(java.lang.String col)
        Return TRUE or FALSE depending of null value in the column
        Parameters:
        col - Give column name.
        Returns:
        Indicator for data to be null or not null
      • getCurrentDataAsDouble

        public double getCurrentDataAsDouble(java.lang.String col)
                                      throws MXException
        Return value for the column name in CurrentData Element as double
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level as double
        Throws:
        MXException
      • getCurrentDataAsInt

        public int getCurrentDataAsInt(java.lang.String col)
                                throws MXException
        Return value for the column name in CurrentData Element as integer
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level as integer
        Throws:
        MXException
      • getCurrentDataAsLong

        public long getCurrentDataAsLong(java.lang.String col)
                                  throws MXException
        Return value for the column name in CurrentData Element as long
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level as long
        Throws:
        MXException
      • getCurrentDataAsDate

        public java.util.Date getCurrentDataAsDate(java.lang.String col)
                                            throws MXException
        Return value for the column name in CurrentData Element as date
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level as date
        Throws:
        MXException
      • getCurrentDataAsBoolean

        public boolean getCurrentDataAsBoolean(java.lang.String col)
                                        throws MXException
        Return value for the column name in CurrentData Element as boolean
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level as boolean
        Throws:
        MXException
      • getCurrentDataAsElement

        public org.jdom2.Element getCurrentDataAsElement(java.lang.String key)
        Return value for the column name in CurrentData Element as Element object
        Parameters:
        key - Give key name.
        Returns:
        Column value from current level as Element object
      • getCurrentDataAsList

        public java.util.List getCurrentDataAsList(java.lang.String key)
        Return value for the column name in CurrentData Element as Element Array object
        Parameters:
        key - Give key name.
        Returns:
        Column value from current level as Element Array object
      • getGL

        public java.lang.String getGL(java.lang.String col)
                               throws MXException
        Return value for the GL column name in CurrentData Element as String Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getGL

        public java.lang.String getGL(java.lang.String col,
                                      java.lang.String orgId)
                               throws MXException
        Return value for the GL column name in CurrentData Element as String Value
        Parameters:
        col - Give column name.
        orgId - Give organization.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getGLComponent

        public java.lang.String getGLComponent(java.lang.String col,
                                               int order,
                                               java.lang.String orgId)
                                        throws MXException
        Return value GL component for the specified order
        Parameters:
        col - Give column name.
        order - GL order.
        orgId - the ORGID.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getCurrentAction

        public java.lang.String getCurrentAction()
        Return value for the current level action
        Returns:
        in CurrentData Element as String Value
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   java.lang.String data)
        Add element to Current Data Element object as string
        Parameters:
        col - Give column name.
        data - Give column value as string.
      • setCurrentData

        protected org.jdom2.Element setCurrentData(java.lang.String colname)
        Add element to Current Data Element object
        Parameters:
        colname - Give column name.
        Returns:
        element which was added
      • setCurrentAction

        public void setCurrentAction(java.lang.String action)
        Set current Element action
        Parameters:
        action - action value to be set.
      • setCurrentDataNull

        public void setCurrentDataNull(java.lang.String colname)
        Set data in curent data to null
        Parameters:
        colname - Give column name.
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   java.util.Date data)
        Put element to Current Data Element object as date
        Parameters:
        colname - Give column name.
        data - Give column value as date.
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   double data)
        Put element to Current Data Element object as double
        Parameters:
        colname - Give column name.
        data - Give column value as double.
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   long data)
        Put element to Current Data Element object as long
        Parameters:
        colname - Give column name.
        data - Give column value as long.
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   boolean data)
        Put element to Current Data Element object as long
        Parameters:
        colname - Give column name.
        data - Give column value as boolean.
        Throws:
        MXException
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   int data)
        Put element to Current Data Element object as integer
        Parameters:
        colname - Give column name.
        data - Give column value as integer.
      • setCurrentData

        public void setCurrentData(java.lang.String colname,
                                   byte[] data)
                            throws MXException
        Put element to Current Data Element object as bytes
        Parameters:
        colname - Give column name.
        data - Give column value as bytes.
        Throws:
        MXException
      • setGL

        public void setGL(java.lang.String colname,
                          java.lang.String[] glSegments)
                   throws MXException
        Deprecated. - Please use method with orgId
        Construct and set the GLAccount from the given gl segments
        Parameters:
        colname - the column name
        glSegments - the gl segments array
        Throws:
        MXException
      • setGL

        public void setGL(java.lang.String colname,
                          java.lang.String[] glSegments,
                          java.lang.String orgId)
                   throws MXException
        Construct and set the GLAccount from the given gl segments
        Parameters:
        colname - the column name
        glSegments - the gl segments array
        orgId - the organization
        Throws:
        MXException
      • setGL

        public void setGL(java.lang.String colname,
                          java.lang.String glString)
        Construct and set the GLAccount from the given gl string
        Parameters:
        colname - the column name
        glString - the gl segments array
      • setXPathData

        public void setXPathData(java.lang.String xPathExpression,
                                 java.lang.String data)
                          throws MXException
        Get Data using XPath expression
        Throws:
        MXException
      • getOverrideType

        public int getOverrideType(java.lang.String col,
                                   int currentType)
                            throws MXException
        Return current type of the field
        Parameters:
        col - Give column name.
        currentType - max type
        Returns:
        max type.
        Throws:
        MXException
      • getCurrentDataAsString

        public java.lang.String getCurrentDataAsString(java.lang.String col)
                                                throws MXException
        Return value for the column name in CurrentData Element as String Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getRowStamp

        public java.lang.String getRowStamp()
                                     throws MXException
        Return value for the column name in CurrentData Element as String Value
        Parameters:
        col - Give column name.
        Returns:
        Column value from current level
        Throws:
        MXException
      • getCurrentNamespacePrefix

        public java.lang.String getCurrentNamespacePrefix()
        Return current namespace value
        Returns:
        Current Namespace prefix value
      • getCurrentNamespaceURI

        public java.lang.String getCurrentNamespaceURI()
        Return current namespace URI value
        Returns:
        Current Namespace value
      • setCurrentNamespace

        public void setCurrentNamespace(java.lang.String pref,
                                        java.lang.String uri)
        Srt current namespace value
        Parameters:
        pref - Give namespace prefix value.
        uri - Give namespace uri value.
      • getNamespaces

        public java.util.Map getNamespaces()
        Get Map of all namespaces
        Returns:
        map of namespaces
      • setNamespaces

        public void setNamespaces(java.lang.String key,
                                  java.lang.String data)
        Set Map of all namespaces
        Parameters:
        key - key to access namespace
        data - namespace
      • setEditMode

        public void setEditMode(boolean editMode)
        Always return false if not JSON
      • isEditMode

        public boolean isEditMode()
        Return indicator of edit mode
        Returns:
        is edit mode
      • setSetValueMode

        public void setSetValueMode(boolean setValueMode)
        Always return false if not JSON
      • isSetValueMode

        public boolean isSetValueMode()
        Return indicator of edit mode
        Returns:
        is edit mode
      • setSaveEditMode

        public void setSaveEditMode(boolean saveEditMode)
        Always return false if not JSON
      • isSaveEditMode

        public boolean isSaveEditMode()
        Return indicator of edit mode
        Returns:
        is edit mode
      • toString

        public 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
        Overrides:
        toString in class java.lang.Object