model
Class Map

java.lang.Object
  extended by model.Map

public class Map
extends java.lang.Object

A map stores a set of ontology objects and the relations between them.


Field Summary
private  java.lang.String name
          the map name
private  java.util.HashMap<java.lang.Long,OntologyObject> objectMap
          a mapping of object identifiers to the objects
private  java.util.HashSet<OntologyObject> objects
          a list of objects in the map
private  java.util.HashMap<OntologyObject,java.util.ArrayList<SpatialRelation>> relations
          a mapping of objects to their relations
private  java.util.HashSet<OntologyObject> visibleObjects
          a list of objects that are visible
 
Constructor Summary
Map(java.lang.String name)
          Constructs a map with the specified name.
 
Method Summary
 void add(OntologyObject object)
          Adds an object to the map.
 void delete(OntologyObject object)
          Removes an object from the map.
 java.lang.String getName()
          Gets the map name.
 OntologyObject getObject(long id)
          Gets the object with the specified identifier.
 java.util.HashSet<OntologyObject> getObjects()
          Gets all objects in the map.
 java.util.HashSet<OntologyObject> getObjects(java.lang.String type)
          Gets the objects of the specified type.
 java.util.ArrayList<SpatialRelation> getRelations(OntologyObject object)
          Gets the spatial relations for the specified ontology object.
 java.util.HashSet<OntologyObject> getVisibleObjects()
          Gets the list of visible objects.
 void removeRouteGraph()
          Removes the route graph from the map.
 
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 map name


objects

private java.util.HashSet<OntologyObject> objects
a list of objects in the map


objectMap

private java.util.HashMap<java.lang.Long,OntologyObject> objectMap
a mapping of object identifiers to the objects


visibleObjects

private java.util.HashSet<OntologyObject> visibleObjects
a list of objects that are visible


relations

private java.util.HashMap<OntologyObject,java.util.ArrayList<SpatialRelation>> relations
a mapping of objects to their relations

Constructor Detail

Map

public Map(java.lang.String name)
Constructs a map with the specified name.

Parameters:
name - - the map name
Method Detail

getName

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


getObject

public OntologyObject getObject(long id)
Gets the object with the specified identifier.


getVisibleObjects

public java.util.HashSet<OntologyObject> getVisibleObjects()
Gets the list of visible objects. The list contains all ontology objects in the map with a graphical representation.


getObjects

public java.util.HashSet<OntologyObject> getObjects(java.lang.String type)
Gets the objects of the specified type.


removeRouteGraph

public void removeRouteGraph()
Removes the route graph from the map.


getObjects

public java.util.HashSet<OntologyObject> getObjects()
Gets all objects in the map.


getRelations

public java.util.ArrayList<SpatialRelation> getRelations(OntologyObject object)
Gets the spatial relations for the specified ontology object.


add

public void add(OntologyObject object)
Adds an object to the map.

Parameters:
object - - the new object

delete

public void delete(OntologyObject object)
Removes an object from the map.

Parameters:
object - - the object to remove