ix.icore.info
Class AbstractIObject
java.lang.Object
ix.icore.AbstractAnnotatedObject
ix.icore.AbstractIXObject
ix.icore.info.AbstractIObject
- All Implemented Interfaces:
- Annotated, Named, IObject, IThing, IXObject, EditableObject, java.io.Serializable
- Direct Known Subclasses:
- IConcept, IRelation
public abstract class AbstractIObject
- extends AbstractIXObject
- implements IObject, Named, EditableObject
An information thing - a concept, relationship between concepts...
- See Also:
- Serialized Form
Methods inherited from class ix.icore.AbstractAnnotatedObject |
addAnnotationListener, annMap, clearAnnotations, fireSetAnnotation, getAnnotation, getAnnotations, getComments, makeAnnMap, removeAnnotation, setAnnotation, setAnnotations, setComments, takeAnnotations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
attVals
protected java.util.HashMap attVals
type
protected IType type
dataChangeListeners
java.util.HashSet dataChangeListeners
AbstractIObject
public AbstractIObject()
AbstractIObject
public AbstractIObject(IType type)
setValue
public boolean setValue(IValue value)
- Specified by:
setValue
in interface IObject
setValue
public boolean setValue(java.lang.String attName,
java.lang.Object value)
- Description copied from interface:
EditableObject
- Sets the given field to the given value. Should default to
UIUtil.setObjectFieldValue(Object object, String field, Class fieldClass,
Object value).
- Specified by:
setValue
in interface IObject
- Specified by:
setValue
in interface EditableObject
setAttributeValue
public boolean setAttributeValue(java.lang.String attName,
java.lang.Object value)
getValue
public java.lang.Object getValue(java.lang.String attName)
- Specified by:
getValue
in interface IObject
getAttributes
public java.util.Collection getAttributes()
- Looks up the list of allowed attributes.
- Returns:
- a list of strings that are attribute names allowed for this
IObject type.
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.String attName)
getName
public java.lang.String getName()
- Specified by:
getName
in interface Named
setName
public void setName(java.lang.String name)
getType
public IType getType()
- Specified by:
getType
in interface IObject
setType
public void setType(IType type)
- Specified by:
setType
in interface IObject
isEmpty
public boolean isEmpty()
- A refinement is empty if all its data fields are empty.
Note: the refinement may not have started out as empty - check whether it
has a base-object for full emptiness.
- Specified by:
isEmpty
in interface IObject
nameHasChanged
public boolean nameHasChanged(java.lang.Object nameThing)
- Specified by:
nameHasChanged
in interface IObject
sameValue
public boolean sameValue(java.lang.String field,
java.lang.Object value,
java.lang.Object otherValue)
- Description copied from interface:
EditableObject
- Determines whether the two given values of the given field differ
- Specified by:
sameValue
in interface IObject
- Specified by:
sameValue
in interface EditableObject
isAttributesEmpty
public boolean isAttributesEmpty()
isEmptyValue
public boolean isEmptyValue(java.lang.Object value)
- Checks whether the given value is empty. Overwrite this or add to it in
subclasses.
sameAttributeValue
public abstract boolean sameAttributeValue(java.lang.String attName,
java.lang.Object value,
java.lang.Object otherValue)
checkConsistency
public abstract boolean checkConsistency()
- Specified by:
checkConsistency
in interface IObject
addDataChangeListener
public void addDataChangeListener(DataChangeListener l)
- Specified by:
addDataChangeListener
in interface IObject
- Specified by:
addDataChangeListener
in interface EditableObject
removeDataChangeListener
public void removeDataChangeListener(DataChangeListener l)
- Specified by:
removeDataChangeListener
in interface IObject
- Specified by:
removeDataChangeListener
in interface EditableObject