public class XOCObjectImpl extends java.lang.Object implements XOCObject
| Constructor and Description |
|---|
XOCObjectImpl(java.lang.String name) |
XOCObjectImpl(java.lang.String name,
XOCClass Class) |
XOCObjectImpl(XAttributeMap attributes)
Creates a new event.
|
XOCObjectImpl(XID ID,
java.lang.String name) |
XOCObjectImpl(XID ID,
java.lang.String name,
XAttributeMap attributes,
XOCClass Class) |
XOCObjectImpl(XID ID,
XAttributeMap attributes)
Creates a new event with the given id and attributed
|
| Modifier and Type | Method and Description |
|---|---|
void |
addXOCAttribute(java.lang.String key,
java.lang.String value,
int eventOrderNum,
java.lang.String logFormat)
add an XOC attribute (key, value, event order number, i.e., moment) into the corresponding map
|
java.lang.Object |
clone()
Clones this event, i.e.
|
XAttributeMap |
createUpdatedAttributeMap(XOCEvent event)
create the updated attribute map through comparing values of the input event with values of its previous event;
|
void |
endXOCAttribute(java.lang.String key,
int eventOrderNum,
java.lang.String logFormat)
end an XOC attribute, i.e., adding the ending event order number in the last value version corresponding to the input key
|
XAttributeMap |
getAttributes()
Retrieves the attributes set for this element.
|
MyOriginalCell |
getCorrespondingCell() |
java.util.Map<java.lang.Integer,java.lang.String> |
getEventOrderNumVSObjectStateMap()
get the map between event order number and object state;
if one event number is not in the map, it means (1) the object 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()
Sets 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 |
getName()
Returns the id of the event
|
XOCEvent |
getReferenceEvent()
get the event when the object is first referred to
|
java.util.List<XOCEvent> |
getRelatedEventList() |
java.util.List<java.lang.String> |
getRelatedObjectIdList() |
java.util.List<XOCORelation> |
getRelatedObjectRelationList()
return the list of related object relations
note: this can save memory than returning the list of ids
|
java.util.Map<java.lang.String,XOCAttribute> |
getXOCAttributes() |
boolean |
hasAttributes()
Checks for the existence of attributes.
|
boolean |
isAddedAtEvent(XOCEvent event)
check if the object is born at the moment of input event based on the life cycle period list
if one object is alive at current event and dead at previous event, the object is added at current event
|
boolean |
isAliveAtEvent(XOCEvent event)
check if the object is alive at the moment of input event based on the life cycle period list
|
boolean |
isAliveAtEventOrderNum(int inputEventOrderNum)
check if the object is alive at the moment of input event order number based on the life cycle period list
|
boolean |
isAttributesEqual(XOCObject object) |
boolean |
isUpdatedAtEvent(XOCEvent event)
check if the object is updated at the moment of input event based on the life cycle period list
if one object is alive and has different attributes at previous and current events, the object is updated
|
XOCObject |
minusAttributeOverlap(XOCObject object)
minus the overlap part (attribute name and value are the same) between the
current object and the input object from the current object;
keep the current object id
|
XOCObject |
plusAttributes(XOCObject object)
plus the different attributes (attribute name are not the same) between the
current object and the input object to the current object;
|
void |
setAttributes(XAttributeMap attributes)
Sets the map of attributes for this element.
|
void |
setCorrespondingCell(MyOriginalCell correspondingCell) |
void |
setName(java.lang.String name) |
void |
setReferenceEvent(XOCEvent observationEvent) |
void |
setXOCAttributes(java.util.Map<java.lang.String,XOCAttribute> attributeVersionMap) |
public XOCObjectImpl(java.lang.String name)
public XOCObjectImpl(java.lang.String name,
XOCClass Class)
public XOCObjectImpl(XID ID, java.lang.String name)
public XOCObjectImpl(XAttributeMap attributes)
attributes - Map of attribute for the event.public XOCObjectImpl(XID ID, XAttributeMap attributes)
id - the id for this eventattributes - Map of attribute for the event.public XOCObjectImpl(XID ID, java.lang.String name, XAttributeMap attributes, XOCClass Class)
public XAttributeMap getAttributes()
XAttributablegetAttributes in interface XAttributablepublic java.util.Map<java.lang.String,XOCAttribute> getXOCAttributes()
getXOCAttributes in interface XOCObjectpublic void setAttributes(XAttributeMap attributes)
XAttributablesetAttributes in interface XAttributableattributes - A map of attributes.public void setXOCAttributes(java.util.Map<java.lang.String,XOCAttribute> attributeVersionMap)
setXOCAttributes in interface XOCObjectpublic void addXOCAttribute(java.lang.String key,
java.lang.String value,
int eventOrderNum,
java.lang.String logFormat)
addXOCAttribute in interface XOCObjectkey - value - eventOrderNum - logFormat - public void endXOCAttribute(java.lang.String key,
int eventOrderNum,
java.lang.String logFormat)
endXOCAttribute in interface XOCObjectkey - eventOrderNum - logFormat - public java.util.List<IntegerPair> getLifecyclePeriodList()
getLifecyclePeriodList in interface XOCObjectpublic boolean isAliveAtEvent(XOCEvent event)
isAliveAtEvent in interface XOCObjectevent - public boolean isAliveAtEventOrderNum(int inputEventOrderNum)
isAliveAtEventOrderNum in interface XOCObjectevent - public boolean isUpdatedAtEvent(XOCEvent event)
isUpdatedAtEvent in interface XOCObjectevent - public boolean isAddedAtEvent(XOCEvent event)
isAddedAtEvent in interface XOCObjectevent - public boolean hasAttributes()
XAttributableXAttributable.getAttributes() in certain situations.hasAttributes in interface XAttributablepublic java.lang.Object clone()
public java.util.Set<XExtension> getExtensions()
getExtensions in interface XAttributableid - the new id.public java.lang.String getName()
XOCObjectpublic XOCEvent getReferenceEvent()
XOCObjectgetReferenceEvent in interface XOCObjectpublic java.util.List<XOCEvent> getRelatedEventList()
getRelatedEventList in interface XOCObjectpublic java.util.List<java.lang.String> getRelatedObjectIdList()
getRelatedObjectIdList in interface XOCObjectpublic java.util.List<XOCORelation> getRelatedObjectRelationList()
getRelatedObjectRelationList in interface XOCObjectpublic void setReferenceEvent(XOCEvent observationEvent)
setReferenceEvent in interface XOCObjectpublic MyOriginalCell getCorrespondingCell()
getCorrespondingCell in interface MyOriginalElementpublic void setCorrespondingCell(MyOriginalCell correspondingCell)
setCorrespondingCell in interface MyOriginalElementpublic boolean isAttributesEqual(XOCObject object)
isAttributesEqual in interface XOCObjectpublic XOCObject minusAttributeOverlap(XOCObject object)
minusAttributeOverlap in interface XOCObjectpublic XOCObject plusAttributes(XOCObject object)
plusAttributes in interface XOCObjectpublic java.util.Map<java.lang.Integer,java.lang.String> getEventOrderNumVSObjectStateMap()
getEventOrderNumVSObjectStateMap in interface XOCObjectpublic XAttributeMap createUpdatedAttributeMap(XOCEvent event)
createUpdatedAttributeMap in interface XOCObjectevent -