public class OpenGeoDBLocation extends java.lang.Object implements Locations
Modifier and Type | Field and Description |
---|---|
private java.io.File |
file |
private java.util.Map<java.lang.Integer,GeoLocation> |
id2loc |
private java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> |
kfz2ids |
private java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> |
name2ids |
private java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> |
predial2ids |
private java.util.Map<java.lang.String,java.lang.Integer> |
zip2id |
Constructor and Description |
---|
OpenGeoDBLocation(java.io.File file,
WordCache dymLib) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
compare localization services; to be used for hash sets with localization services
|
java.util.TreeSet<GeoLocation> |
find(java.lang.String anyname,
boolean locationexact)
check database tables against occurrences of this entity the anyname - String may be one of: - name of
a town, villa, region etc - zip code - telephone prefix - kfz sign
|
int |
hashCode()
hashCode that must be used to distinguish localization services in hash sets
|
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
locationNames()
produce a set of location names
|
java.lang.String |
nickname()
return an nickname of the localization service
|
java.util.Set<java.lang.String> |
recommend(java.lang.String s)
read the dictionary and construct a set of recommendations to a given string
|
java.util.Set<java.lang.StringBuilder> |
recommend(java.lang.StringBuilder s)
recommend a set of names according to a given name
|
private static java.lang.String |
removeQuotes(java.lang.String s) |
int |
size()
the number of locations that this localization stores
|
private final java.util.Map<java.lang.Integer,GeoLocation> id2loc
private final java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> name2ids
private final java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> kfz2ids
private final java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> predial2ids
private final java.util.Map<java.lang.String,java.lang.Integer> zip2id
private final java.io.File file
public OpenGeoDBLocation(java.io.File file, WordCache dymLib)
private static final java.lang.String removeQuotes(java.lang.String s)
public int size()
Locations
public boolean isEmpty()
public java.util.TreeSet<GeoLocation> find(java.lang.String anyname, boolean locationexact)
public java.util.Set<java.lang.String> locationNames()
locationNames
in interface Locations
public java.util.Set<java.lang.String> recommend(java.lang.String s)
public java.util.Set<java.lang.StringBuilder> recommend(java.lang.StringBuilder s)
Locations
public java.lang.String nickname()
Locations
public int hashCode()
Locations
public boolean equals(java.lang.Object other)
Locations