public class DefaultInMemoryGraphStore extends AbstractInMemoryAtomSet implements Store
Constructor and Description |
---|
DefaultInMemoryGraphStore() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Atom atom)
Add the specified atom to this atom set if is not already present.
|
CloseableIteratorWithoutException<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.
|
BatchProcessor |
createBatchProcessor() |
int |
getDomainSize()
Returns the numbers of different terms referenced by atoms in this store
or a greater estimation of it.
|
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() |
CloseableIteratorWithoutException<Atom> |
iterator()
Returns an iterator over the atoms in this atom set.
|
CloseableIteratorWithoutException<Atom> |
match(Atom atom)
Returns an iterator over atoms that match predicate and constants from
the specified atom.
|
CloseableIteratorWithoutException<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.
|
int |
size() |
int |
size(Predicate p)
Returns the number of atoms related to the specified predicate or a
greater estimation of it.
|
CloseableIteratorWithoutException<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.
|
CloseableIteratorWithoutException<Term> |
termsIterator()
Returns an iterator over all terms in this atom set.
|
CloseableIteratorWithoutException<Term> |
termsIterator(Term.Type type)
Deprecated.
|
addAll, addAll, constantsIterator, getConstants, getLiterals, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, removeAll, variablesIterator
addAll, addAll, equals, equals, removeAll, removeAll, toString
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, addAll, constantsIterator, getConstants, getLiterals, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, removeAll, variablesIterator
public Set<Predicate> getPredicates()
AtomSet
getPredicates
in interface AtomSet
getPredicates
in interface InMemoryAtomSet
getPredicates
in class AbstractInMemoryAtomSet
public CloseableIteratorWithoutException<Predicate> predicatesIterator()
AtomSet
predicatesIterator
in interface AtomSet
predicatesIterator
in interface InMemoryAtomSet
predicatesIterator
in interface Store
public CloseableIteratorWithoutException<Atom> iterator()
AtomSet
iterator
in interface AtomSet
iterator
in interface InMemoryAtomSet
iterator
in interface Store
iterator
in interface CloseableIterable<Atom>
iterator
in interface CloseableIterableWithoutException<Atom>
public boolean remove(Atom atom)
AtomSet
remove
in interface AtomSet
remove
in interface InMemoryAtomSet
atom
- - the atom to be removedpublic boolean contains(Atom atom)
AtomSet
contains
in interface AtomSet
contains
in interface InMemoryAtomSet
contains
in class AbstractInMemoryAtomSet
public CloseableIteratorWithoutException<Atom> match(Atom atom)
AtomSet
public CloseableIteratorWithoutException<Atom> atomsByPredicate(Predicate p)
AtomSet
atomsByPredicate
in interface AtomSet
atomsByPredicate
in interface InMemoryAtomSet
atomsByPredicate
in interface Store
public int size(Predicate p)
Store
Integer.MAX_VALUE
.public int getDomainSize()
Store
Integer.MAX_VALUE
.getDomainSize
in interface Store
public CloseableIteratorWithoutException<Term> termsByPredicatePosition(Predicate p, int position)
AtomSet
termsByPredicatePosition
in interface AtomSet
termsByPredicatePosition
in interface InMemoryAtomSet
termsByPredicatePosition
in interface Store
position
- the term position in atoms, positions starts from 0.public Set<Term> getTerms()
AtomSet
getTerms
in interface AtomSet
getTerms
in interface InMemoryAtomSet
getTerms
in class AbstractInMemoryAtomSet
public CloseableIteratorWithoutException<Term> termsIterator()
AtomSet
termsIterator
in interface AtomSet
termsIterator
in interface InMemoryAtomSet
termsIterator
in interface Store
@Deprecated public Set<Term> getTerms(Term.Type type)
AtomSet
AtomSet.getVariables()
, AtomSet.getConstants()
or AtomSet.getLiterals()
instead.
getTerms
in interface AtomSet
getTerms
in interface InMemoryAtomSet
getTerms
in class AbstractInMemoryAtomSet
@Deprecated public CloseableIteratorWithoutException<Term> termsIterator(Term.Type type)
AtomSet
AtomSet.variablesIterator()
, AtomSet.constantsIterator()
or AtomSet.literalsIterator()
instead.
termsIterator
in interface AtomSet
termsIterator
in interface InMemoryAtomSet
termsIterator
in interface Store
public boolean add(Atom atom)
AtomSet
add
in interface AtomSet
add
in interface InMemoryAtomSet
atom
- - atom to be added to this atom setpublic void clear()
clear
in interface AtomSet
clear
in interface InMemoryAtomSet
public TermGenerator getFreshSymbolGenerator()
getFreshSymbolGenerator
in interface AtomSet
public int size()
public BatchProcessor createBatchProcessor() throws AtomSetException
createBatchProcessor
in interface Store
AtomSetException
public boolean isWriteable()
isWriteable
in interface Store
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.