public abstract class AtomManager extends Object
GroundAtoms
that are instantiated from a Database
.
By wrapping ReadableDatabase.getAtom(Predicate, Constant...)
,
an AtomManager gives additional control over the GroundAtoms that come from
that Database.
Additionally, AtomManagers can support other functionality that might require
coordination by providing a single component to call to carry out tasks.
An AtomManager should be initialized with the Database for which it is managing
Atoms.Constructor and Description |
---|
AtomManager(Database db) |
Modifier and Type | Method and Description |
---|---|
ResultList |
executeGroundingQuery(Formula formula)
Calls
ReadableDatabase.executeGroundingQuery(Formula) on the
encapsulated Database. |
ResultList |
executeQuery(DatabaseQuery query)
Calls
ReadableDatabase.executeQuery(DatabaseQuery) on the
encapsulated Database. |
abstract GroundAtom |
getAtom(Predicate predicate,
Constant... arguments)
Returns the GroundAtom for the given Predicate and GroundTerms.
|
Database |
getDatabase() |
boolean |
isClosed(StandardPredicate predicate)
Calls
ReadableDatabase.isClosed(StandardPredicate) on the
encapsulated Database. |
protected final Database db
public AtomManager(Database db)
public abstract GroundAtom getAtom(Predicate predicate, Constant... arguments)
ReadableDatabase.getAtom(Predicate, Constant...)
to actually retrieve the GroundAtom.predicate
- the Predicate of the Atomarguments
- the GroundTerms of the Atompublic ResultList executeQuery(DatabaseQuery query)
ReadableDatabase.executeQuery(DatabaseQuery)
on the
encapsulated Database.query
- the query to executepublic ResultList executeGroundingQuery(Formula formula)
ReadableDatabase.executeGroundingQuery(Formula)
on the
encapsulated Database.public boolean isClosed(StandardPredicate predicate)
ReadableDatabase.isClosed(StandardPredicate)
on the
encapsulated Database.predicate
- the predicate to checkpublic Database getDatabase()
Copyright © 2018 University of California, Santa Cruz. All rights reserved.