|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain
public class OsmReadingHooksChain
A single class that holds several OsmReadingHooks
and calls them in
order.
It implements OsmReadingHooks
itself.
Constructor Summary | |
---|---|
OsmReadingHooksChain()
|
Method Summary | |
---|---|
void |
add(OsmReadingHooks hooks)
Add a new set of hooks. |
void |
end()
Called after the file has been read. |
java.util.Set<java.lang.String> |
getUsedTags()
Retrieves the tags that are used by this hook. |
boolean |
init(ElementSaver saver,
EnhancedProperties props)
Passes in the element saver and the command line options. |
void |
onAddNode(Node node)
Called on adding a node to the saver and just before it is added. |
void |
onAddWay(Way way)
Add the given way. |
void |
onCoordAddedToWay(Way way,
long coordId,
Coord co)
This is called whenever a node is added to a way. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsmReadingHooksChain()
Method Detail |
---|
public void add(OsmReadingHooks hooks)
hooks
- The reading hooks.public java.util.Set<java.lang.String> getUsedTags()
OsmReadingHooks
getUsedTags
in interface OsmReadingHooks
public boolean init(ElementSaver saver, EnhancedProperties props)
OsmReadingHooks
init
in interface OsmReadingHooks
saver
- This is where all the elements are being collected. You can access previously added
elements from here by their id. You can also add generated elements. You must not add the
element that is being passed in as it will be added automatically.props
- The command line options.
public void onAddNode(Node node)
OsmReadingHooks
onAddNode
in interface OsmReadingHooks
node
- The node to be added.public void onCoordAddedToWay(Way way, long coordId, Coord co)
OsmReadingHooks
onCoordAddedToWay
in interface OsmReadingHooks
way
- The incomplete way.coordId
- The coordinate id of the node that is being added.co
- The coordinate.public void onAddWay(Way way)
OsmReadingHooks
onAddWay
in interface OsmReadingHooks
way
- The osm way.public void end()
OsmReadingHooks
end
in interface OsmReadingHooks
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |