Class 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 Detail

      • SelectQueryUriFinder

        public SelectQueryUriFinder()
    • Method Detail

      • setLabel

        public void setLabel​(String l)
      • addQuery

        public void addQuery​(String query)
      • addPredicateRestriction

        public void addPredicateRestriction​(String predicateUri)
      • validate

        public void validate()
      • findAdditionalURIsToIndex

        public List<String> findAdditionalURIsToIndex​(org.apache.jena.rdf.model.Statement stmt)
        Description copied from interface: IndexingUriFinder
        For 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:
        findAdditionalURIsToIndex in interface IndexingUriFinder
        Returns:
        List of URIs. Never return null.
      • endIndexing

        public void endIndexing()
        Description copied from interface: IndexingUriFinder
        Indicates that the collection of statements being processed is complete.
        Specified by:
        endIndexing in interface IndexingUriFinder