no.uio.edd.model.geo.map
Class GeoMap

java.lang.Object
  extended by no.uio.edd.model.geo.map.GeoMap
All Implemented Interfaces:
GeoMaplike

public class GeoMap
extends java.lang.Object
implements GeoMaplike

A class used to store a map model.

Author:
oeide

Constructor Summary
GeoMap(GraphTraversal inGraphTraversal)
           
 
Method Summary
 GeoEvent addGeoEvent()
          Add a geo event without an ID; that is, an anonymous (e.g. implied) event.
 GeoEvent addGeoEvent(java.lang.String id)
          Add a geo event using the ID.
 GeoPerson addGeoPerson(java.lang.String id, GeoModelPerson inGeoModelPerson)
           
 GeoPlace addGeoPlace(java.lang.String id)
           
 java.lang.String asGML()
           
 int combineLayers(int layer1, int layer2)
          Include all the places from the two layers into a single new layer.
 GeoEvent getGeoEvent(java.lang.String id)
           
 GeoPerson getGeoPerson(java.lang.String id, GeoModelPerson inGeoModelPerson)
           
 GeoPlace getGeoPlace(java.lang.String id)
          Find a place in the vector map system.
static java.lang.String getGmlFooter()
           
static java.lang.String getGmlHeader()
           
 GeoPlace[] getLayer(int num)
           
 GraphTraversal getMyGraphTraversal()
           
 void inferGeometry()
          Runs through all the places in the model and adds geometries based on the data of the map model, places as well as relationships.
 int layerSize(int layer)
           
 int numberOfLayers()
           
 void produceGMLFiles(java.lang.String mapFileName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoMap

public GeoMap(GraphTraversal inGraphTraversal)
Method Detail

addGeoPlace

public GeoPlace addGeoPlace(java.lang.String id)

addGeoEvent

public GeoEvent addGeoEvent(java.lang.String id)
Add a geo event using the ID.

Parameters:
id - The ID for the new event.
Returns:
The new event.

addGeoEvent

public GeoEvent addGeoEvent()
Add a geo event without an ID; that is, an anonymous (e.g. implied) event.

Returns:
The new event.

addGeoPerson

public GeoPerson addGeoPerson(java.lang.String id,
                              GeoModelPerson inGeoModelPerson)

asGML

public java.lang.String asGML()
Specified by:
asGML in interface GeoMaplike
Returns:
This map object as GML (fragment).

produceGMLFiles

public void produceGMLFiles(java.lang.String mapFileName)

getGeoPlace

public GeoPlace getGeoPlace(java.lang.String id)
Find a place in the vector map system. If not found, it will be created.

Parameters:
id - The ID for the new place, which is the last part of the RDF URI.
Returns:
The new place.

getGeoEvent

public GeoEvent getGeoEvent(java.lang.String id)

getGeoPerson

public GeoPerson getGeoPerson(java.lang.String id,
                              GeoModelPerson inGeoModelPerson)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

combineLayers

public int combineLayers(int layer1,
                         int layer2)
                  throws GeoModelLocationException
Include all the places from the two layers into a single new layer. One of the layers will be kept with the new places added to it, the second one will be set to null.

Parameters:
layer1 - The first layer.
layer2 - The second layer.
Returns:
The number of the resulting layer.
Throws:
GeoModelLocationException

numberOfLayers

public int numberOfLayers()
Returns:
The number of map layers.

inferGeometry

public void inferGeometry()
                   throws GeoModelLocationException
Runs through all the places in the model and adds geometries based on the data of the map model, places as well as relationships.

Throws:
GeoModelLocationException

getMyGraphTraversal

public GraphTraversal getMyGraphTraversal()
Returns:
the myGraphTraversal

layerSize

public int layerSize(int layer)

getGmlHeader

public static java.lang.String getGmlHeader()

getGmlFooter

public static java.lang.String getGmlFooter()

getLayer

public GeoPlace[] getLayer(int num)