|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object agent.core.memory.Memory
public class Memory
Agent Memory Main functionality to access and manipulate Jena ontology models in MySQL database
Field Summary | |
---|---|
(package private) Config |
config
|
private IDBConnection |
conn
Instanceof database connection object |
private static java.lang.String |
DEFAULT_MODEL_NAME
Default ontology model name |
private boolean |
loaded
State variable identifies whether model is loaded |
private Logger |
log
Log4j object |
private OntModel |
model
Instance of ontological model used in agent |
Constructor Summary | |
---|---|
Memory(java.lang.String _propertyFile,
java.lang.String _agentName)
Constructor |
Method Summary | |
---|---|
void |
closeModel()
Close OWL Model and store Model in RDB if using database backend This have to be redesigned and store everything on the crash |
void |
createModel()
Creates OWL model out of defined SOURCE_FILE in OWL database and store this model see: SOURCE_FILE ,
INDIVIDUALS_FILE |
Property |
createProperty(java.lang.String property)
Creates ontology property out ofstring represenation |
static java.lang.String |
getBase()
Reurns the agent onoloy name space |
IDBConnection |
getConnection()
This method returns db connection |
OntModel |
getModel()
Returns OWL ontological model for manipulation |
void |
memory2owl()
Saves current content of Memory into file defined in Ontology Property file see: OUTPUT_FILE |
void |
performInference(java.lang.String ruleFile,
boolean derivationLogging)
Infers some new statements about the agent ontological model accoding to given rules of inference and adds inferenced model as submodel of agent |
void |
removeModel()
Remove model from DB |
void |
reset()
Sometimes if operation is idle MySQL connection fails and we need to reset connection and model |
void |
test()
Prints objects from OWL model for testing purposes |
void |
testConnection()
Tests the status of connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Config config
private static final java.lang.String DEFAULT_MODEL_NAME
private Logger log
private IDBConnection conn
private OntModel model
private boolean loaded
Constructor Detail |
---|
public Memory(java.lang.String _propertyFile, java.lang.String _agentName)
_propertyFile
- - property file name where settings for agent memory are stored. Settings are defined according to memory.Config
_agentName
- name of the agentMethod Detail |
---|
public static java.lang.String getBase()
public IDBConnection getConnection()
public void createModel()
SOURCE_FILE
,
INDIVIDUALS_FILE
public void removeModel()
public OntModel getModel()
public void performInference(java.lang.String ruleFile, boolean derivationLogging)
ruleFile
- path to file with line delimited list of rulesderivationLogging
- true/false value indicates whether to perform logging of inferenced statements
public void reset()
public void test()
public void memory2owl()
OUTPUT_FILE
public void closeModel()
public Property createProperty(java.lang.String property)
property
- represents local name of ontology propertypublic void testConnection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |