model
Class TopoEntity

java.lang.Object
  extended by model.TopoEntity

public class TopoEntity
extends java.lang.Object

Class for storing topological relations between different entities.


Nested Class Summary
 class TopoEntity.TopoFact
          Class for storing relations added to this entity.
 
Field Summary
private  java.util.ArrayList<TopoEntity.TopoFact> facts
          a list of fasts added to this entity
private  java.lang.String name
          the entity name
private  java.util.HashMap<java.lang.String,java.util.ArrayList<TopoEntity>> relations
          a mapping of the RCC values to the related entities
private  TopoSystem.RCCSystem topoSystem
          the topology system of this entity
 
Constructor Summary
TopoEntity(java.lang.String name, TopoSystem.RCCSystem system)
          Constructs a topo entity with the specified topo system.
 
Method Summary
 void addTopologicalRelation(java.lang.String topoName, TopoEntity entity)
          Adds a topological relation to this entity.
 java.util.ArrayList<TopoEntity.TopoFact> getFacts()
          Gets the factboard for this entity.
 java.lang.String getName()
          Gets the entity name.
 java.util.HashMap<java.lang.String,java.util.ArrayList<TopoEntity>> getRelations()
          Gets the mapping of topological values to related entities.
 java.lang.String getTopoRelation(TopoEntity entity)
          Returns the topological relation to the specified entity.
 TopoSystem.RCCSystem getTopoSystem()
          Gets the topo system.
 boolean relatedTo(TopoEntity entity)
          Returns true if the specified entity is related to this entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name
the entity name


topoSystem

private TopoSystem.RCCSystem topoSystem
the topology system of this entity


relations

private java.util.HashMap<java.lang.String,java.util.ArrayList<TopoEntity>> relations
a mapping of the RCC values to the related entities


facts

private java.util.ArrayList<TopoEntity.TopoFact> facts
a list of fasts added to this entity

Constructor Detail

TopoEntity

public TopoEntity(java.lang.String name,
                  TopoSystem.RCCSystem system)
Constructs a topo entity with the specified topo system.

Parameters:
system - - the topo system
Method Detail

addTopologicalRelation

public void addTopologicalRelation(java.lang.String topoName,
                                   TopoEntity entity)
Adds a topological relation to this entity. If the granularity of the new relation is less than the current granularity, then it is mapped to the granularity of this entity. If the granularity of the new relation is greater than the current granularity, then the topological system of this entity is mapped into the granularity of the new relation.

Parameters:
topoName - - the topological name
entity - - the related entity

relatedTo

public boolean relatedTo(TopoEntity entity)
Returns true if the specified entity is related to this entity.


getTopoRelation

public java.lang.String getTopoRelation(TopoEntity entity)
Returns the topological relation to the specified entity.

Parameters:
entity - - the related entity
Returns:
- the topological relation or null if the entities are not related

getRelations

public java.util.HashMap<java.lang.String,java.util.ArrayList<TopoEntity>> getRelations()
Gets the mapping of topological values to related entities.


getTopoSystem

public TopoSystem.RCCSystem getTopoSystem()
Gets the topo system.


getName

public java.lang.String getName()
Gets the entity name.


getFacts

public java.util.ArrayList<TopoEntity.TopoFact> getFacts()
Gets the factboard for this entity.