no.uio.edd.model.geo.calc
Class GraphTraversal

java.lang.Object
  extended by no.uio.edd.model.geo.calc.GraphTraversal

public class GraphTraversal
extends java.lang.Object


Field Summary
(package private) static double ABIT
           
static double BORDER_DISTANCE
          If I am put next to a border, this is the distance from it I get.
(package private) static double CLOSE
           
(package private) static double DAY_TRAVEL
           
(package private) static double DEFALT_SPAN_WIDTH
           
(package private) static double DEFAULT_ANGLE
           
(package private) static double DEFAULT_BETWEEN_ANGLE
           
(package private) static double DEFAULT_BETWEEN_DISTANCE
           
static double DEFAULT_BETWEEN_DISTANCE_X
           
static double DEFAULT_BETWEEN_DISTANCE_Y
           
(package private) static double DEFAULT_BETWEEN_FIRST_DIRECTION
           
static double DEFAULT_DIRECTION
           
static double DEFAULT_DISTANCE
          Expressed in km, not in meter!
static double DEFAULT_LENGTH
           
static double DEFAULT_NO_LENGTH
           
static double DEFAULT_NO_WIDTH
           
static double DEFAULT_WIDTH
           
static double DOUBLE_FACTOR_LEFT
           
static double DOUBLE_FACTOR_RIGHT
           
(package private)  java.lang.StringBuffer errorLog
           
(package private) static double LONG
           
(package private) static double MILE_MOUNTAIN
           
(package private) static double MILE_NEW
           
(package private) static double MILE_NEW_SWEDISH
           
(package private) static double MILE_OLD
           
(package private) static double MILE_UNKNOWN
           
(package private) static double MILE_VILLAGE
           
(package private) static double OFFSET_X
           
(package private) static double OFFSET_Y
           
static double PRECISION
          Everything smaller than this after SCALE is taken into consideration is to be regarded as zero.
(package private) static double RIFLESHOT
           
static double SCALE
          That is, the 1 pixle = 1/SCALE km.
(package private) static double START_X
           
(package private) static double START_Y
           
(package private) static double STEP
           
(package private) static double TOUCH
           
 boolean useCoref
          If set to true, any graph is traversed by following links from all corefs of the current node.
 
Constructor Summary
GraphTraversal(GeoModelRunner inGeoModelRunner)
           
 
Method Summary
 void addToErrorLog(java.lang.String addStr)
           
 java.lang.String dumpPartsLists()
          Throw out a formatted list of part of-relations, for debugging purposes.
(package private)  MapPlace getMapPlace(java.lang.String id)
           
 GeoModelRunner getMyGeoModelRunner()
           
 java.lang.String traverseAllLinks(int firstPara, int lastPara)
           
 java.lang.String traverseAllLinks(java.lang.String personId)
          Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems.
 java.lang.String traverseAllLinks(java.lang.String[] parasToUse)
          Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems.
 java.lang.String traverseAllLinks(java.lang.String rdfFileName, java.lang.String mapFileName, java.lang.String errorFileName)
          Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useCoref

public boolean useCoref
If set to true, any graph is traversed by following links from all corefs of the current node. If false, no coref is used.


START_X

static final double START_X
See Also:
Constant Field Values

START_Y

static final double START_Y
See Also:
Constant Field Values

OFFSET_X

static final double OFFSET_X
See Also:
Constant Field Values

OFFSET_Y

static final double OFFSET_Y
See Also:
Constant Field Values

DEFAULT_BETWEEN_FIRST_DIRECTION

static final double DEFAULT_BETWEEN_FIRST_DIRECTION
See Also:
Constant Field Values

DEFAULT_BETWEEN_DISTANCE

static final double DEFAULT_BETWEEN_DISTANCE
See Also:
Constant Field Values

DEFAULT_BETWEEN_ANGLE

static final double DEFAULT_BETWEEN_ANGLE
See Also:
Constant Field Values

DEFAULT_ANGLE

static final double DEFAULT_ANGLE
See Also:
Constant Field Values

DEFALT_SPAN_WIDTH

static final double DEFALT_SPAN_WIDTH
See Also:
Constant Field Values

MILE_UNKNOWN

static final double MILE_UNKNOWN
See Also:
Constant Field Values

MILE_OLD

static final double MILE_OLD
See Also:
Constant Field Values

MILE_MOUNTAIN

static final double MILE_MOUNTAIN
See Also:
Constant Field Values

MILE_VILLAGE

static final double MILE_VILLAGE
See Also:
Constant Field Values

MILE_NEW

static final double MILE_NEW
See Also:
Constant Field Values

MILE_NEW_SWEDISH

static final double MILE_NEW_SWEDISH
See Also:
Constant Field Values

DAY_TRAVEL

static final double DAY_TRAVEL
See Also:
Constant Field Values

STEP

static final double STEP
See Also:
Constant Field Values

RIFLESHOT

static final double RIFLESHOT
See Also:
Constant Field Values

LONG

static final double LONG
See Also:
Constant Field Values

CLOSE

static final double CLOSE
See Also:
Constant Field Values

ABIT

static final double ABIT
See Also:
Constant Field Values

TOUCH

static final double TOUCH
See Also:
Constant Field Values

SCALE

public static final double SCALE
That is, the 1 pixle = 1/SCALE km.

See Also:
Constant Field Values

PRECISION

public static final double PRECISION
Everything smaller than this after SCALE is taken into consideration is to be regarded as zero.

See Also:
Constant Field Values

DEFAULT_WIDTH

public static final double DEFAULT_WIDTH
See Also:
Constant Field Values

DEFAULT_LENGTH

public static final double DEFAULT_LENGTH
See Also:
Constant Field Values

DEFAULT_NO_WIDTH

public static final double DEFAULT_NO_WIDTH
See Also:
Constant Field Values

DEFAULT_NO_LENGTH

public static final double DEFAULT_NO_LENGTH
See Also:
Constant Field Values

DOUBLE_FACTOR_LEFT

public static final double DOUBLE_FACTOR_LEFT
See Also:
Constant Field Values

DOUBLE_FACTOR_RIGHT

public static final double DOUBLE_FACTOR_RIGHT
See Also:
Constant Field Values

DEFAULT_BETWEEN_DISTANCE_X

public static final double DEFAULT_BETWEEN_DISTANCE_X
See Also:
Constant Field Values

DEFAULT_BETWEEN_DISTANCE_Y

public static final double DEFAULT_BETWEEN_DISTANCE_Y
See Also:
Constant Field Values

BORDER_DISTANCE

public static final double BORDER_DISTANCE
If I am put next to a border, this is the distance from it I get. Expressed in km, not in meter!

See Also:
Constant Field Values

DEFAULT_DISTANCE

public static final double DEFAULT_DISTANCE
Expressed in km, not in meter!

See Also:
Constant Field Values

DEFAULT_DIRECTION

public static final double DEFAULT_DIRECTION
See Also:
Constant Field Values

errorLog

java.lang.StringBuffer errorLog
Constructor Detail

GraphTraversal

public GraphTraversal(GeoModelRunner inGeoModelRunner)
Method Detail

traverseAllLinks

public java.lang.String traverseAllLinks(java.lang.String rdfFileName,
                                         java.lang.String mapFileName,
                                         java.lang.String errorFileName)
                                  throws GeoModelLocationException
Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems. The global variable parasToUse must be set.

Parameters:
rdfFileName -
mapFileName -
errorFileName -
Returns:
A formatted version of the RDF model.
Throws:
GeoModelLocationException

traverseAllLinks

public java.lang.String traverseAllLinks(java.lang.String[] parasToUse)
                                  throws GeoModelLocationException
Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems.

Parameters:
parasToUse - Only include links connected to these paragraphs.
Returns:
A formatted version of the RDF model.
Throws:
GeoModelLocationException

traverseAllLinks

public java.lang.String traverseAllLinks(int firstPara,
                                         int lastPara)
                                  throws GeoModelLocationException
Returns:
Throws:
GeoModelLocationException

traverseAllLinks

public java.lang.String traverseAllLinks(java.lang.String personId)
                                  throws GeoModelLocationException
Running through all links in the model, create a dynamic RDF model, creates a GML map based on the RDF model, and exports the RDF model, the GML map, and a list of problems.

Parameters:
personId - Only include links connected to this person.
Returns:
A formatted version of the RDF model.
Throws:
GeoModelLocationException

dumpPartsLists

public java.lang.String dumpPartsLists()
Throw out a formatted list of part of-relations, for debugging purposes.

Returns:
The formattet list.

getMapPlace

MapPlace getMapPlace(java.lang.String id)

addToErrorLog

public void addToErrorLog(java.lang.String addStr)

getMyGeoModelRunner

public GeoModelRunner getMyGeoModelRunner()
Returns:
the myGeoModelRunner