Package org.openstreetmap.josm.tools
Class TextAnalyzer
- java.lang.Object
-
- org.openstreetmap.josm.tools.TextAnalyzer
-
public class TextAnalyzer extends Object
A helper class that analyzes the text and attempts to parse tags from it- Since:
- 13544 (extracted from
TextTagParser
)
-
-
Field Summary
Fields Modifier and Type Field Description private String
data
private boolean
esc
private int
n
private int
pos
private boolean
quotesStarted
private StringBuilder
s
private String
valueStops
-
Constructor Summary
Constructors Constructor Description TextAnalyzer(String text)
Create a newTextAnalyzer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getFreeParsedTags()
Read tags from "Free format"String
parseString(String stopChars)
Parses current text to extract a key or value depending on given stop characters.private void
skipEmpty()
private void
skipSign()
-
-
-
Field Detail
-
quotesStarted
private boolean quotesStarted
-
esc
private boolean esc
-
s
private final StringBuilder s
-
valueStops
private String valueStops
-
pos
private int pos
-
n
private final int n
-
-
Constructor Detail
-
TextAnalyzer
public TextAnalyzer(String text)
Create a newTextAnalyzer
- Parameters:
text
- The text to parse
-
-
Method Detail
-
getFreeParsedTags
public Map<String,String> getFreeParsedTags()
Read tags from "Free format"- Returns:
- map of tags
-
parseString
public String parseString(String stopChars)
Parses current text to extract a key or value depending on given stop characters.- Parameters:
stopChars
- Parsing will stop when one character of this string is found- Returns:
- key or value extracted from current text
-
skipSign
private void skipSign()
-
skipEmpty
private void skipEmpty()
-
-