public interface ReadableDatabase
GroundAtoms
.
To persist GroundAtoms
use a WritableDatabase.Modifier and Type | Method and Description |
---|---|
int |
countAllGroundAtoms(StandardPredicate predicate)
Get a count of all the ground atoms for a predicate.
|
int |
countAllGroundRandomVariableAtoms(StandardPredicate predicate)
Get a count of all the ground RandomVariableAtoms for a predicate.
|
ResultList |
executeGroundingQuery(Formula formula)
Like executeQuery(), but specifically for grounding queries.
|
ResultList |
executeQuery(DatabaseQuery query)
Returns all groundings of a Formula that match a DatabaseQuery.
|
List<GroundAtom> |
getAllGroundAtoms(StandardPredicate predicate)
Fetch all the ground atoms for a predicate.
|
List<ObservedAtom> |
getAllGroundObservedAtoms(StandardPredicate predicate)
Fetch all the ground ObservedAtoms for a predicate.
|
List<RandomVariableAtom> |
getAllGroundRandomVariableAtoms(StandardPredicate predicate)
Fetch all the ground RandomVariableAtoms for a predicate.
|
GroundAtom |
getAtom(Predicate predicate,
Constant... arguments)
Returns the GroundAtom for the given Predicate and GroundTerms.
|
boolean |
hasAtom(StandardPredicate predicate,
Constant... arguments)
Check to see if a ground atom exists in the database.
|
boolean |
isClosed(StandardPredicate predicate)
Returns whether a StandardPredicate is closed in this Database.
|
GroundAtom getAtom(Predicate predicate, Constant... arguments)
StandardPredicate
can be retrieved if and only
if its Predicate was registered with the DataStore at the time of the Database's
instantiation. Any GroundAtom with an ExternalFunctionalPredicate} can also be retrieved.
This method first checks the AtomCache
to see if the GroundAtom already
exists in memory. If it does, then that object is returned.
If the GroundAtom does not exist in memory, then it will be instantiated and
stored in the AtomCache before being returned. The subtype and state of the
instantiated GroundAtom depends on several factors:
ObservedAtom
with the persisted state.RandomVariableAtom
if it is open.IllegalStateException
- if the Atom is persisted in multiple read Partitionsboolean hasAtom(StandardPredicate predicate, Constant... arguments)
int countAllGroundAtoms(StandardPredicate predicate)
int countAllGroundRandomVariableAtoms(StandardPredicate predicate)
List<GroundAtom> getAllGroundAtoms(StandardPredicate predicate)
List<RandomVariableAtom> getAllGroundRandomVariableAtoms(StandardPredicate predicate)
List<ObservedAtom> getAllGroundObservedAtoms(StandardPredicate predicate)
ResultList executeQuery(DatabaseQuery query)
ResultList executeGroundingQuery(Formula formula)
boolean isClosed(StandardPredicate predicate)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.