- All Implemented Interfaces:
TripleStore
- Direct Known Subclasses:
GraphTripleStoreMem
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a triple to this triple store.voidclear()Clear this store, ie remove all triples from it.voidclose()Destroy this triple store - discard the indexes.booleanAnswer true iff this triple store contains the (concrete) triplet.booleanAnswer true iff this triple store contains the triple matcht.voidRemove a triple from this triple store.Answer an ExtendedIterator returning all the triples from this store that match the patternm = (S, P, O).booleanisEmpty()Answer true iff this triple store is empty.Answer an setwise iterator over all the objects of triples in this store.Answer an iterator over all the predicates of triples in this store.Answer an setwise iterator over all the subjects of triples in this store.intsize()Answer the size (number of triples) of this triple store.Answer a Stream returning all the triples from this store that match the patternm = (S, P, O).
-
Method Details
-
close
public void close()Destroy this triple store - discard the indexes.- Specified by:
closein interfaceTripleStore
-
add
Add a triple to this triple store.- Specified by:
addin interfaceTripleStore
-
delete
Remove a triple from this triple store.- Specified by:
deletein interfaceTripleStore
-
clear
public void clear()Clear this store, ie remove all triples from it.- Specified by:
clearin interfaceTripleStore
-
size
public int size()Answer the size (number of triples) of this triple store.- Specified by:
sizein interfaceTripleStore
-
isEmpty
public boolean isEmpty()Answer true iff this triple store is empty.- Specified by:
isEmptyin interfaceTripleStore
-
listSubjects
Description copied from interface:TripleStoreAnswer an setwise iterator over all the subjects of triples in this store.- Specified by:
listSubjectsin interfaceTripleStore
-
listPredicates
Description copied from interface:TripleStoreAnswer an iterator over all the predicates of triples in this store.- Specified by:
listPredicatesin interfaceTripleStore
-
listObjects
Description copied from interface:TripleStoreAnswer an setwise iterator over all the objects of triples in this store.- Specified by:
listObjectsin interfaceTripleStore
-
contains
Answer true iff this triple store contains the (concrete) triplet.- Specified by:
containsin interfaceTripleStore
-
containsMatch
Description copied from interface:TripleStoreAnswer true iff this triple store contains the triple matcht.- Specified by:
containsMatchin interfaceTripleStore
-
find
Answer an ExtendedIterator returning all the triples from this store that match the patternm = (S, P, O).Because the node-to-triples maps index on each of subject, predicate, and (non-literal) object, concrete S/P/O patterns can immediately select an appropriate map. Because the match for literals must be by sameValueAs, not equality, the optimisation is not applied for literals. [This is probably a Bad Thing for strings.]
Practice suggests doing the predicate test last, because there are "usually" many more statements than predicates, so the predicate doesn't cut down the search space very much. By "practice suggests" I mean that when the order went, accidentally, from S/O/P to S/P/O, performance on (ANY, P, O) searches on largish models with few predicates declined dramatically - specifically on the not-galen.owl ontology.
- Specified by:
findin interfaceTripleStore
-
stream
Answer a Stream returning all the triples from this store that match the patternm = (S, P, O).Because the node-to-triples maps index on each of subject, predicate, and (non-literal) object, concrete S/P/O patterns can immediately select an appropriate map. Because the match for literals must be by sameValueAs, not equality, the optimisation is not applied for literals. [This is probably a Bad Thing for strings.]
Practice suggests doing the predicate test last, because there are "usually" many more statements than predicates, so the predicate doesn't cut down the search space very much. By "practice suggests" I mean that when the order went, accidentally, from S/O/P to S/P/O, performance on (ANY, P, O) searches on largish models with few predicates declined dramatically - specifically on the not-galen.owl ontology.
- Specified by:
streamin interfaceTripleStore
-