Class SelectQueryUriFinder
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.searchindex.indexing.SelectQueryUriFinder
-
- All Implemented Interfaces:
IndexingUriFinder,ContextModelsUser
public class SelectQueryUriFinder extends Object implements IndexingUriFinder, ContextModelsUser
Find URIs based on one or more select queries. If the statement qualifies, execute the queries and return the accumulated results. A statement qualifies if the predicate matches any of the restrictions, or if there are no restrictions. If a query contains a ?subject, ?predicate, or ?object variable, it will be bound to the URI of the subject, predicate, or object of the statement, respectively. If the subject or object has no URI and the query expects one, then the query will be ignored. (Predicates always have URIs.) All of the result fields of all result rows of all of the queries will be returned. A label may be supplied to the instance, for use in logging. If no label is supplied, one will be generated.
-
-
Constructor Summary
Constructors Constructor Description SelectQueryUriFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPredicateRestriction(String predicateUri)voidaddQuery(String query)voidendIndexing()Indicates that the collection of statements being processed is complete.List<String>findAdditionalURIsToIndex(org.apache.jena.rdf.model.Statement stmt)For the domain that is the responsibility of the given implementation, calculate the URIs that need to be updated in the search index.voidsetContextModels(ContextModelAccess models)voidsetLabel(String l)voidstartIndexing()Indicates that a new collection of statements is about to be processed.StringtoString()voidvalidate()
-
-
-
Method Detail
-
setContextModels
public void setContextModels(ContextModelAccess models)
- Specified by:
setContextModelsin interfaceContextModelsUser
-
setLabel
public void setLabel(String l)
-
addQuery
public void addQuery(String query)
-
addPredicateRestriction
public void addPredicateRestriction(String predicateUri)
-
validate
public void validate()
-
startIndexing
public void startIndexing()
Description copied from interface:IndexingUriFinderIndicates that a new collection of statements is about to be processed.- Specified by:
startIndexingin interfaceIndexingUriFinder
-
findAdditionalURIsToIndex
public List<String> findAdditionalURIsToIndex(org.apache.jena.rdf.model.Statement stmt)
Description copied from interface:IndexingUriFinderFor the domain that is the responsibility of the given implementation, calculate the URIs that need to be updated in the search index. The URIs in the list will be updated by the IndexBuilder, which will handle URIs of new individuals, URIs of individuals that have changes, and URIs of individuals that have been removed from the model.- Specified by:
findAdditionalURIsToIndexin interfaceIndexingUriFinder- Returns:
- List of URIs. Never return null.
-
endIndexing
public void endIndexing()
Description copied from interface:IndexingUriFinderIndicates that the collection of statements being processed is complete.- Specified by:
endIndexingin interfaceIndexingUriFinder
-
-