|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.LocalPartitionData
Implements the PartitionData interface by storing the partition information locally, in memory. Companion class to LocalKnowledgeModel.
Method Summary | |
void |
addEntity(Entity entity)
Adds an entity to this partition. |
void |
addRelation(Relation relation)
Adds a relation to this partition. |
long |
getCreationTime()
Returns the time of creation for this partition in the same format as System.getCurrentTimeMillis(); |
Entity[] |
getEntities()
Returns all the entitys in this partition. |
java.util.Iterator |
getEntityIterator()
Returns an iterator for all the entities in this partition. |
java.lang.Object |
getID()
Returns a unique ID for the entity this EntityData represents. |
java.lang.String |
getName()
Returns the name of this partition. |
java.util.Iterator |
getRelationIterator()
Returns an iterator for all the relations in this partition. |
Relation[] |
getRelations()
Returns all the relations in this partition. |
boolean |
hasEntity(Entity entity)
Returns true if the given entity is a part of this partition. |
boolean |
hasRelation(Relation relation)
Returns true if the given relation is a part of this partition. |
void |
remove()
Permanently deletes the parition. |
boolean |
removeEntity(Entity entity)
Removes an entity to the list of entity from this partition. |
boolean |
removeRelation(Relation relation)
Removes a relation to the list of relation from this entity. |
void |
setCreationTime(long time)
Sets the creation time. |
void |
setName(java.lang.String name)
Sets the name of this partition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void setName(java.lang.String name)
setName
in interface PartitionData
name
- The new namepublic java.lang.String getName()
getName
in interface PartitionData
public java.lang.Object getID()
getID
in interface PartitionData
public long getCreationTime()
getCreationTime
in interface PartitionData
public void setCreationTime(long time)
setCreationTime
in interface PartitionData
time
- The time in the format of System.getCurrentTimeMillis() this parition was created.public void addRelation(Relation relation)
addRelation
in interface PartitionData
relation
- The relation to add.public boolean removeRelation(Relation relation)
removeRelation
in interface PartitionData
relation
- The relation to remove.public Relation[] getRelations()
getRelations
in interface PartitionData
public java.util.Iterator getRelationIterator()
getRelationIterator
in interface PartitionData
public boolean hasRelation(Relation relation)
hasRelation
in interface PartitionData
relation
- public void addEntity(Entity entity)
addEntity
in interface PartitionData
entity
- The entity to add.public boolean removeEntity(Entity entity)
removeEntity
in interface PartitionData
entity
- The entity to remove.public Entity[] getEntities()
getEntities
in interface PartitionData
public java.util.Iterator getEntityIterator()
getEntityIterator
in interface PartitionData
public boolean hasEntity(Entity entity)
hasEntity
in interface PartitionData
entity
- public void remove()
remove
in interface PartitionData
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |