uk.me.parabola.mkgmap.reader.osm
Class RestrictionRelation

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.osm.Element
      extended by uk.me.parabola.mkgmap.reader.osm.Relation
          extended by uk.me.parabola.mkgmap.reader.osm.RestrictionRelation
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>

public class RestrictionRelation
extends Relation

Representation of an OSM turn restriction

Author:
Mark Burton

Constructor Summary
RestrictionRelation(Relation other)
          Create an instance based on an existing relation.
 
Method Summary
 void addOtherNode(CoordNode otherNode)
           
 void addRestriction(MapCollector collector)
           
 Way getFromWay()
           
 Way getToWay()
           
 Coord getViaCoord()
           
 boolean isValid()
           
 void processElements()
          Process the members in this relation.
 void setFromNode(CoordNode fromNode)
           
 void setToNode(CoordNode toNode)
           
 void setViaNode(CoordNode viaNode)
           
 java.lang.String toString()
           
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.Relation
addElement, getElements, kind
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.Element
addTag, copy, copyTags, deleteTag, getEntryIteratable, getId, getName, getTag, getTagsWithPrefix, iterator, removeAllTags, setId, setName, toBrowseURL, toTagString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestrictionRelation

public RestrictionRelation(Relation other)
Create an instance based on an existing relation. We need to do this because the type of the relation is not known until after all its tags are read in.

Parameters:
other - The relation to base this one on.
Method Detail

getFromWay

public Way getFromWay()

getToWay

public Way getToWay()

getViaCoord

public Coord getViaCoord()

setFromNode

public void setFromNode(CoordNode fromNode)

setToNode

public void setToNode(CoordNode toNode)

setViaNode

public void setViaNode(CoordNode viaNode)

addOtherNode

public void addOtherNode(CoordNode otherNode)

isValid

public boolean isValid()

addRestriction

public void addRestriction(MapCollector collector)

processElements

public void processElements()
Process the members in this relation.

Specified by:
processElements in class Relation

toString

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