Class OsmChangeReader

    • Field Detail

      • ACTIONS

        private static final java.lang.String[] ACTIONS
        List of possible actions.
    • Method Detail

      • parseRoot

        protected void parseRoot()
                          throws javax.xml.stream.XMLStreamException
        Overrides:
        parseRoot in class OsmReader
        Throws:
        javax.xml.stream.XMLStreamException
      • parseOsmChange

        private void parseOsmChange()
                             throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • parseCommon

        private void parseCommon​(java.lang.String action)
                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • parseNote

        private void parseNote()
                        throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • getNoteData

        public final NoteData getNoteData()
        Replies the parsed notes data.
        Returns:
        the parsed notes data
        Since:
        14101
      • parseDataSet

        public static DataSet parseDataSet​(java.io.InputStream source,
                                           ProgressMonitor progressMonitor)
                                    throws IllegalDataException
        Parse the given input source and return the dataset.
        Parameters:
        source - the source input stream. Must not be null.
        progressMonitor - the progress monitor. If null, NullProgressMonitor.INSTANCE is assumed
        Returns:
        the dataset with the parsed data
        Throws:
        IllegalDataException - if the an error was found while parsing the data from the source
        java.lang.IllegalArgumentException - if source is null
      • parseDataSetAndNotes

        public static Pair<DataSet,​NoteDataparseDataSetAndNotes​(java.io.InputStream source,
                                                                        ProgressMonitor progressMonitor)
                                                                 throws IllegalDataException
        Parse the given input source and return the dataset and notes, if any (OsmAnd extends the osmChange format by adding notes).
        Parameters:
        source - the source input stream. Must not be null.
        progressMonitor - the progress monitor. If null, NullProgressMonitor.INSTANCE is assumed
        Returns:
        the dataset with the parsed data
        Throws:
        IllegalDataException - if the an error was found while parsing the data from the source
        java.lang.IllegalArgumentException - if source is null
        Since:
        14101