Package org.openstreetmap.josm.io
Class NoteReader
java.lang.Object
org.openstreetmap.josm.io.NoteReader
Class to read Note objects from their XML representation. It can take
either API style XML which starts with an "osm" tag or a planet dump
style XML which starts with an "osm-notes" tag.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enumNotes can be represented in two XML formats.private final classSAX handler to read note information from its XML representation. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNoteReader(InputStream source) Initializes the reader with a given InputStreamNoteReader(String source) Initializes the reader with a string as a source -
Method Summary
Modifier and TypeMethodDescriptionparse()Parses the InputStream given to the constructor and returns the resulting Note objects(package private) static LatLonparseLatLon(UnaryOperator<String> attrs) (package private) static NoteparseNoteBasic(UnaryOperator<String> attrs) (package private) static NoteparseNoteBasic(Attributes attrs) (package private) static NoteparseNoteFull(UnaryOperator<String> attrs) (package private) static NoteparseNoteFull(Attributes attrs)
-
Field Details
-
inputSource
-
parsedNotes
-
-
Constructor Details
-
NoteReader
Initializes the reader with a given InputStream- Parameters:
source- - InputStream containing Notes XML
-
NoteReader
Initializes the reader with a string as a source- Parameters:
source- UTF-8 string containing Notes XML to parse
-
-
Method Details
-
parseLatLon
-
parseNoteBasic
-
parseNoteBasic
-
parseNoteFull
-
parseNoteFull
-
parse
Parses the InputStream given to the constructor and returns the resulting Note objects- Returns:
- List of Notes parsed from the input data
- Throws:
SAXException- if any SAX parsing error occursIOException- if any I/O error occurs
-