Interface Selector

All Superinterfaces:
Predicate<Statement>
All Known Implementing Classes:
SelectorImpl, SimpleSelector

public interface Selector extends Predicate<Statement>
A Statement selector.

Model includes list and query methods which will return all the statements which are selected by a selector object. This is the interface of such selector objects.

  • Method Summary

    Modifier and Type
    Method
    Description
    Answer the only RDFNode object that this Selector will match, or null if it can match more than a single node.
    Answer the only predicate Property that this Selector will match, or null if it can match more than a single property.
    Answer the only subject Resource that this Selector will match, or null if it can match more that a single resource.
    boolean
    Answer true iff this Selector is completely characterised by its subject, predicate, and object fields.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or, test
  • Method Details

    • isSimple

      boolean isSimple()
      Answer true iff this Selector is completely characterised by its subject, predicate, and object fields. If so, the test predicate need not be called to decide if a statement is acceptable. This allows query engines latitude for optimisation (and our memory-based implementation both exploits this licence).
    • getSubject

      Resource getSubject()
      Answer the only subject Resource that this Selector will match, or null if it can match more that a single resource.
    • getPredicate

      Property getPredicate()
      Answer the only predicate Property that this Selector will match, or null if it can match more than a single property.
    • getObject

      RDFNode getObject()
      Answer the only RDFNode object that this Selector will match, or null if it can match more than a single node.