Class QuerySpec

  • All Implemented Interfaces:
    SearchQueryEvaluator

    public class QuerySpec
    extends AbstractSearchQueryEvaluator
    A QuerySpec holds information extracted from a TupleExpr corresponding with a single Lucene query. Access the patterns or use the get-methods to get the names of the variables to bind.
    • Constructor Detail

      • QuerySpec

        public QuerySpec​(org.eclipse.rdf4j.query.algebra.StatementPattern matchesPattern,
                         Collection<QuerySpec.QueryParam> queryPatterns,
                         org.eclipse.rdf4j.query.algebra.StatementPattern scorePattern,
                         org.eclipse.rdf4j.query.algebra.StatementPattern typePattern,
                         org.eclipse.rdf4j.query.algebra.StatementPattern idPattern,
                         org.eclipse.rdf4j.model.Resource subject)
      • QuerySpec

        public QuerySpec​(String matchesVarName,
                         String propertyVarName,
                         String scoreVarName,
                         String snippetVarName,
                         org.eclipse.rdf4j.model.Resource subject,
                         String queryString,
                         org.eclipse.rdf4j.model.IRI propertyURI)
    • Method Detail

      • getParentQueryModelNode

        public org.eclipse.rdf4j.query.algebra.QueryModelNode getParentQueryModelNode()
      • removeQueryPatterns

        public org.eclipse.rdf4j.query.algebra.QueryModelNode removeQueryPatterns()
        Description copied from interface: SearchQueryEvaluator
        Removes the query patterns and returns a placeholder where the query results could be placed.
      • getMatchesPattern

        public org.eclipse.rdf4j.query.algebra.StatementPattern getMatchesPattern()
      • getMatchesVariableName

        public String getMatchesVariableName()
        return the name of the bound variable that should match the query
        Returns:
        the name of the variable or null, if no name set
      • getIdPattern

        public org.eclipse.rdf4j.query.algebra.StatementPattern getIdPattern()
      • getScorePattern

        public org.eclipse.rdf4j.query.algebra.StatementPattern getScorePattern()
      • getScoreVariableName

        public String getScoreVariableName()
        The variable name associated with the query score
        Returns:
        the name or null, if no score is queried in the pattern
      • getTypePattern

        public org.eclipse.rdf4j.query.algebra.StatementPattern getTypePattern()
      • getQueryType

        public org.eclipse.rdf4j.model.IRI getQueryType()
        the type of query, must equal LuceneSailSchema.LUCENE_QUERY. A null type is possible, but not valid.
        Returns:
        the type of the Query or null, if no type assigned.
      • getSubject

        public org.eclipse.rdf4j.model.Resource getSubject()
      • isEvaluable

        public boolean isEvaluable()
      • isHighlight

        public boolean isHighlight()
      • getCatQuery

        public String getCatQuery()