Class CustomGraphQueryInferencerConfig
- java.lang.Object
-
- org.eclipse.rdf4j.sail.config.AbstractSailImplConfig
-
- org.eclipse.rdf4j.sail.config.AbstractDelegatingSailImplConfig
-
- org.eclipse.rdf4j.sail.inferencer.fc.config.CustomGraphQueryInferencerConfig
-
- All Implemented Interfaces:
DelegatingSailImplConfig
,SailImplConfig
public final class CustomGraphQueryInferencerConfig extends AbstractDelegatingSailImplConfig
Configuration handling forCustomGraphQueryInferencer
.
-
-
Field Summary
Fields Modifier and Type Field Description private QueryLanguage
language
private java.lang.String
matcherQuery
private java.lang.String
ruleQuery
static java.util.regex.Pattern
SPARQL_PATTERN
private static boolean
USE_CONFIG
-
Constructor Summary
Constructors Constructor Description CustomGraphQueryInferencerConfig()
CustomGraphQueryInferencerConfig(SailImplConfig delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addQueryNode(Model m, Resource implNode, IRI predicate, java.lang.String queryText)
static java.lang.String
buildMatcherQueryFromRuleQuery(QueryLanguage language, java.lang.String ruleQuery)
Resource
export(Model m)
java.lang.String
getMatcherQuery()
QueryLanguage
getQueryLanguage()
java.lang.String
getRuleQuery()
void
parse(Model m, Resource implNode)
void
setMatcherQuery(java.lang.String matcherQuery)
Set the optional matcher query.void
setQueryLanguage(QueryLanguage language)
void
setRuleQuery(java.lang.String ruleQuery)
void
validate()
Validates this configuration.-
Methods inherited from class org.eclipse.rdf4j.sail.config.AbstractDelegatingSailImplConfig
getDelegate, setDelegate
-
Methods inherited from class org.eclipse.rdf4j.sail.config.AbstractSailImplConfig
getConnectionTimeOut, getIterationCacheSyncThreshold, getType, setConnectionTimeOut, setIterationCacheSyncThreshold, setType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.sail.config.SailImplConfig
getIterationCacheSyncThreshold, getType
-
-
-
-
Field Detail
-
USE_CONFIG
private static final boolean USE_CONFIG
-
SPARQL_PATTERN
public static final java.util.regex.Pattern SPARQL_PATTERN
-
language
private QueryLanguage language
-
ruleQuery
private java.lang.String ruleQuery
-
matcherQuery
private java.lang.String matcherQuery
-
-
Constructor Detail
-
CustomGraphQueryInferencerConfig
public CustomGraphQueryInferencerConfig()
-
CustomGraphQueryInferencerConfig
public CustomGraphQueryInferencerConfig(SailImplConfig delegate)
-
-
Method Detail
-
setQueryLanguage
public void setQueryLanguage(QueryLanguage language)
-
getQueryLanguage
public QueryLanguage getQueryLanguage()
-
setRuleQuery
public void setRuleQuery(java.lang.String ruleQuery)
-
getRuleQuery
public java.lang.String getRuleQuery()
-
setMatcherQuery
public void setMatcherQuery(java.lang.String matcherQuery)
Set the optional matcher query.- Parameters:
matcherQuery
- if null, internal value will be set to the empty string
-
getMatcherQuery
public java.lang.String getMatcherQuery()
-
parse
public void parse(Model m, Resource implNode) throws SailConfigException
- Specified by:
parse
in interfaceSailImplConfig
- Overrides:
parse
in classAbstractDelegatingSailImplConfig
- Throws:
SailConfigException
-
validate
public void validate() throws SailConfigException
Description copied from interface:SailImplConfig
Validates this configuration. ASailConfigException
is thrown when the configuration is invalid. The exception should contain an error message that indicates why the configuration is invalid.- Specified by:
validate
in interfaceSailImplConfig
- Overrides:
validate
in classAbstractDelegatingSailImplConfig
- Throws:
SailConfigException
- If the configuration is invalid.
-
export
public Resource export(Model m)
- Specified by:
export
in interfaceSailImplConfig
- Overrides:
export
in classAbstractDelegatingSailImplConfig
-
buildMatcherQueryFromRuleQuery
public static java.lang.String buildMatcherQueryFromRuleQuery(QueryLanguage language, java.lang.String ruleQuery) throws MalformedQueryException
- Throws:
MalformedQueryException
-
-