Class OSMParser

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable, org.openstreetmap.osmosis.core.lifecycle.Closeable, org.openstreetmap.osmosis.core.lifecycle.Completable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.Initializable, org.openstreetmap.osmosis.core.task.v0_6.Sink

    public class OSMParser
    extends java.lang.Object
    implements org.openstreetmap.osmosis.core.task.v0_6.Sink, java.io.Serializable
    Build a structure from the elements in an OSM file.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $, initial version 31 dec. 2014

    Author:
    Mingxin Zhang , Moritz Bergmann
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      OSMParser​(java.util.List<OSMTag> wantedTags, java.util.List<java.lang.String> filteredKeys)
      Construct a new OSMParser and set wantedTags and filteredKeys in one call.
    • Constructor Detail

      • OSMParser

        public OSMParser​(java.util.List<OSMTag> wantedTags,
                         java.util.List<java.lang.String> filteredKeys)
        Construct a new OSMParser and set wantedTags and filteredKeys in one call.
        Parameters:
        wantedTags - List<OSMTag>; the list of wantedTags
        filteredKeys - List<String>; the list of filtered keys
    • Method Detail

      • initialize

        public void initialize​(java.util.Map<java.lang.String,​java.lang.Object> arg0)
        Specified by:
        initialize in interface org.openstreetmap.osmosis.core.task.v0_6.Initializable
      • process

        public final void process​(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)
        Specified by:
        process in interface org.openstreetmap.osmosis.core.task.v0_6.Sink
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.openstreetmap.osmosis.core.lifecycle.Closeable
      • complete

        public final void complete()
        Specified by:
        complete in interface org.openstreetmap.osmosis.core.lifecycle.Completable
      • getNetwork

        public final OSMNetwork getNetwork()
        Returns:
        the whole Network
      • setWantedTags

        public final void setWantedTags​(java.util.List<OSMTag> tags)
        Set/replace the list of wanted tags.
        This method makes a deep copy of the supplied list.
        Parameters:
        tags - List<OSMTag>; the list of wanted tags
      • setFilterKeys

        public final void setFilterKeys​(java.util.List<java.lang.String> keys)
        Set/replace the filter keys.
        The provided list is not copied; the caller should not modify the list afterwards.
        Parameters:
        keys - List<String>; List<String> list of filter keys
      • getProgressListener

        public final ProgressListener getProgressListener()
        Returns:
        progressListener.
      • setProgressListener

        public final void setProgressListener​(ProgressListener progressListener)
        Parameters:
        progressListener - ProgressListener; set progressListener.
      • toString

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