01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.memory.model;
07:
08: import org.openrdf.model.Value;
09:
10: /**
11: * A MemoryStore-specific extension of the Value interface, giving it node
12: * properties.
13: */
14: public interface MemValue extends Value {
15:
16: /*-----------*
17: * Constants *
18: *-----------*/
19:
20: /**
21: * A shared empty MemStatementList that is returned by MemURI and MemBNode to
22: * represent an empty list. The use of a shared list reduces memory usage.
23: */
24: static final MemStatementList EMPTY_LIST = new MemStatementList(0);
25:
26: /*---------*
27: * Methods *
28: *---------*/
29:
30: /**
31: * Returns the object that created this MemValue. MemValues are only unique
32: * within a single repository, but an application could use several
33: * repositories at the same time, passing MemValues generated by one Sail to
34: * another Sail. In such situations, the MemValue of the first Sail cannot be
35: * used by the second Sail.
36: */
37: public Object getCreator();
38:
39: /**
40: * Gets the list of statements for which this MemValue is the object.
41: *
42: * @return A MemStatementList containing the statements.
43: */
44: public MemStatementList getObjectStatementList();
45:
46: /**
47: * Gets the number of statements for which this MemValue is the object.
48: *
49: * @return An integer larger than or equal to 0.
50: */
51: public int getObjectStatementCount();
52:
53: /**
54: * Adds a statement to this MemValue's list of statements for which it is the
55: * object.
56: */
57: public void addObjectStatement(MemStatement st);
58:
59: /**
60: * Removes a statement from this MemValue's list of statements for which it
61: * is the object.
62: */
63: public void removeObjectStatement(MemStatement st);
64: }
|