Class EntityMappingImpl

java.lang.Object
se.liu.ida.hefquin.base.data.mappings.impl.EntityMappingImpl
All Implemented Interfaces:
EntityMapping

public class EntityMappingImpl extends Object implements EntityMapping
  • Field Details

    • g2lMap

      protected final Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> g2lMap
    • l2gMap

      protected final Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> l2gMap
  • Constructor Details

    • EntityMappingImpl

      public EntityMappingImpl(Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> g2l)
  • Method Details

    • createL2G

      protected static Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> createL2G(Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> g2lMap)
    • applyToTriplePattern

      public Set<TriplePattern> applyToTriplePattern(TriplePattern tp)
      Description copied from interface: EntityMapping
      Applies this mapping to the given triple pattern and returns the resulting set of triple patterns that is meant to be used as a union. If this mapping is not relevant for any of the entities mentioned in the given triple pattern (i.e., applying the mapping to the triple pattern does not have any effect), then the result of this function is simply a singleton set that contains the given triple pattern without any changes.
      Specified by:
      applyToTriplePattern in interface EntityMapping
    • applyToSolutionMapping

      public Set<SolutionMapping> applyToSolutionMapping(SolutionMapping sm)
      Description copied from interface: EntityMapping
      Applies this entity mapping to the given solution mapping, which is assumed to use the global representation of the entities that it binds to its query variables. If this entity mapping is not relevant for any of the entities mentioned in the given solution mapping (i.e., applying this entity mapping to the solution mapping does not have any effect), then the result of this function is simply a singleton set that contains the given solution mapping without any changes.
      Specified by:
      applyToSolutionMapping in interface EntityMapping
    • applyInverseToSolutionMapping

      public Set<SolutionMapping> applyInverseToSolutionMapping(SolutionMapping sm)
      Description copied from interface: EntityMapping
      Applies the inverse of this entity mapping to the given solution mapping, which is assumed to use the local representation of the entities that it binds to its query variables. If this entity mapping is not relevant for any of the entities mentioned in the given solution mapping (i.e., applying this entity mapping to the solution mapping does not have any effect), then the result of this function is simply a singleton set that contains the given solution mapping without any changes.
      Specified by:
      applyInverseToSolutionMapping in interface EntityMapping
    • applyMapToSolutionMapping

      public static Set<SolutionMapping> applyMapToSolutionMapping(SolutionMapping solMap, Map<org.apache.jena.graph.Node,Set<org.apache.jena.graph.Node>> x2yMap)