public abstract class AModelObject extends java.lang.Object implements java.lang.Comparable<AModelObject>, org.pfsw.odem.IExplorationModelObject
Modifier and Type | Field and Description |
---|---|
static AModelObject[] |
EMPTY_MODEL_OBJECT_ARRAY |
Constructor and Description |
---|
AModelObject()
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(AModelObjectVisitor visitor)
Calls the visitor.startModelObject(this)
then calls apply(visitor) on all child elements and
then visitor.finishModelObject(this)
|
protected boolean |
applyOnChildren(AModelObjectVisitor visitor)
Calls apply(visitor) on all child elements.
|
protected boolean |
applyOnStack(java.util.Stack<AModelObject> stack,
AModelObjectVisitor visitor) |
protected boolean |
applySelf(AModelObjectVisitor visitor) |
boolean |
canHaveDependencies()
Returns if this object potentially has dependencies to other objects.
|
protected CollectionUtil |
coll() |
int |
compareTo(AModelObject model) |
int |
countAllElementsRecursivly()
Returns the number of all contained elements in this model object
including this object.
|
abstract int |
getChildCount()
Returns the current number of children
|
abstract AModelObject[] |
getChildren()
Returns the children.
|
abstract java.lang.String |
getName()
Returns the name.
|
int |
getNumberOfAncestors()
Returns the number of parent objects up to the root of the hierarchy
|
protected org.pfsw.odem.IObjectProperties |
getOtherProperties() |
protected abstract AModelObject |
getParent()
Returns the parent model object
|
java.lang.Object |
getProperty(java.lang.String propertyName)
Returns the property associated with the given name.
|
java.lang.String[] |
getPropertyNames()
Returns all currently known properties.
|
abstract Workset |
getWorkset()
Returns the workset this object belongs to
|
protected abstract boolean |
hasParent()
Returns true if this object has a parent model object
|
protected void |
setOtherProperties(org.pfsw.odem.IObjectProperties newValue) |
void |
setProperty(java.lang.String propertyName,
java.lang.Object object)
Sets the value of the property with the specified name to the given object.
|
protected StringUtil |
str() |
protected boolean |
visitStackObjects(java.util.Stack<AModelObject> stack,
AModelObjectVisitor visitor) |
public static final AModelObject[] EMPTY_MODEL_OBJECT_ARRAY
public AModelObject()
public boolean canHaveDependencies()
public int compareTo(AModelObject model)
compareTo
in interface java.lang.Comparable<AModelObject>
public abstract Workset getWorkset()
public abstract java.lang.String getName()
getName
in interface org.pfsw.odem.IExplorationModelObject
public abstract int getChildCount()
public abstract AModelObject[] getChildren()
public boolean apply(AModelObjectVisitor visitor)
public int countAllElementsRecursivly()
public int getNumberOfAncestors()
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in interface org.pfsw.odem.IObjectProperties
propertyName
- A valid name (must not be null or empty string)public void setProperty(java.lang.String propertyName, java.lang.Object object)
setProperty
in interface org.pfsw.odem.IObjectProperties
propertyName
- A valid name (must not be null or empty string)object
- The object to keep under the specified property namepublic java.lang.String[] getPropertyNames()
getPropertyNames
in interface org.pfsw.odem.IObjectProperties
protected abstract boolean hasParent()
protected abstract AModelObject getParent()
protected boolean applyOnStack(java.util.Stack<AModelObject> stack, AModelObjectVisitor visitor)
protected boolean visitStackObjects(java.util.Stack<AModelObject> stack, AModelObjectVisitor visitor)
protected boolean applySelf(AModelObjectVisitor visitor)
protected boolean applyOnChildren(AModelObjectVisitor visitor)
protected org.pfsw.odem.IObjectProperties getOtherProperties()
protected void setOtherProperties(org.pfsw.odem.IObjectProperties newValue)
protected CollectionUtil coll()
protected StringUtil str()