Package org.aksw.deer.enrichments
Class DereferencingEnrichmentOperator
java.lang.Object
org.aksw.faraday_cage.engine.AbstractExecutionNode<T>
org.aksw.faraday_cage.engine.AbstractParameterizedExecutionNode<Model>
org.aksw.deer.enrichments.AbstractParameterizedEnrichmentOperator
org.aksw.deer.enrichments.DereferencingEnrichmentOperator
- All Implemented Interfaces:
DeerExecutionNode,EnrichmentOperator,ParameterizedEnrichmentOperator,Learnable,ReverseLearnable,SelfConfigurable,ParameterizedDeerExecutionNode,ExecutionNode<Model>,Parameterized,Plugin,org.pf4j.ExtensionPoint
@Extension
public class DereferencingEnrichmentOperator
extends AbstractParameterizedEnrichmentOperator
implements ReverseLearnable, SelfConfigurable
An EnrichmentOperator for dereferencing.
Each operation corresponds to one dereferencing operation, allowing multiple
dereferencing operations being carried out by a single
Dereferencing is a method of expanding knowledge of resources that belong to an external knowledge base. We define a dereferencing operation as the following sequence of operations:
- Query the local model for starting resources
?xthat belong to an external knowledge base - Query the external knowledge base for triples
(?x, d, ?y), where d is a defined property path in the external knowledge base. - Add all results to the local model in the form of
(?x, i, ?y), where i is the property name under which they should be imported.
Configuration
:operations
Each operation corresponds to one dereferencing operation, allowing multiple
dereferencing operations being carried out by a single DereferencingEnrichmentOperator.
Each entry may contain the following properties:
:lookUpPropertyrange: resource
Determines the starting resources?xas all objects of triples having the value of:lookUpPropertyas predicate.
:lookUpPrefix[required] range: string
Determines the starting resources?xas all objects of triples having the value of:lookUpPropertyas predicate.
:dereferencingProperty[required] range: resource
Look up the values to be imported to the local model in the external knowledge base using the property defined by the value of:dereferencingProperty.
:importProperty[required] range: resource
Add looked up values to starting resources using the value of :importProperty.
Example
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aksw.faraday_cage.engine.ExecutionNode
ExecutionNode.DegreeBounds -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an uninitializedParameterMapto be filled by theExecutionGraphGenerator.voidlearnParameterMap(List<Model> inputs, Model target, ValidatableParameterMap prototype)doublepredictApplicability(List<Model> inputs, Model target)reverseApply(List<Model> inputs, Model target)Methods inherited from class org.aksw.deer.enrichments.AbstractParameterizedEnrichmentOperator
deepCopy, getDegreeBounds, getTypeMethods inherited from class org.aksw.faraday_cage.engine.AbstractParameterizedExecutionNode
getParameterMap, getValidationModelFor, initParameters, isInitializedMethods inherited from class org.aksw.faraday_cage.engine.AbstractExecutionNode
apply, getId, getInDegree, getOutDegree, initDegrees, initPluginIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.faraday_cage.engine.ExecutionNode
apply, getInDegree, getOutDegree, initDegreesMethods inherited from interface org.aksw.faraday_cage.engine.Parameterized
getParameterMap, initParameters, isInitializedMethods inherited from interface org.aksw.faraday_cage.engine.Plugin
getId, initPluginId, isInitialized
-
Field Details
-
LOOKUP_PROPERTY
-
LOOKUP_PREFIX
-
DEREFERENCING_PROPERTY
-
IMPORT_PROPERTY
-
OPERATION
-
USE_SPARQL_ENDPOINT
-
-
Constructor Details
-
DereferencingEnrichmentOperator
public DereferencingEnrichmentOperator()
-
-
Method Details
-
createParameterMap
Description copied from interface:ParameterizedCreate an uninitializedParameterMapto be filled by theExecutionGraphGenerator.- Specified by:
createParameterMapin interfaceParameterized- Returns:
- uninitialized
ParameterMapcontaining all allowedParameter
-
initializeOperations
public void initializeOperations() -
safeApply
- Specified by:
safeApplyin classAbstractExecutionNode<Model>
-
predictApplicability
- Specified by:
predictApplicabilityin interfaceReverseLearnable
-
reverseApply
- Specified by:
reverseApplyin interfaceReverseLearnable
-
learnParameterMap
public ValidatableParameterMap learnParameterMap(List<Model> inputs, Model target, ValidatableParameterMap prototype)- Specified by:
learnParameterMapin interfaceSelfConfigurable
-
getLearnableDegreeBounds
- Specified by:
getLearnableDegreeBoundsin interfaceLearnable
-