public class XOCORelationImpl extends java.lang.Object implements XOCORelation
Constructor and Description |
---|
XOCORelationImpl(java.lang.String relationType) |
XOCORelationImpl(java.lang.String relationType,
XOCObject sourceObject,
XOCObject targetObject) |
XOCORelationImpl(XID ID,
XAttributeMap attributes,
java.lang.String relationType,
XOCObject sourceObject,
XOCObject targetObject) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this event, i.e.
|
boolean |
compareObjectRelation(XOCORelation objectRelation) |
boolean |
equals(java.lang.Object o)
Tests for equality of IDs
|
XAttributeMap |
getAttributes()
Retrieves the attributes set for this element.
|
MyOriginalCell |
getCorrespondingCell() |
java.util.Map<java.lang.Integer,java.lang.String> |
getEventOrderNumVSObjectRelationStateMap()
get the map between event order number and object relation state;
if one event number is not in the map, it means (1) the object relation is not alive (after delete && before add if any), or
(2) remain the same (state value: remain) after add or update && before delete (if any)
|
java.util.Set<XExtension> |
getExtensions()
Returns the hashCode of the id
|
java.util.List<IntegerPair> |
getLifecyclePeriodList()
get the lifecycle period list of one object;
each period consists of two values: start event order number and end event order number;
the object still (maybe last) observed in the object model of the end event;
|
java.lang.String |
getRelationType()
Returns the id of the event
|
XOCObject |
getSourceObject() |
XOCObject |
getTargetObject() |
boolean |
hasAttributes()
Checks for the existence of attributes.
|
boolean |
isAddedAtEvent(XOCEvent event)
check if the object relation is added at the moment of input event based on the life cycle period list
if one object relation is alive at current event and dead at previous event, the object relation is added at current event
|
boolean |
isAliveAtEvent(XOCEvent event)
check if the object relation is alive at the moment of input event based on the life cycle period list
|
boolean |
isAliveAtEventOrderNum(int eventOrderNum)
check if the object relation is alive at the moment of input event order number based on the life cycle period list
|
boolean |
isAttributesEqual(XOCORelation objectRelation) |
void |
setAttributes(XAttributeMap attributes)
Sets the map of attributes for this element.
|
void |
setCorrespondingCell(MyOriginalCell correspondingCell) |
void |
setRelationType(java.lang.String relationType) |
void |
setSourceObject(XOCObject sourceObject) |
void |
setTargetObject(XOCObject targetObject) |
public XOCORelationImpl(java.lang.String relationType)
public XOCORelationImpl(java.lang.String relationType, XOCObject sourceObject, XOCObject targetObject)
public XOCORelationImpl(XID ID, XAttributeMap attributes, java.lang.String relationType, XOCObject sourceObject, XOCObject targetObject)
public java.lang.String getRelationType()
XOCORelation
getRelationType
in interface XOCORelation
public XOCObject getSourceObject()
getSourceObject
in interface XOCORelation
public XOCObject getTargetObject()
getTargetObject
in interface XOCORelation
public boolean hasAttributes()
XAttributable
XAttributable.getAttributes()
in certain situations.hasAttributes
in interface XAttributable
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.util.Set<XExtension> getExtensions()
getExtensions
in interface XAttributable
public XAttributeMap getAttributes()
XAttributable
getAttributes
in interface XAttributable
public void setAttributes(XAttributeMap attributes)
XAttributable
setAttributes
in interface XAttributable
attributes
- A map of attributes.public void setRelationType(java.lang.String relationType)
setRelationType
in interface XOCORelation
public void setSourceObject(XOCObject sourceObject)
setSourceObject
in interface XOCORelation
public void setTargetObject(XOCObject targetObject)
setTargetObject
in interface XOCORelation
public boolean compareObjectRelation(XOCORelation objectRelation)
compareObjectRelation
in interface XOCORelation
public boolean isAttributesEqual(XOCORelation objectRelation)
isAttributesEqual
in interface XOCORelation
public MyOriginalCell getCorrespondingCell()
getCorrespondingCell
in interface MyOriginalElement
public void setCorrespondingCell(MyOriginalCell correspondingCell)
setCorrespondingCell
in interface MyOriginalElement
public java.util.List<IntegerPair> getLifecyclePeriodList()
getLifecyclePeriodList
in interface XOCORelation
public boolean isAliveAtEvent(XOCEvent event)
isAliveAtEvent
in interface XOCORelation
event
- public boolean isAliveAtEventOrderNum(int eventOrderNum)
isAliveAtEventOrderNum
in interface XOCORelation
event
- public boolean isAddedAtEvent(XOCEvent event)
isAddedAtEvent
in interface XOCORelation
event
- public java.util.Map<java.lang.Integer,java.lang.String> getEventOrderNumVSObjectRelationStateMap()
getEventOrderNumVSObjectRelationStateMap
in interface XOCORelation