Class VocabularyMappingWrappingImpl

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

public class VocabularyMappingWrappingImpl extends Object implements VocabularyMapping
Temporary class. Will be removed once the rest of the internal API has been changed to use SchemaMapping and EntityMapping.
  • Field Details

  • Constructor Details

    • VocabularyMappingWrappingImpl

      public VocabularyMappingWrappingImpl(EntityMapping em, SchemaMapping sm)
    • VocabularyMappingWrappingImpl

      public VocabularyMappingWrappingImpl(String rdfFile)
    • VocabularyMappingWrappingImpl

      public VocabularyMappingWrappingImpl(Set<org.apache.jena.graph.Triple> triples)
    • VocabularyMappingWrappingImpl

      public VocabularyMappingWrappingImpl(org.apache.jena.graph.Graph descriptionOfVM)
  • Method Details

    • translateTriplePattern

      public SPARQLGraphPattern translateTriplePattern(TriplePattern tp)
      Description copied from interface: VocabularyMapping
      Applies this vocabulary mapping to the given triple pattern and returns the resulting combination of triple patterns, which may be a union of triple patterns (captured as a SPARQLUnionPattern) or just a single triple pattern (captured as a TriplePattern). If this mapping is not relevant for the given triple pattern (i.e., applying the mapping to the given triple pattern does not have any effect), then the result of this function is simply the given triple pattern itself.
      Specified by:
      translateTriplePattern in interface VocabularyMapping
    • translateSolutionMapping

      public Set<SolutionMapping> translateSolutionMapping(SolutionMapping solmap)
      Description copied from interface: VocabularyMapping
      Applies this vocabulary mapping to the given solution mapping expressed in the local vocabulary and returns a resulting set of solution mappings expressed in the global vocabulary. If this mapping is not relevant for the given solution mapping (i.e., applying the mapping to the given solution mapping does not have any effect), then the result of this function is a set containing only the given solution mapping.
      Specified by:
      translateSolutionMapping in interface VocabularyMapping
    • translateSolutionMappingFromGlobal

      public Set<SolutionMapping> translateSolutionMappingFromGlobal(SolutionMapping solmap)
      Description copied from interface: VocabularyMapping
      Applies this vocabulary mapping to the given solution mapping expressed in the global vocabulary and returns a resulting set of solution mappings expressed in the local vocabulary. If this mapping is not relevant for the given solution mapping (i.e., applying the mapping to the given solution mapping does not have any effect), then the result of this function is a set containing only the given solution mapping.
      Specified by:
      translateSolutionMappingFromGlobal in interface VocabularyMapping
    • translateExpressionFromLocal

      public org.apache.jena.sparql.expr.Expr translateExpressionFromLocal(org.apache.jena.sparql.expr.Expr e)
      Description copied from interface: VocabularyMapping
      Applies this vocabulary mapping to the given filter expression, which is assumed to use the local vocabulary, and returns the translated expression. If this mapping is not relevant for the given expression (i.e., applying the mapping does not change the expression), then the result of this function is simply the given expression itself.

      It may not be possible to translate every expression; if the given expression cannot be translated, then this method throws an UnsupportedOperationException.

      Specified by:
      translateExpressionFromLocal in interface VocabularyMapping
    • translateExpressionFromGlobal

      public org.apache.jena.sparql.expr.Expr translateExpressionFromGlobal(org.apache.jena.sparql.expr.Expr e)
      Description copied from interface: VocabularyMapping
      Applies this vocabulary mapping to the given filter expression, which is assumed to use the global vocabulary, and returns the translated expression. If this mapping is not relevant for the given expression (i.e., applying the mapping does not change the expression), then the result of this function is simply the given expression itself.

      It may not be possible to translate every expression; if the given expression cannot be translated, then this method throws an UnsupportedOperationException.

      Specified by:
      translateExpressionFromGlobal in interface VocabularyMapping
    • isEquivalenceOnly

      public boolean isEquivalenceOnly()
      Description copied from interface: VocabularyMapping
      Checks whether the vocabulary mapping only contains equivalence rules, e.g., owl:equivalentClass, owl:equivalentProperty, owl:sameAs Return true if the vocabulary mapping consists solely of equivalence rules, false otherwise.
      Specified by:
      isEquivalenceOnly in interface VocabularyMapping