com.etasoft.trans.map
Class axMapObject

java.lang.Object
  extended bycom.etasoft.trans.map.axMapObject
All Implemented Interfaces:
com.etasoft.gui.proptable.axGroupableProperty, axMapAddable, axSerializable, java.io.Serializable
Direct Known Subclasses:
axMapDataObject, axMapTransaction

public abstract class axMapObject
extends java.lang.Object
implements axMapAddable, com.etasoft.gui.proptable.axGroupableProperty, axSerializable

See Also:
Serialized Form

Nested Class Summary
 class axMapObject.axMapLoopWalker
          Looping iterator internal class.
 
Field Summary
protected  int m_index
           
protected  java.util.ArrayList m_items
           
protected  java.util.ArrayList m_mappings
           
protected  java.util.ArrayList m_mappingsFrom
           
protected  axMapItemType m_type
           
 
Method Summary
 void addItem(axMapObject obj)
          Add item.
 void addMapping(int index)
          Add mapping to other object.
 void addMappingsFromBack()
          Add mappings back when paste.
 void addMappingsFromBackInLoop(axMapObject childObj)
          Add mappings back when paste including child mappings.
 void buildMappingFrom(int index)
          Rebuild mappings from array.
 boolean equals(java.lang.Object obj)
          compare two axMapObjects.
static axMapObject findParent(axMapObject parent, axMapObject mapObj)
          Find parent based on map object.
 axMapPluginExecMethod getFunction()
          Get plug-in.
 java.lang.String getFunctionParameters()
          Get function parameters.
 int getIndex()
          Get Index.
 java.lang.String getName()
          Get Name
 axMapScript getScript()
          Get BeanShell script.
 java.lang.String getScriptParameters()
          Get BeanShell script parameters.
 int hashCode()
          Return unique hash code
 boolean hasItems()
          True - if contains subitems
 boolean hasMappings()
          Has mappings.
 java.lang.Integer id()
          Get Id.
 void insertItem(axMapObject obj, int offset)
          Insert item.
abstract  boolean isAddable(axMapObject obj)
           
abstract  boolean isAddable(java.lang.Class clazz)
           
 boolean isMapped()
          Is it mapped.
 boolean isMappedFrom(int index)
          Is it mapped from map object passed in.
 boolean isMappedTo()
          Is mapped to, is there any mappings pointing to this item.
 boolean isMappedTo(int index)
          Is this left item has mapping to the item on the right.
 boolean isParent()
          Contains other items.
 boolean isParentOfLoops()
          Contains other loops.
 axMapObject item(int index)
          Get Item.
 int itemCount()
          Count of items contained by this map object.
 java.util.Iterator iteratorItems()
          Iterator for items contained by this item
 java.util.Iterator iteratorMappings()
          Iterator for mappings from this item.
 axMapObject.axMapLoopWalker loopWalker(axMapObject.axMapLoopWalker loopWalker)
           
 axMapObject.axMapLoopWalker loopWalker(axMapObject mapObj)
           
 java.lang.Integer mapping(int index)
          Get mappings.
 int mappingCount()
          Set mappings.
 java.lang.Integer mappingFrom(int index)
          Get mappings from.
 int mappingFromCount()
          Get mappings.
 java.lang.String[] propertyGroups()
          Property group names.
 void read(java.io.ObjectInputStream stream)
          Read objects.
 void removeAllMappings()
          Remove all mappings for this item and all nested items in it.
protected  java.util.ArrayList removeAllMappingsInLoop(axMapObject mapObj, java.util.ArrayList arrObjs)
          Remove mappings for all the nested items.
 void removeItem(axMapObject obj)
          Remove item.
 void removeItemAt(int index)
          Remove item by index.
 void removeMapping(int index)
          Remove mapping based on object index.
 void removeMappingAt(int index)
          Remove mapping based on index.
static void resetMap(axMap map)
          Set map.
static void resetMaxId()
          Reset max id.
 void setFunction(axMapPluginExecMethod function)
          Set plug-in.
 void setFunctionParameters(java.lang.String parameters)
          Set function parameters.
 void setName(java.lang.String name)
          Set Name
 void setScript(axMapScript script)
          Set BeanShell script.
 void setScriptParameters(java.lang.String parameters)
          Set BeanShell script parameters.
 java.lang.String toString()
          convert object to String.
 void write(java.io.ObjectOutputStream stream)
          Write objects.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_type

protected axMapItemType m_type

m_index

protected int m_index

m_mappings

protected java.util.ArrayList m_mappings

m_items

protected java.util.ArrayList m_items

m_mappingsFrom

protected transient java.util.ArrayList m_mappingsFrom
Method Detail

isAddable

public abstract boolean isAddable(axMapObject obj)
Specified by:
isAddable in interface axMapAddable

isAddable

public abstract boolean isAddable(java.lang.Class clazz)
Specified by:
isAddable in interface axMapAddable

propertyGroups

public java.lang.String[] propertyGroups()
Property group names.

Specified by:
propertyGroups in interface com.etasoft.gui.proptable.axGroupableProperty

equals

public boolean equals(java.lang.Object obj)
compare two axMapObjects.


hashCode

public int hashCode()
Return unique hash code


write

public void write(java.io.ObjectOutputStream stream)
           throws java.io.IOException
Write objects.

Throws:
java.io.IOException

read

public void read(java.io.ObjectInputStream stream)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Read objects.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

resetMap

public static void resetMap(axMap map)
Set map.


resetMaxId

public static void resetMaxId()
Reset max id.


iteratorMappings

public java.util.Iterator iteratorMappings()
Iterator for mappings from this item.


iteratorItems

public java.util.Iterator iteratorItems()
Iterator for items contained by this item


loopWalker

public axMapObject.axMapLoopWalker loopWalker(axMapObject mapObj)

loopWalker

public axMapObject.axMapLoopWalker loopWalker(axMapObject.axMapLoopWalker loopWalker)

addMapping

public void addMapping(int index)
Add mapping to other object.


removeMapping

public void removeMapping(int index)
Remove mapping based on object index.


removeMappingAt

public void removeMappingAt(int index)
Remove mapping based on index.


removeAllMappings

public void removeAllMappings()
Remove all mappings for this item and all nested items in it.


removeAllMappingsInLoop

protected java.util.ArrayList removeAllMappingsInLoop(axMapObject mapObj,
                                                      java.util.ArrayList arrObjs)
Remove mappings for all the nested items.


findParent

public static axMapObject findParent(axMapObject parent,
                                     axMapObject mapObj)
Find parent based on map object.


hasMappings

public boolean hasMappings()
Has mappings.


mapping

public java.lang.Integer mapping(int index)
Get mappings.


mappingCount

public int mappingCount()
Set mappings.


mappingFrom

public java.lang.Integer mappingFrom(int index)
Get mappings from.


mappingFromCount

public int mappingFromCount()
Get mappings.


isMappedFrom

public boolean isMappedFrom(int index)
Is it mapped from map object passed in.


buildMappingFrom

public void buildMappingFrom(int index)
Rebuild mappings from array.


addMappingsFromBack

public void addMappingsFromBack()
Add mappings back when paste.


addMappingsFromBackInLoop

public void addMappingsFromBackInLoop(axMapObject childObj)
Add mappings back when paste including child mappings.


isMappedTo

public boolean isMappedTo()
Is mapped to, is there any mappings pointing to this item.


isMappedTo

public boolean isMappedTo(int index)
Is this left item has mapping to the item on the right.


isMapped

public boolean isMapped()
Is it mapped.


addItem

public void addItem(axMapObject obj)
             throws axException
Add item.

Throws:
axException

insertItem

public void insertItem(axMapObject obj,
                       int offset)
                throws axException
Insert item.

Throws:
axException

item

public axMapObject item(int index)
Get Item.


itemCount

public int itemCount()
Count of items contained by this map object.


hasItems

public boolean hasItems()
True - if contains subitems


isParent

public boolean isParent()
Contains other items.


isParentOfLoops

public boolean isParentOfLoops()
Contains other loops.


removeItem

public void removeItem(axMapObject obj)
Remove item.


removeItemAt

public void removeItemAt(int index)
Remove item by index.


id

public java.lang.Integer id()
Get Id.


getIndex

public int getIndex()
Get Index.


getName

public java.lang.String getName()
Get Name


setName

public void setName(java.lang.String name)
Set Name


getFunction

public axMapPluginExecMethod getFunction()
Get plug-in.


setFunction

public void setFunction(axMapPluginExecMethod function)
Set plug-in.


getFunctionParameters

public java.lang.String getFunctionParameters()
Get function parameters.


setFunctionParameters

public void setFunctionParameters(java.lang.String parameters)
Set function parameters.


getScript

public axMapScript getScript()
Get BeanShell script.


setScript

public void setScript(axMapScript script)
Set BeanShell script.


getScriptParameters

public java.lang.String getScriptParameters()
Get BeanShell script parameters.


setScriptParameters

public void setScriptParameters(java.lang.String parameters)
Set BeanShell script parameters.


toString

public java.lang.String toString()
convert object to String.