Class SimpleStatement

  • All Implemented Interfaces:
    java.io.Serializable, Statement
    Direct Known Subclasses:
    ContextStatement

    @Deprecated(since="4.1.0",
                forRemoval=true)
    public class SimpleStatement
    extends AbstractStatement
    Deprecated, for removal: This API element is subject to removal in a future version.
    A simple default implementation of the Statement interface for statements that don't have an associated context. For statements that do have an associated context, ContextStatement can be used.
    See Also:
    SimpleValueFactory, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Value object
      Deprecated, for removal: This API element is subject to removal in a future version.
      The statement's object.
      private IRI predicate
      Deprecated, for removal: This API element is subject to removal in a future version.
      The statement's predicate.
      private static long serialVersionUID
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      private Resource subject
      Deprecated, for removal: This API element is subject to removal in a future version.
      The statement's subject.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SimpleStatement​(Resource subject, IRI predicate, Value object)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Statement with the supplied subject, predicate and object.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean exactSameObject​(Value object)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean exactSamePredicate​(IRI predicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean exactSameSubject​(Resource subject)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      Resource getContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the context of this statement.
      Value getObject()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the object of this statement.
      IRI getPredicate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the predicate of this statement.
      Resource getSubject()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the subject of this statement.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Deprecated, for removal: This API element is subject to removal in a future version.
        See Also:
        Constant Field Values
      • subject

        private final Resource subject
        Deprecated, for removal: This API element is subject to removal in a future version.
        The statement's subject.
      • predicate

        private final IRI predicate
        Deprecated, for removal: This API element is subject to removal in a future version.
        The statement's predicate.
      • object

        private final Value object
        Deprecated, for removal: This API element is subject to removal in a future version.
        The statement's object.
    • Constructor Detail

      • SimpleStatement

        protected SimpleStatement​(Resource subject,
                                  IRI predicate,
                                  Value object)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new Statement with the supplied subject, predicate and object. *

        Note that creating SimpleStatement objects directly via this constructor is not the recommended approach. Instead, use a ValueFactory (obtained from your repository or by using SimpleValueFactory.getInstance()) to create new Statement objects.

        Parameters:
        subject - The statement's subject, must not be null.
        predicate - The statement's predicate, must not be null.
        object - The statement's object, must not be null.
        See Also:
        SimpleValueFactory.createStatement(Resource, IRI, Value)
    • Method Detail

      • getSubject

        public Resource getSubject()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Statement
        Gets the subject of this statement.
        Returns:
        The statement's subject.
      • getPredicate

        public IRI getPredicate()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Statement
        Gets the predicate of this statement.
        Returns:
        The statement's predicate.
      • getObject

        public Value getObject()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Statement
        Gets the object of this statement.
        Returns:
        The statement's object.
      • exactSameSubject

        public boolean exactSameSubject​(Resource subject)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • exactSamePredicate

        public boolean exactSamePredicate​(IRI predicate)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • exactSameObject

        public boolean exactSameObject​(Value object)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getContext

        public Resource getContext()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Statement
        Gets the context of this statement.
        Returns:
        The statement's context, or null in case of the null context or if not applicable.