org.ka2ddo.yaac.osm
Class Relation
java.lang.Object
org.ka2ddo.yaac.osm.GenericTaggedNode<Relation>
org.ka2ddo.yaac.osm.Relation
public class Relation
- extends GenericTaggedNode<Relation>
This class represents a Relation element of an OSM file.
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
public int id
Relation
public Relation()
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