public class CustomGraphQueryInferencer extends NotifyingSailWrapper
Constructor and Description |
---|
CustomGraphQueryInferencer() |
CustomGraphQueryInferencer(NotifyingSail baseSail,
QueryLanguage language,
String queryText,
String matcherText)
Create a new custom inferencer.
|
CustomGraphQueryInferencer(QueryLanguage language,
String queryText,
String matcherText)
Create a new custom inferencer.
|
Modifier and Type | Method and Description |
---|---|
InferencerConnection |
getConnection()
Opens a connection on the Sail which can be used to query and update data.
|
Collection<Value> |
getWatchObjects()
Exposed for test purposes.
|
Collection<Value> |
getWatchPredicates()
Exposed for test purposes.
|
Collection<Value> |
getWatchSubjects()
Exposed for test purposes.
|
void |
initialize()
Initializes the Sail.
|
void |
setFields(QueryLanguage language,
String queryText,
String matcherText)
Called in order to set all the fields needed for the inferencer to function.
|
addSailChangedListener, getBaseSail, removeSailChangedListener, setBaseSail
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, isWritable, setDataDir, setFederatedServiceResolver, shutDown, verifyBaseSailSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, isWritable, setDataDir, shutDown
public CustomGraphQueryInferencer()
public CustomGraphQueryInferencer(QueryLanguage language, String queryText, String matcherText) throws MalformedQueryException, UnsupportedQueryLanguageException, SailException
language
- language that queryText and matcherText are expressed inqueryText
- a query that returns an RDF graph of inferred statements to be added to the underlying SailmatcherText
- a query that returns an RDF graph of existing inferred statements already added previouslyMalformedQueryException
- if there is a problem parsing either of the given queriesUnsupportedQueryLanguageException
- if an unsupported query language is specifiedSailException
- if a problem occurs interpreting the rule patternpublic CustomGraphQueryInferencer(NotifyingSail baseSail, QueryLanguage language, String queryText, String matcherText) throws MalformedQueryException, UnsupportedQueryLanguageException, SailException
baseSail
- an underlying Sail, such as another inferencer or a SailRepositorylanguage
- language that queryText and matcherText are expressed inqueryText
- a query that returns an RDF graph of inferred statements to be added to the underlying SailmatcherText
- a query that returns an RDF graph of existing inferred statements already added previouslyMalformedQueryException
- if there is a problem parsing either of the given queriesUnsupportedQueryLanguageException
SailException
- if a problem occurs interpreting the rule patternpublic final void setFields(QueryLanguage language, String queryText, String matcherText) throws MalformedQueryException, SailException
language
- language that queryText and matcherText are expressed inqueryText
- a query that returns an RDF graph of inferred statements to be added to the underlying SailmatcherText
- a query that returns an RDF graph of existing inferred statements already added previouslyMalformedQueryException
- if there is a problem parsing either of the given queriesSailException
- if a problem occurs interpreting the rule patternpublic InferencerConnection getConnection() throws SailException
Sail
getConnection
in interface NotifyingSail
getConnection
in interface Sail
getConnection
in class NotifyingSailWrapper
SailException
- If no transaction could be started, for example because the Sail is not writable.public void initialize() throws SailException
Sail
initialize
in interface Sail
initialize
in class SailWrapper
SailException
- If the Sail could not be initialized.public Collection<Value> getWatchSubjects()
public Collection<Value> getWatchPredicates()
public Collection<Value> getWatchObjects()
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.