model
Class OrientationEntity

java.lang.Object
  extended by model.OrientationEntity

public class OrientationEntity
extends java.lang.Object

Class for storing qualitative orientation relations between different entities.


Nested Class Summary
 class OrientationEntity.OrientationFact
          Class for storing relations added to this entity.
 
Field Summary
private  java.util.ArrayList<OrientationEntity.OrientationFact> facts
          a list of fasts added to this entity
private  java.lang.String name
          the entity name
private  OrientationSystem.OrienSystem orientationSystem
          the orientation system of this entity
private  java.util.HashMap<java.lang.String,java.util.ArrayList<OrientationEntity>> relations
          a mapping of the orientation values to the entities at each value
 
Constructor Summary
OrientationEntity(java.lang.String name, OrientationSystem.OrienSystem system)
          Constructs an orientation entity with the specified orientation system.
 
Method Summary
 void addOrientationRelation(java.lang.String orientationName, OrientationEntity entity)
          Adds an orientation relation to this entity.
 java.util.ArrayList<OrientationEntity.OrientationFact> getFacts()
          Gets the factboard for this entity.
 java.lang.String getName()
          Gets the entity name.
 java.lang.String getOrientation(OrientationEntity entity)
          Returns the orientation relation to the specified entity.
 OrientationSystem.OrienSystem getOrientationSystem()
          Gets the orientation system.
 java.util.HashMap<java.lang.String,java.util.ArrayList<OrientationEntity>> getRelations()
          Gets the mapping of orientations to related entities.
 boolean relatedTo(OrientationEntity 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


orientationSystem

private OrientationSystem.OrienSystem orientationSystem
the orientation system of this entity


relations

private java.util.HashMap<java.lang.String,java.util.ArrayList<OrientationEntity>> relations
a mapping of the orientation values to the entities at each value


facts

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

Constructor Detail

OrientationEntity

public OrientationEntity(java.lang.String name,
                         OrientationSystem.OrienSystem system)
Constructs an orientation entity with the specified orientation system.

Parameters:
system - - the distance system
Method Detail

addOrientationRelation

public void addOrientationRelation(java.lang.String orientationName,
                                   OrientationEntity entity)
Adds an orientation relation to this entity. If the granularity of the new orientation is less than the current granularity, then it is mapped to the granularity of this entity. If the granularity of the new orientation is greater than the current granularity, then the orientation system of this entity is mapped into the granularity of the new orientaion.

Parameters:
orientationName - - the orientation name
entity - - the related entity

relatedTo

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


getOrientation

public java.lang.String getOrientation(OrientationEntity entity)
Returns the orientation relation to the specified entity.

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

getRelations

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


getOrientationSystem

public OrientationSystem.OrienSystem getOrientationSystem()
Gets the orientation system.


getName

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


getFacts

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