Class VarDefinition

java.lang.Object
org.aksw.jena_sparql_api.views.VarDefinition

public class VarDefinition extends Object
A variable definition binds a set of SPARQL variables to a set of corresponding defining expressions A variable definition consists of a - a restricted expression that defines the variable - an optional set of restriction expressions that restricts the variables set of values //apply to the variable under this definition The expression can either be: - a constant NodeValue that directly associates the variable with a constant - an expression of type E_RdfTermCtor, - other expression types probably do not make sense here - at least I don't see use cases for them (yet).
Author:
Claus Stader
  • Constructor Details

    • VarDefinition

      public VarDefinition()
    • VarDefinition

      public VarDefinition(com.google.common.collect.Multimap<org.apache.jena.sparql.core.Var,RestrictedExpr> varToExprs)
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getMap

      public com.google.common.collect.Multimap<org.apache.jena.sparql.core.Var,RestrictedExpr> getMap()
    • getDefinitions

      public Collection<RestrictedExpr> getDefinitions(org.apache.jena.sparql.core.Var viewVar)
    • applyExprTransform

      public void applyExprTransform(com.google.common.base.Function<org.apache.jena.sparql.expr.Expr,org.apache.jena.sparql.expr.Expr> transform)
      In place expression transformation
      Parameters:
      transform -
    • copyProject

      public VarDefinition copyProject(Collection<org.apache.jena.sparql.core.Var> viewVars)
    • copyExpandConstants

      public VarDefinition copyExpandConstants()
    • copyRenameVars

      public VarDefinition copyRenameVars(Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.core.Var> oldToNew)
    • copyRename

      public static VarDefinition copyRename(VarDefinition varDef, Map<String,String> oldToNew)
    • copySubstitute

      public VarDefinition copySubstitute(Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> map)
    • copySubstitute

      public static VarDefinition copySubstitute(VarDefinition varDef, Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> map)
    • extend

      public VarDefinition extend(VarDefinition that)
    • toPrettyString

      public String toPrettyString()
    • toIndentedString

      public static String toIndentedString(VarDefinition varDef)
    • getReferencedNames

      public List<String> getReferencedNames()
    • copyVarNames

      public static <T extends Collection<String>> T copyVarNames(T target, Collection<org.apache.jena.sparql.core.Var> vars)
    • getReferencedVars

      public Set<org.apache.jena.sparql.core.Var> getReferencedVars()
    • withoutRestrictions

      public com.google.common.collect.Multimap<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> withoutRestrictions()
    • getReferencedVars

      public Set<org.apache.jena.sparql.core.Var> getReferencedVars(Collection<org.apache.jena.sparql.core.Var> vars)
      Return only the referenced vars for the given vars
      Parameters:
      vars -
      Returns:
    • getReferencedVarNames

      public Set<String> getReferencedVarNames(Collection<org.apache.jena.sparql.core.Var> vars)
    • getReferencedVarNames

      public <T extends Collection<String>> T getReferencedVarNames(T target, Collection<org.apache.jena.sparql.core.Var> vars)
    • toIndentedString

      public static String toIndentedString(com.google.common.collect.Multimap<org.apache.jena.sparql.core.Var,RestrictedExpr> varToExprs)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • create

      public static VarDefinition create(org.apache.jena.sparql.core.VarExprList varExprs)