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 QueryLanguagelanguageprivate java.lang.StringmatcherQueryprivate java.lang.StringruleQuerystatic java.util.regex.PatternSPARQL_PATTERNprivate static booleanUSE_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 voidaddQueryNode(Model m, Resource implNode, IRI predicate, java.lang.String queryText)static java.lang.StringbuildMatcherQueryFromRuleQuery(QueryLanguage language, java.lang.String ruleQuery)Resourceexport(Model m)java.lang.StringgetMatcherQuery()QueryLanguagegetQueryLanguage()java.lang.StringgetRuleQuery()voidparse(Model m, Resource implNode)voidsetMatcherQuery(java.lang.String matcherQuery)Set the optional matcher query.voidsetQueryLanguage(QueryLanguage language)voidsetRuleQuery(java.lang.String ruleQuery)voidvalidate()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:
parsein interfaceSailImplConfig- Overrides:
parsein classAbstractDelegatingSailImplConfig- Throws:
SailConfigException
-
validate
public void validate() throws SailConfigExceptionDescription copied from interface:SailImplConfigValidates this configuration. ASailConfigExceptionis thrown when the configuration is invalid. The exception should contain an error message that indicates why the configuration is invalid.- Specified by:
validatein interfaceSailImplConfig- Overrides:
validatein classAbstractDelegatingSailImplConfig- Throws:
SailConfigException- If the configuration is invalid.
-
export
public Resource export(Model m)
- Specified by:
exportin interfaceSailImplConfig- Overrides:
exportin classAbstractDelegatingSailImplConfig
-
buildMatcherQueryFromRuleQuery
public static java.lang.String buildMatcherQueryFromRuleQuery(QueryLanguage language, java.lang.String ruleQuery) throws MalformedQueryException
- Throws:
MalformedQueryException
-
-