public class StoreAccess
extends java.lang.Object
Constructor and Description |
---|
StoreAccess() |
Modifier and Type | Method and Description |
---|---|
static boolean |
ensureNoMatchingTriples(Item subject,
Item verb,
TripleStore store,
StoreSession session)
Ensure that there are no triples with a given subject
and verb
|
static Item[] |
getSubjects(java.util.Collection<Triple> triples)
Get the subjects of a collection of triples
|
static java.lang.Boolean |
getUniqueBooleanObject(Item subject,
Item verb,
TripleStore store,
StoreSession session)
Get the boolean that is the unique object with a given subject
and verb.
|
static java.lang.Long |
getUniqueIntegralObject(Item subject,
Item verb,
TripleStore store,
StoreSession session)
Get the integer that is the unique object with a given subject
and verb.
|
static Datum |
getUniqueObject(Item subject,
Item verb,
TripleStore store,
StoreSession session)
Get the object of the unique triple with a given subject and verb.
|
static Item |
getUniqueSubject(Item verb,
Datum object,
TripleStore store,
StoreSession session)
Get the unique item in a triple store that is the subject of a triple with a
given verb and object
|
static java.lang.String |
getUniqueTextObject(Item subject,
Item verb,
TripleStore store,
StoreSession session)
Get the string that is the unique object with a given subject
and verb.
|
static Triple |
setUniqueObject(Item subject,
Item verb,
Datum object,
TripleStore store,
StoreSession session)
Ensure that there is a unique triple with a given subject and verb,
and that it has a given object.
|
static Triple |
setUniqueTriple(Item subject,
Item verb,
Datum object,
TripleStore store,
StoreSession session)
Set a unique triple with a given subject, verb and object.
|
static Item |
uniqueItemObject(Item subject,
Item verb,
long sourceNr,
AccessLevel onlyReadLevel,
AccessLevel readOrWriteLevel,
TripleStore store,
StoreSession session)
Get the item that is the unique object with a given subject
and verb, creating it and the appropriate triple if it does
not exist.
|
static Item |
uniqueSubject(long sourceNr,
AccessLevel onlyReadLevel,
AccessLevel readOrWriteLevel,
Item verb,
Datum object,
TripleStore store,
StoreSession session)
Get the unique subject with a given verb and object.
|
public static Item[] getSubjects(java.util.Collection<Triple> triples)
triples
- a collection of triplespublic static Item uniqueSubject(long sourceNr, AccessLevel onlyReadLevel, AccessLevel readOrWriteLevel, Item verb, Datum object, TripleStore store, StoreSession session) throws java.lang.Exception
sourceNr
- the identification number of the source
in which the subject is to be created if it does not exist.onlyReadLevel
- the only-read level of the subject if
it is to be created because it does not exist.readOrWriteLevel
- the read-or-write level of the subject
if it is to be created because it does not exist.verb
- a verbobject
- an objectstore
- the triple store containing the subject, verb,
object, and unique triple with that subject, verb, and
objectsession
- the requesting sessionjava.lang.Exception
public static Item getUniqueSubject(Item verb, Datum object, TripleStore store, StoreSession session) throws java.lang.Exception
verb
- the given verbobject
- the given objectstore
- the triple storesession
- the requesting store sessionjava.lang.Exception
public static Item uniqueItemObject(Item subject, Item verb, long sourceNr, AccessLevel onlyReadLevel, AccessLevel readOrWriteLevel, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbsourceNr
- the identification number of the source
in which the object is to be created if it does not exist.onlyReadLevel
- the only-read level of the object if
it is to be created because it does not exist.readOrWriteLevel
- the read-or-write level of the object
if it is to be created because it does not exist.store
- the triple store containing the subject, verb,
object, and unique triple with that subject, verb, and
objectsession
- the requesting sessionjava.lang.Exception
public static java.lang.String getUniqueTextObject(Item subject, Item verb, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbstore
- the triple store containing the subject and verb,
and unique triple with that subject and verbsession
- the requesting sessionjava.lang.Exception
public static java.lang.Long getUniqueIntegralObject(Item subject, Item verb, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbstore
- the triple store containing the subject and verb,
and unique triple with that subject and verbsession
- the requesting sessionjava.lang.Exception
public static java.lang.Boolean getUniqueBooleanObject(Item subject, Item verb, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbstore
- the triple store containing the subject and verb,
and unique triple with that subject and verbsession
- the requesting sessionjava.lang.Exception
public static Datum getUniqueObject(Item subject, Item verb, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbstore
- the triple store containing the subject and verb,
and unique triple with that subject and verbsession
- the requesting sessionjava.lang.Exception
public static Triple setUniqueTriple(Item subject, Item verb, Datum object, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbobject
- the given objectstore
- the triple store containing the subject verb, and
object, and which contains or will contain the unique triple.session
- the requesting sessionjava.lang.Exception
public static Triple setUniqueObject(Item subject, Item verb, Datum object, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the given subjectverb
- the given verbobject
- the given objectstore
- the triple store containing the subject verb, and
object, and which contains or will contain the unique triple.session
- the requesting sessionjava.lang.Exception
public static boolean ensureNoMatchingTriples(Item subject, Item verb, TripleStore store, StoreSession session) throws java.lang.Exception
subject
- the subjectverb
- the verbstore
- the triple store containing the subject and verb.session
- the requesting store sessionjava.lang.Exception