Class DereferencingEnrichmentOperator

  • All Implemented Interfaces:
    DeerExecutionNode, EnrichmentOperator, ParameterizedEnrichmentOperator, Learnable, ReverseLearnable, SelfConfigurable, ParameterizedDeerExecutionNode, org.aksw.faraday_cage.engine.ExecutionNode<Model>, org.aksw.faraday_cage.engine.Parameterized, org.aksw.faraday_cage.engine.Plugin, org.pf4j.ExtensionPoint

    @Extension
    public class DereferencingEnrichmentOperator
    extends AbstractParameterizedEnrichmentOperator
    implements ReverseLearnable, SelfConfigurable
    An EnrichmentOperator for dereferencing.

    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:

    1. Query the local model for starting resources ?x that belong to an external knowledge base
    2. Query the external knowledge base for triples (?x, d, ?y), where d is a defined property path in the external knowledge base.
    3. 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:
    :lookUpProperty range: resource
    Determines the starting resources ?x as all objects of triples having the value of :lookUpProperty as predicate.
    :lookUpPrefix [required] range: string
    Determines the starting resources ?x as all objects of triples having the value of :lookUpProperty as 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

        org.aksw.faraday_cage.engine.ExecutionNode.DegreeBounds
    • Method Summary

      Modifier and Type Method Description
      org.aksw.faraday_cage.engine.ValidatableParameterMap createParameterMap()  
      org.aksw.faraday_cage.engine.ExecutionNode.DegreeBounds getLearnableDegreeBounds()  
      void initializeOperations()  
      org.aksw.faraday_cage.engine.ValidatableParameterMap learnParameterMap​(java.util.List<Model> inputs, Model target, org.aksw.faraday_cage.engine.ValidatableParameterMap prototype)  
      double predictApplicability​(java.util.List<Model> inputs, Model target)  
      java.util.List<Model> reverseApply​(java.util.List<Model> inputs, Model target)  
      protected java.util.List<Model> safeApply​(java.util.List<Model> models)  
      • Methods inherited from class org.aksw.faraday_cage.engine.AbstractParameterizedExecutionNode

        getParameterMap, getValidationModelFor, initParameters, isInitialized
      • Methods inherited from class org.aksw.faraday_cage.engine.AbstractExecutionNode

        apply, getId, getInDegree, getOutDegree, initDegrees, initPluginId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.aksw.faraday_cage.engine.ExecutionNode

        apply, getInDegree, getOutDegree, initDegrees
      • Methods inherited from interface org.aksw.faraday_cage.engine.Parameterized

        getParameterMap, initParameters, isInitialized
      • Methods inherited from interface org.aksw.faraday_cage.engine.Plugin

        getId, initPluginId, isInitialized
    • Field Detail

      • LOOKUP_PROPERTY

        public static final Property LOOKUP_PROPERTY
      • LOOKUP_PREFIX

        public static final Property LOOKUP_PREFIX
      • DEREFERENCING_PROPERTY

        public static final Property DEREFERENCING_PROPERTY
      • IMPORT_PROPERTY

        public static final Property IMPORT_PROPERTY
      • OPERATION

        public static final Property OPERATION
    • Constructor Detail

      • DereferencingEnrichmentOperator

        public DereferencingEnrichmentOperator()
    • Method Detail

      • createParameterMap

        public org.aksw.faraday_cage.engine.ValidatableParameterMap createParameterMap()
        Specified by:
        createParameterMap in interface org.aksw.faraday_cage.engine.Parameterized
      • initializeOperations

        public void initializeOperations()
      • safeApply

        protected java.util.List<Model> safeApply​(java.util.List<Model> models)
        Specified by:
        safeApply in class org.aksw.faraday_cage.engine.AbstractExecutionNode<Model>
      • learnParameterMap

        public org.aksw.faraday_cage.engine.ValidatableParameterMap learnParameterMap​(java.util.List<Model> inputs,
                                                                                      Model target,
                                                                                      org.aksw.faraday_cage.engine.ValidatableParameterMap prototype)
        Specified by:
        learnParameterMap in interface SelfConfigurable
      • getLearnableDegreeBounds

        public org.aksw.faraday_cage.engine.ExecutionNode.DegreeBounds getLearnableDegreeBounds()
        Specified by:
        getLearnableDegreeBounds in interface Learnable