Interface SchemaMapping
- All Known Implementing Classes:
SchemaMappingImpl
public interface SchemaMapping
Maps from the global schema (considered RDF vocabularies) to
a local schema of some data source(s) / federation member(s).
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.sparql.expr.ExprapplyInverseToExpression(org.apache.jena.sparql.expr.Expr n) Applies this schema mapping to the given filter expression, which is assumed to use the local schema for the vocabulary terms mentioned in it, and returns the translated expression.Applies the inverse of this schema mapping to the given solution mapping, which is assumed to use the local schema for the vocabulary terms that it binds to its query variables.org.apache.jena.sparql.expr.ExprapplyToExpression(org.apache.jena.sparql.expr.Expr n) Applies this schema mapping to the given filter expression, which is assumed to use the global schema for the vocabulary terms mentioned in it, and returns the translated expression.Applies this schema mapping to the given solution mapping, which is assumed to use the global schema for the vocabulary terms that it binds to its query variables.Applies this mapping to the given triple pattern and returns the resulting graph pattern.booleanChecks whether the schema mapping only contains equivalence rules, e.g., owl:equivalentClass, owl:equivalentProperty Return true if the schema mapping consists solely of equivalence rules, false otherwise.
-
Method Details
-
applyToTriplePattern
Applies this mapping to the given triple pattern and returns the resulting graph pattern. If this mapping is not relevant for the 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 the given triple pattern itself. -
applyToExpression
org.apache.jena.sparql.expr.Expr applyToExpression(org.apache.jena.sparql.expr.Expr n) Applies this schema mapping to the given filter expression, which is assumed to use the global schema for the vocabulary terms mentioned in it, and returns the translated expression. If this schema mapping is not relevant for the given expression (i.e., applying this schema 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. -
applyInverseToExpression
org.apache.jena.sparql.expr.Expr applyInverseToExpression(org.apache.jena.sparql.expr.Expr n) Applies this schema mapping to the given filter expression, which is assumed to use the local schema for the vocabulary terms mentioned in it, and returns the translated expression. If this schema mapping is not relevant for the given expression (i.e., applying this schema 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. -
applyToSolutionMapping
Applies this schema mapping to the given solution mapping, which is assumed to use the global schema for the vocabulary terms that it binds to its query variables. If this schema mapping is not relevant for anything mentioned in the given solution mapping (i.e., applying this schema 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. -
applyInverseToSolutionMapping
Applies the inverse of this schema mapping to the given solution mapping, which is assumed to use the local schema for the vocabulary terms that it binds to its query variables. If this schema mapping is not relevant for anything mentioned in the given solution mapping (i.e., applying the inverse of this schema 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. -
isEquivalenceOnly
boolean isEquivalenceOnly()Checks whether the schema mapping only contains equivalence rules, e.g., owl:equivalentClass, owl:equivalentProperty Return true if the schema mapping consists solely of equivalence rules, false otherwise.
-