/*
* Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
*
* Licensed under the Aduna BSD-style license.
*/
package org.openrdf.sail.memory.model;
import org.openrdf.model.Value;
/**
* A MemoryStore-specific extension of the Value interface, giving it node
* properties.
*/
public interface MemValue extends Value {
/*-----------*
* Constants *
*-----------*/
/**
* A shared empty MemStatementList that is returned by MemURI and MemBNode to
* represent an empty list. The use of a shared list reduces memory usage.
*/
static final MemStatementList EMPTY_LIST = new MemStatementList(0);
/*---------*
* Methods *
*---------*/
/**
* Returns the object that created this MemValue. MemValues are only unique
* within a single repository, but an application could use several
* repositories at the same time, passing MemValues generated by one Sail to
* another Sail. In such situations, the MemValue of the first Sail cannot be
* used by the second Sail.
*/
public Object getCreator();
/**
* Gets the list of statements for which this MemValue is the object.
*
* @return A MemStatementList containing the statements.
*/
public MemStatementList getObjectStatementList();
/**
* Gets the number of statements for which this MemValue is the object.
*
* @return An integer larger than or equal to 0.
*/
public int getObjectStatementCount();
/**
* Adds a statement to this MemValue's list of statements for which it is the
* object.
*/
public void addObjectStatement(MemStatement st);
/**
* Removes a statement from this MemValue's list of statements for which it
* is the object.
*/
public void removeObjectStatement(MemStatement st);
}