public abstract class SemanticAugmenter
extends java.lang.Object
Constructor and Description |
---|
SemanticAugmenter()
Create a new SemanticAugmenter.
|
SemanticAugmenter(java.lang.String propNames)
Create a new Semantic Augmenter which augments information in the
specified property.
|
SemanticAugmenter(java.lang.String className,
java.lang.String propName)
Create a new Semantic Augmenter which augments information in the
specified property for the specified class.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperties(java.lang.String propList)
Add a property or list of properties by name.
|
void |
addProperty(Property prop)
Add a property which is augmented by this augmenter.
|
boolean |
augment(OwlThing thing)
Augment a particular OwlThing.
|
java.lang.String |
getConfig()
Get the configuration string.
|
protected abstract java.util.Set<java.lang.String> |
getNewValues(OwlThing thing,
Property prop)
Get the new values for the thing.
|
OwlClass |
getOwlClass()
Get the OwlClass of objects that this augmenter enhances
|
java.util.Set<Property> |
getProperties()
Get the properties enhanced by this augmenter
|
protected abstract java.util.Set<java.lang.String> |
getRefineValues(OwlThing thing)
Get any possible values used to refine the class of the OwlThing passed
in.
|
protected boolean |
isOverwrite()
Return whether the overwrite flag is set.
|
boolean |
isRefine()
Return whether the refine flag has been set
|
void |
setConfig(java.lang.String configValue)
Set the configuration string for this augmenter.
|
void |
setOverwrite(boolean flag)
Set the overwrite flag.
|
void |
setOwlClass(OwlClass owlClass)
Set the OwlClass of objects that this augmenter enhances
|
void |
setRefine(boolean refineFlag)
Set the flag that indicates whether this augmenter should try to refine
the class of the objects it is augmenting.
|
java.lang.String |
toString()
Return a string representation of this augmenter
|
public SemanticAugmenter()
public SemanticAugmenter(java.lang.String propNames)
propNames
- Owl Property namespublic SemanticAugmenter(java.lang.String className, java.lang.String propName)
className
- name of the Owl Class to augmentpropName
- Owl Property namepublic void addProperties(java.lang.String propList)
propList
- list of comma-separated propertiespublic void addProperty(Property prop)
prop
- the property for this augmenterpublic boolean augment(OwlThing thing)
getNewValues(thing)
, and add the new values to the
OwlThing. If the cardinality for the property is 1, and the overwrite
flag is set, it will overwrite existing values. Otherwise it will add a
new value to the thing.thing
- the OwlThing to enhancepublic java.lang.String getConfig()
protected abstract java.util.Set<java.lang.String> getNewValues(OwlThing thing, Property prop)
thing
- the thing to find the value forprop
- the property to get values forpublic OwlClass getOwlClass()
public java.util.Set<Property> getProperties()
protected abstract java.util.Set<java.lang.String> getRefineValues(OwlThing thing)
thing
- the thing to find the possible refinements forprotected boolean isOverwrite()
public boolean isRefine()
public void setConfig(java.lang.String configValue)
configValue
- a configuration string. The format for this string is
dependent on the individual augmenterpublic void setOverwrite(boolean flag)
flag
- the overwrite flagpublic void setOwlClass(OwlClass owlClass)
owlClass
- the OwlClass of objects that this augmenter enhancespublic void setRefine(boolean refineFlag)
refineFlag
- the refine flagpublic java.lang.String toString()
toString
in class java.lang.Object