public abstract class AbstractAnnotator extends QueryAnnotatorImpl implements EntityAnnotator
EntityAnnotator that first creates a query, queries the resource, then
filters the results using a ResultFilter and then copies the resulting attributes to the annotated
Entity.| Constructor and Description |
|---|
AbstractAnnotator(String sourceRepositoryName,
AnnotatorInfo info,
QueryCreator queryCreator,
ResultFilter resultFilter,
DataService dataService,
Resources resources,
CmdLineAnnotatorSettingsConfigurer cmdLineAnnotatorSettingsConfigurer) |
| Modifier and Type | Method and Description |
|---|---|
List<Attribute> |
getRequiredAttributes() |
protected Object |
getResourceAttributeValue(Attribute attr,
Entity entity)
Get the resource attribute value for one of this annotator's output attributes.
|
protected void |
processQueryResults(Entity entity,
Iterable<Entity> annotationSourceEntities,
boolean updateMode)
Processes the query results.
|
annotateEntity, getAnnotatorAttributes, getCmdLineAnnotatorSettingsConfigurer, getInfo, sourceExistsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitannotateEntity, getCmdLineAnnotatorSettingsConfigurer, sourceExistscreateAnnotatorAttributes, getAnnotatorAttributes, getInfopublic AbstractAnnotator(String sourceRepositoryName, AnnotatorInfo info, QueryCreator queryCreator, ResultFilter resultFilter, DataService dataService, Resources resources, CmdLineAnnotatorSettingsConfigurer cmdLineAnnotatorSettingsConfigurer)
protected void processQueryResults(Entity entity, Iterable<Entity> annotationSourceEntities, boolean updateMode)
QueryAnnotatorImplprocessQueryResults in class QueryAnnotatorImplentity - the input entity that is being annotatedannotationSourceEntities - the entities resulting from the query on the annotation sourceprotected Object getResourceAttributeValue(Attribute attr, Entity entity)
attr - the name of the output attributeentity - the current entitypublic List<Attribute> getRequiredAttributes()
getRequiredAttributes in interface EntityAnnotatorgetRequiredAttributes in class QueryAnnotatorImplList that must be present in the source entity.Copyright © 2017. All rights reserved.