org.openrdf.sail.memory.model
Class MemStatement

java.lang.Object
  extended by org.openrdf.model.impl.StatementImpl
      extended by org.openrdf.model.impl.ContextStatementImpl
          extended by org.openrdf.sail.memory.model.MemStatement
All Implemented Interfaces:
Serializable, Statement

public class MemStatement
extends ContextStatementImpl

A MemStatement is a Statement which contains context information and a flag indicating whether the statement is explicit or inferred.

See Also:
Serialized Form

Constructor Summary
MemStatement(MemResource subject, MemURI predicate, MemValue object, MemResource context, boolean explicit, int sinceSnapshot)
          Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.
MemStatement(MemResource subject, MemURI predicate, MemValue object, MemResource context, boolean explicit, int sinceSnapshot, TxnStatus txnStatus)
          Creates a new MemStatement with the supplied subject, predicate, object and context.
MemStatement(MemResource subject, MemURI predicate, MemValue object, MemResource context, int sinceSnapshot)
          Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.
 
Method Summary
 void addToComponentLists()
          Lets this statement add itself to the appropriate statement lists of its subject, predicate, object and context.
 MemResource getContext()
          Gets the context of this statement.
 MemValue getObject()
          Gets the object of this statement.
 MemURI getPredicate()
          Gets the predicate of this statement.
 int getSinceSnapshot()
           
 MemResource getSubject()
          Gets the subject of this statement.
 int getTillSnapshot()
           
 TxnStatus getTxnStatus()
           
 boolean isExplicit()
           
 boolean isInSnapshot(int snapshot)
           
 void removeFromComponentLists()
          Lets this statement remove itself from the appropriate statement lists of its subject, predicate, object and context.
 void setExplicit(boolean explicit)
           
 void setSinceSnapshot(int snapshot)
           
 void setTillSnapshot(int snapshot)
           
 void setTxnStatus(TxnStatus txnStatus)
           
 
Methods inherited from class org.openrdf.model.impl.ContextStatementImpl
toString
 
Methods inherited from class org.openrdf.model.impl.StatementImpl
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemStatement

public MemStatement(MemResource subject,
                    MemURI predicate,
                    MemValue object,
                    MemResource context,
                    int sinceSnapshot)
Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.


MemStatement

public MemStatement(MemResource subject,
                    MemURI predicate,
                    MemValue object,
                    MemResource context,
                    boolean explicit,
                    int sinceSnapshot)
Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.


MemStatement

public MemStatement(MemResource subject,
                    MemURI predicate,
                    MemValue object,
                    MemResource context,
                    boolean explicit,
                    int sinceSnapshot,
                    TxnStatus txnStatus)
Creates a new MemStatement with the supplied subject, predicate, object and context. The value of the explicit parameter determines if this statement is marked as 'explicit' or not.

Method Detail

getSubject

public MemResource getSubject()
Description copied from interface: Statement
Gets the subject of this statement.

Specified by:
getSubject in interface Statement
Overrides:
getSubject in class StatementImpl
Returns:
The statement's subject.

getPredicate

public MemURI getPredicate()
Description copied from interface: Statement
Gets the predicate of this statement.

Specified by:
getPredicate in interface Statement
Overrides:
getPredicate in class StatementImpl
Returns:
The statement's predicate.

getObject

public MemValue getObject()
Description copied from interface: Statement
Gets the object of this statement.

Specified by:
getObject in interface Statement
Overrides:
getObject in class StatementImpl
Returns:
The statement's object.

getContext

public MemResource getContext()
Description copied from interface: Statement
Gets the context of this statement.

Specified by:
getContext in interface Statement
Overrides:
getContext in class ContextStatementImpl
Returns:
The statement's context, or null in case of the null context or if not applicable.

setSinceSnapshot

public void setSinceSnapshot(int snapshot)

getSinceSnapshot

public int getSinceSnapshot()

setTillSnapshot

public void setTillSnapshot(int snapshot)

getTillSnapshot

public int getTillSnapshot()

isInSnapshot

public boolean isInSnapshot(int snapshot)

setExplicit

public void setExplicit(boolean explicit)

isExplicit

public boolean isExplicit()

setTxnStatus

public void setTxnStatus(TxnStatus txnStatus)

getTxnStatus

public TxnStatus getTxnStatus()

addToComponentLists

public void addToComponentLists()
Lets this statement add itself to the appropriate statement lists of its subject, predicate, object and context. The transaction status will be set to TxnStatus.NEW.


removeFromComponentLists

public void removeFromComponentLists()
Lets this statement remove itself from the appropriate statement lists of its subject, predicate, object and context. The transaction status will be set to null.



Copyright © 2001-2008 Aduna. All Rights Reserved.