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

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.osm.Element
      extended by uk.me.parabola.mkgmap.reader.osm.Relation
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
Direct Known Subclasses:
GeneralRelation, MultiPolygonRelation, RestrictionRelation

public abstract class Relation
extends Element

Represent a Relation.

Author:
Rene_A

Constructor Summary
Relation()
           
 
Method Summary
 void addElement(java.lang.String role, Element el)
          Add a (role, Element) pair to this Relation.
 java.util.List<java.util.Map.Entry<java.lang.String,Element>> getElements()
          Get the ordered list of relation members.
 java.lang.String kind()
           
abstract  void processElements()
          Invoked after addElement() has been invoked on all Node and Way members of the relations.
 
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, toString, wait, wait, wait
 

Constructor Detail

Relation

public Relation()
Method Detail

addElement

public void addElement(java.lang.String role,
                       Element el)
Add a (role, Element) pair to this Relation.

Parameters:
role - The role this element performs in this relation
el - The Element added

processElements

public abstract void processElements()
Invoked after addElement() has been invoked on all Node and Way members of the relations. Relation members (sub-relations) may be added later.


getElements

public java.util.List<java.util.Map.Entry<java.lang.String,Element>> getElements()
Get the ordered list of relation members.

Returns:
list of pairs of (role, Element)

kind

public java.lang.String kind()
Overrides:
kind in class Element