org.ka2ddo.yaac.osm
Class Relation

java.lang.Object
  extended by org.ka2ddo.yaac.osm.GenericTaggedNode<Relation>
      extended by org.ka2ddo.yaac.osm.Relation

public class Relation
extends GenericTaggedNode<Relation>

This class represents a Relation element of an OSM file.


Field Summary
 int id
           
 
Fields inherited from class org.ka2ddo.yaac.osm.GenericTaggedNode
decodedtagArray, FIXME, flags, HAS_ID, HAS_ID64, HAS_INTERNET_ACCESS, HAS_TOLL, IS_AREA, IS_BRIDGE, IS_BUILDING, IS_DISUSED, IS_INFERRED_AREA, IS_ISLAND, IS_LIT, IS_ONEWAY, IS_ONEWAY_BACKWARDS, IS_TUNNEL, IS_WATER, RENDERABLE_FLAGS
 
Constructor Summary
Relation()
           
 
Method Summary
 Relation dup()
          Create a deep copy of this Relation.
static void main(java.lang.String[] args)
           
static Relation read(java.io.DataInput is)
           
 java.lang.String toString()
          Returns a string representation of the Relation object.
 void write(java.io.DataOutput dos)
           
 void writeGPX(java.io.PrintStream ps)
          Write this Relation to the specified stream as the XML tags one element in GPX schema format.
protected  void writeId(java.io.DataOutput dos)
          Handle writing the ID field to the binary data stream (handles larger ID ranges in varying subclasses).
 
Methods inherited from class org.ka2ddo.yaac.osm.GenericTaggedNode
decodedTagArrayToString, ensureElementHasTagArray, getDecodedTagCount, hasDecodedTags, putTag, readTags, writeTags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public int id
Constructor Detail

Relation

public Relation()
Method Detail

writeId

protected void writeId(java.io.DataOutput dos)
                throws java.io.IOException
Handle writing the ID field to the binary data stream (handles larger ID ranges in varying subclasses).

Specified by:
writeId in class GenericTaggedNode<Relation>
Parameters:
dos - DataOutput to use to append the binary ID value
Throws:
java.io.IOException - if write fails for any reason

write

public void write(java.io.DataOutput dos)
           throws java.io.IOException
Throws:
java.io.IOException

read

public static Relation read(java.io.DataInput is)
                     throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns a string representation of the Relation object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

dup

public Relation dup()
Create a deep copy of this Relation. Similar to the Object method clone(), but without the exceptions and casting.

Specified by:
dup in class GenericTaggedNode<Relation>
Returns:
copy of this Relation

writeGPX

public void writeGPX(java.io.PrintStream ps)
Write this Relation to the specified stream as the XML tags one element in GPX schema format.

Specified by:
writeGPX in class GenericTaggedNode<Relation>
Parameters:
ps - PrintStream to write to

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException