public abstract class AbstractRdbmsStore extends AbstractStore implements RdbmsStore
Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_BATCH_SIZE |
protected static int |
VARCHAR_SIZE |
Constructor and Description |
---|
AbstractRdbmsStore(RdbmsDriver driver) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Atom atom)
Add the specified atom to this atom set if is not already present.
|
protected abstract Statement |
add(Statement statement,
Atom atom) |
boolean |
addAll(CloseableIterator<? extends Atom> stream)
Add the specified atom stream to this atom set.
|
boolean |
check(Atom a)
Check if the specified Atom has a format accepted by the store.
|
boolean |
check(Predicate p)
Check if the specified predicate has a format accepted by the store.
|
void |
clear() |
void |
close()
This method close the associated driver instance.
|
boolean |
contains(Atom atom)
Returns true if this atom set contains the specified atom.
|
protected abstract void |
createDatabaseSchema() |
protected DBTable |
createPredicateTable(Predicate predicate)
Create a table associated to the specified predicate and return the table
informations.
|
protected DBTable |
createPredicateTableIfNotExist(Predicate predicate)
Get the table informations associated to the specified predicate.
|
protected Statement |
createStatement() |
protected Connection |
getConnection() |
RdbmsDriver |
getDriver() |
protected abstract String |
getFreshPredicateTableName(Predicate predicate) |
protected DBTable |
getPredicateTable(Predicate predicate)
Get the table informations associated to the specified predicate.
|
protected abstract DBTable |
getPredicateTableIfExist(Predicate predicate)
Ask the database for table informations associated to the specified
predicate.
|
boolean |
isWriteable() |
CloseableIterator<Atom> |
iterator()
Returns an iterator over the atoms in this atom set.
|
boolean |
remove(Atom atom)
Remove the specified atom from this this atom set.
|
protected Statement |
remove(Statement statement,
Atom atom) |
boolean |
removeAll(CloseableIterator<? extends Atom> stream)
Remove the specified atom stream from this atom set.
|
protected void |
removePredicate(Statement stat,
Predicate p) |
protected abstract boolean |
testDatabaseSchema() |
createBatchProcessor, getDomainSize, size
addAll, constantsIterator, equals, equals, getConstants, getLiterals, getPredicates, getTerms, getTerms, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, toString, variablesIterator
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConjunctiveQueryTranslator, getTerm
atomsByPredicate, createBatchProcessor, getDomainSize, match, predicatesIterator, size, termsByPredicatePosition, termsIterator, termsIterator
addAll, constantsIterator, getConstants, getFreshSymbolGenerator, getLiterals, getPredicates, getTerms, getTerms, getVariables, isEmpty, isSubSetOf, literalsIterator, removeAll, variablesIterator
protected static final int VARCHAR_SIZE
protected static final int MAX_BATCH_SIZE
public AbstractRdbmsStore(RdbmsDriver driver) throws AtomSetException
driver
- AtomSetException
public RdbmsDriver getDriver()
getDriver
in interface RdbmsStore
public boolean add(Atom atom) throws AtomSetException
AtomSet
add
in interface AtomSet
atom
- - atom to be added to this atom setAtomSetException
public boolean contains(Atom atom) throws AtomSetException
AtomSet
contains
in interface AtomSet
contains
in class AbstractAtomSet
AtomSetException
public boolean remove(Atom atom)
AtomSet
public void clear() throws AtomSetException
clear
in interface AtomSet
AtomSetException
public boolean addAll(CloseableIterator<? extends Atom> stream) throws AtomSetException
AtomSet
addAll
in interface AtomSet
addAll
in class AbstractAtomSet
AtomSetException
public boolean removeAll(CloseableIterator<? extends Atom> stream) throws AtomSetException
AtomSet
removeAll
in interface AtomSet
removeAll
in class AbstractAtomSet
stream
- - the atom stream to be removed.AtomSetException
public boolean check(Atom a) throws AtomSetException
RdbmsStore
check
in interface RdbmsStore
AtomSetException
public boolean check(Predicate p) throws AtomSetException
RdbmsStore
check
in interface RdbmsStore
AtomSetException
public CloseableIterator<Atom> iterator()
AtomSet
public boolean isWriteable() throws AtomSetException
isWriteable
in interface Store
AtomSetException
public void close()
protected Connection getConnection()
protected Statement createStatement() throws AtomSetException
AtomSetException
protected abstract Statement add(Statement statement, Atom atom) throws AtomSetException
AtomSetException
protected Statement remove(Statement statement, Atom atom) throws AtomSetException
AtomSetException
protected DBTable createPredicateTableIfNotExist(Predicate predicate) throws AtomSetException
predicate
- AtomSetException
protected DBTable getPredicateTable(Predicate predicate) throws AtomSetException
predicate
- AtomSetException
protected DBTable createPredicateTable(Predicate predicate) throws AtomSetException
predicate
- AtomSetException
protected void removePredicate(Statement stat, Predicate p) throws AtomSetException
AtomSetException
protected abstract String getFreshPredicateTableName(Predicate predicate) throws AtomSetException
AtomSetException
protected abstract boolean testDatabaseSchema() throws AtomSetException
AtomSetException
protected abstract void createDatabaseSchema() throws AtomSetException
AtomSetException
protected abstract DBTable getPredicateTableIfExist(Predicate predicate) throws AtomSetException
predicate
- AtomSetException
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.