public class KiWiReasoningSail extends TransactionalSailWrapper
Constructor and Description |
---|
KiWiReasoningSail(TransactionalSail parent,
ReasoningConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
addProgram(Program program)
Add a program to the reasoner.
|
void |
addProgram(String name,
InputStream data)
Add a program to the reasoner using the given name.
|
void |
deleteProgram(String name)
Remove the program with the given name.
|
KiWiStore |
getBaseStore()
Return the KiWi store that is at the base of the SAIL stack.
|
ReasoningConfiguration |
getConfig() |
ReasoningEngine |
getEngine()
Return a reference to the underlying reasoning engine.
|
KiWiReasoningPersistence |
getPersistence()
Return a reference to the underlying database persistence layer.
|
Program |
getProgram(String name)
Return the program with the given name.
|
void |
initialize() |
info.aduna.iteration.CloseableIteration<Justification,org.openrdf.sail.SailException> |
justify(long tripleId)
List the justifications for the triple with the id given as argument.
|
info.aduna.iteration.CloseableIteration<Program,org.openrdf.sail.SailException> |
listPrograms()
List all reasoning programs currently stored in the triplestore.
|
void |
reRunPrograms()
Clean all inferred triples and re-run all reasoning rules.
|
void |
shutDown() |
void |
updateProgram(Program program)
Update the program given as argument.
|
void |
updateProgram(String name,
InputStream data)
Update the program with the name given as argument using the data provided in the stream.
|
addTransactionListener, isTransactionsEnabled, removeTransactionListener, setTransactionsEnabled
addSailChangedListener, getBaseSail, getConnection, removeSailChangedListener, setBaseSail
getDataDir, getValueFactory, isWritable, setDataDir, verifyBaseSailSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public KiWiReasoningSail(TransactionalSail parent, ReasoningConfiguration config)
public void initialize() throws org.openrdf.sail.SailException
initialize
in interface org.openrdf.sail.Sail
initialize
in class org.openrdf.sail.helpers.SailWrapper
org.openrdf.sail.SailException
public void shutDown() throws org.openrdf.sail.SailException
shutDown
in interface org.openrdf.sail.Sail
shutDown
in class org.openrdf.sail.helpers.SailWrapper
org.openrdf.sail.SailException
public KiWiStore getBaseStore()
public ReasoningConfiguration getConfig()
public void addProgram(String name, InputStream data) throws IOException, org.openrdf.sail.SailException, ParseException
name
- a unique name for the programdata
- the program data in KWRL syntaxIOException
- in case the stream cannot be readorg.openrdf.sail.SailException
- in case the program already existsParseException
- in case the program cannot be parsedpublic void addProgram(Program program) throws org.openrdf.sail.SailException
program
- the program data in KWRL syntaxorg.openrdf.sail.SailException
- in case the program already existspublic void updateProgram(String name, InputStream data) throws IOException, org.openrdf.sail.SailException, ParseException
IOException
- in case the stream cannot be readorg.openrdf.sail.SailException
- in case the program already existsParseException
- in case the program cannot be parsedpublic void updateProgram(Program program) throws org.openrdf.sail.SailException
program
- the updated version of the programorg.openrdf.sail.SailException
- in case a database error occurspublic info.aduna.iteration.CloseableIteration<Program,org.openrdf.sail.SailException> listPrograms() throws org.openrdf.sail.SailException
org.openrdf.sail.SailException
public Program getProgram(String name) throws org.openrdf.sail.SailException
name
- the unique name of the program to retrieveorg.openrdf.sail.SailException
- in case an error occurspublic void deleteProgram(String name) throws org.openrdf.sail.SailException
name
- the unique name of the program to removeorg.openrdf.sail.SailException
public void reRunPrograms()
public ReasoningEngine getEngine()
public KiWiReasoningPersistence getPersistence()
public info.aduna.iteration.CloseableIteration<Justification,org.openrdf.sail.SailException> justify(long tripleId) throws org.openrdf.sail.SailException
tripleId
- org.openrdf.sail.SailException
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.