@ApplicationScoped public class ReasoningSailProvider extends Object implements org.apache.marmotta.platform.core.api.triplestore.TransactionalSailProvider
Modifier and Type | Field and Description |
---|---|
static String |
REASONING_ENABLED |
Constructor and Description |
---|
ReasoningSailProvider() |
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 |
configurationChanged(org.apache.marmotta.platform.core.events.ConfigurationChangedEvent e) |
TransactionalSailWrapper |
createSail(TransactionalSail parent)
Create the sail wrapper provided by this SailProvider
|
void |
deleteProgram(String name)
Remove the program with the given name.
|
String |
getName()
Return the name of the provider.
|
Program |
getProgram(String name)
Return the program with the given name.
|
boolean |
isEnabled()
Return true if this sail provider is enabled in the configuration.
|
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 |
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.
|
public static final String REASONING_ENABLED
public String getName()
getName
in interface org.apache.marmotta.platform.core.api.triplestore.SailProvider
public TransactionalSailWrapper createSail(TransactionalSail parent)
createSail
in interface org.apache.marmotta.platform.core.api.triplestore.TransactionalSailProvider
parent
- the parent sail to wrap by the providerpublic boolean isEnabled()
isEnabled
in interface org.apache.marmotta.platform.core.api.triplestore.SailProvider
public void configurationChanged(@Observes org.apache.marmotta.platform.core.events.ConfigurationChangedEvent e)
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 deleteProgram(String name) throws org.openrdf.sail.SailException
name
- the unique name of the program to removeorg.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 info.aduna.iteration.CloseableIteration<Program,org.openrdf.sail.SailException> listPrograms() throws org.openrdf.sail.SailException
org.openrdf.sail.SailException
public void reRunPrograms()
public 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<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.