public class GeoNamesAugmenter extends SemanticAugmenter implements EntityVerifier
| Constructor and Description |
|---|
GeoNamesAugmenter()
Create a new GeoNamesReader.
|
GeoNamesAugmenter(java.lang.String filePath)
Create a new GeoNamesReader.
|
| Modifier and Type | Method and Description |
|---|---|
EntityType |
determineType(java.lang.String term)
Determine the type of an entity.
|
java.lang.String |
getModel()
Get the model string for this verifier.
|
protected java.util.Set<java.lang.String> |
getNewValues(OwlThing thing,
Property prop)
Find the new values for the OwlThing.
|
protected java.util.Set<java.lang.String> |
getRefineValues(OwlThing thing)
Get any possible values used to refine the class of the OwlThing passed
in.
|
java.util.Set<EntityType> |
getSupportedTypes()
Get the supported types for this verifier.
|
java.lang.String |
normalize(java.lang.String term,
EntityType type)
Normalize the name.
|
void |
setConfig(java.lang.String cfg)
Set the configuration information.
|
void |
setModel(java.lang.String cfg)
Set the model information.
|
java.lang.String |
toString()
Return a string representation of this reader
|
boolean |
verifyType(java.lang.String term,
EntityType type)
Verify the entity type.
|
addProperties, addProperty, augment, getConfig, getOwlClass, getProperties, isOverwrite, isRefine, setOverwrite, setOwlClass, setRefinepublic GeoNamesAugmenter()
setModel method.public GeoNamesAugmenter(java.lang.String filePath)
filePath - the path to the geonames filepublic EntityType determineType(java.lang.String term)
determineType in interface EntityVerifierterm - the term to check.public java.lang.String getModel()
getModel in interface EntityVerifierprotected java.util.Set<java.lang.String> getNewValues(OwlThing thing, Property prop)
getNewValues in class SemanticAugmenterthing - the OwlThing to augmentprop - the property to get values forprotected java.util.Set<java.lang.String> getRefineValues(OwlThing thing)
getRefineValues in class SemanticAugmenterthing - the thing to find the possible refinements forpublic java.util.Set<EntityType> getSupportedTypes()
getSupportedTypes in interface EntityVerifierpublic java.lang.String normalize(java.lang.String term,
EntityType type)
normalize in interface EntityVerifierterm - the location nametype - the entity type, which should be EntityType.LOCATIONpublic void setConfig(java.lang.String cfg)
setConfig in class SemanticAugmentercfg - the configuration, or the path to the geonames filepublic void setModel(java.lang.String cfg)
setModel in interface EntityVerifiercfg - the configuration, or the path to the geonames filepublic java.lang.String toString()
toString in class SemanticAugmenterpublic boolean verifyType(java.lang.String term,
EntityType type)
verifyType in interface EntityVerifierterm - the termtype - the type. This implementation only recognizes
EntityType.LOCATION