public class RDF4jStore extends AbstractTripleStore
DEFAULT_PREFIX, DEFAULT_PREFIX_VALUE, PREFIX, SELECT_ALL, SELECT_PREDICATES_QUERY, SELECT_QUERY, SELECT_TERMS_QUERY
Constructor and Description |
---|
RDF4jStore(org.eclipse.rdf4j.repository.Repository repo)
Construct a RDF4jStore around a RDF4J Repository
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Atom atom)
Add the specified atom to this atom set if is not already present.
|
boolean |
addAll(CloseableIterator<? extends Atom> atom)
Add the specified atom stream to this atom set.
|
CloseableIterator<Atom> |
atomsByPredicate(Predicate p)
Returns an iterator over all atoms with the specified predicate.
|
void |
clear() |
void |
close() |
boolean |
contains(Atom atom)
Returns true if this atom set contains the specified atom.
|
protected void |
finalize() |
TermGenerator |
getFreshSymbolGenerator() |
Set<Predicate> |
getPredicates()
Returns a Set of all predicates in this atom set.
|
Set<Term> |
getTerms()
Returns a Set of all terms in this atom set.
|
Set<Term> |
getTerms(Term.Type type)
Deprecated.
|
boolean |
isWriteable() |
CloseableIterator<Atom> |
iterator()
Returns an iterator over the atoms in this atom set.
|
CloseableIterator<Atom> |
match(Atom atom)
Returns an iterator over atoms that match predicate and constants from
the specified atom.
|
CloseableIterator<Predicate> |
predicatesIterator()
Returns an iterator over all predicates in this atom set.
|
boolean |
remove(Atom atom)
Remove the specified atom from this this atom set.
|
boolean |
removeAll(CloseableIterator<? extends Atom> atom)
Remove the specified atom stream from this atom set.
|
CloseableIterator<Term> |
termsByPredicatePosition(Predicate p,
int position)
Returns an iterator over terms which are in a specific position in at
least one atom with the specified predicate.
|
CloseableIterator<Term> |
termsIterator()
Returns an iterator over all terms in this atom set.
|
CloseableIterator<Term> |
termsIterator(Term.Type type)
Deprecated.
|
getDefaultPrefix
createBatchProcessor, getDomainSize, size
addAll, constantsIterator, equals, equals, getConstants, getLiterals, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, toString, variablesIterator
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
createBatchProcessor, getDomainSize, size
addAll, constantsIterator, getConstants, getLiterals, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, variablesIterator
public RDF4jStore(org.eclipse.rdf4j.repository.Repository repo) throws AtomSetException
repo
- AtomSetException
protected void finalize() throws Throwable
public boolean isWriteable()
public void close()
public boolean add(Atom atom) throws AtomSetException
AtomSet
atom
- - atom to be added to this atom setAtomSetException
public boolean addAll(CloseableIterator<? extends Atom> atom) throws AtomSetException
AtomSet
addAll
in interface AtomSet
addAll
in class AbstractAtomSet
AtomSetException
public boolean remove(Atom atom) throws AtomSetException
AtomSet
atom
- AtomSetException
public boolean removeAll(CloseableIterator<? extends Atom> atom) throws AtomSetException
AtomSet
removeAll
in interface AtomSet
removeAll
in class AbstractAtomSet
atom
- - the atom stream to be removed.AtomSetException
public boolean contains(Atom atom) throws AtomSetException
AtomSet
contains
in interface AtomSet
contains
in class AbstractAtomSet
AtomSetException
public CloseableIterator<Atom> match(Atom atom) throws AtomSetException
AtomSet
AtomSetException
public CloseableIterator<Atom> atomsByPredicate(Predicate p) throws AtomSetException
AtomSet
AtomSetException
public CloseableIterator<Term> termsByPredicatePosition(Predicate p, int position) throws AtomSetException
AtomSet
position
- the term position in atoms, positions starts from 0.AtomSetException
public CloseableIterator<Predicate> predicatesIterator() throws AtomSetException
AtomSet
AtomSetException
public Set<Predicate> getPredicates() throws AtomSetException
AtomSet
getPredicates
in interface AtomSet
getPredicates
in class AbstractAtomSet
AtomSetException
public CloseableIterator<Term> termsIterator() throws AtomSetException
AtomSet
AtomSetException
public Set<Term> getTerms() throws AtomSetException
AtomSet
getTerms
in interface AtomSet
getTerms
in class AbstractAtomSet
AtomSetException
@Deprecated public CloseableIterator<Term> termsIterator(Term.Type type) throws AtomSetException
AtomSet
AtomSet.variablesIterator()
, AtomSet.constantsIterator()
or AtomSet.literalsIterator()
instead.
AtomSetException
@Deprecated public Set<Term> getTerms(Term.Type type) throws AtomSetException
AtomSet
AtomSet.getVariables()
, AtomSet.getConstants()
or AtomSet.getLiterals()
instead.
getTerms
in interface AtomSet
getTerms
in class AbstractAtomSet
AtomSetException
public TermGenerator getFreshSymbolGenerator()
public void clear() throws AtomSetException
AtomSetException
public CloseableIterator<Atom> iterator()
AtomSet
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.