Exemplo n.º 1
0
 private Set<Variable> getProjectedVariables() {
   Set<Variable> ret = HashSetFactory.make();
   for (ProjectedVariable pv : gatherRealProjectedVariables()) {
     ret.add(pv.getVariable());
   }
   return ret;
 }
Exemplo n.º 2
0
 public void renamePrefixes(
     String base, Map<String, String> declared, Map<String, String> internal) {
   for (ProjectedVariable pv : projectedVariables) {
     if (pv.getExpression() != null) {
       pv.getExpression().renamePrefixes(base, declared, internal);
     }
   }
 }
Exemplo n.º 3
0
 public Set<Variable> gatherIRIBoundProjectedVariables() {
   Set<Variable> allVars = new LinkedHashSet<Variable>();
   Set<Variable> IRIBoundVars = this.gatherIRIBoundVariables();
   List<ProjectedVariable> pvList = selectClause.getProjectedVariables();
   if (pvList != null && pvList.size() > 0) {
     for (ProjectedVariable pv : pvList) {
       if (pv.getExpression() == null && IRIBoundVars.contains(pv.getVariable()))
         allVars.add(pv.getVariable());
     }
     return allVars;
   } else {
     return graphPattern.gatherIRIBoundVariables();
   }
 }
Exemplo n.º 4
0
 public Set<Variable> getVariables() {
   List<ProjectedVariable> pvList = gatherRealProjectedVariables();
   if (pvList != null && pvList.size() > 0) {
     Set<Variable> allVars = new LinkedHashSet<Variable>();
     for (ProjectedVariable pv : pvList) {
       allVars.add(pv.getVariable());
       if (pv.getExpression() != null) {
         allVars.addAll(pv.getExpression().gatherVariables());
       }
     }
     return allVars;
   } else {
     return Collections.emptySet();
   }
 }
Exemplo n.º 5
0
 public Set<Variable> gatherProjectedVariables() {
   Set<Variable> allVars = new LinkedHashSet<Variable>();
   List<ProjectedVariable> pvList = selectClause.getProjectedVariables();
   if (pvList != null && pvList.size() > 0) {
     for (ProjectedVariable pv : pvList) {
       allVars.add(pv.getVariable());
     }
     return allVars;
   } else {
     allVars.addAll(Planner.gatherInScopeVariables(graphPattern));
     if (graphPattern.getOptionalPatterns() != null) {
       for (Pattern op : graphPattern.getOptionalPatterns()) {
         allVars.addAll(Planner.gatherInScopeVariables(op));
       }
     }
     return allVars;
   }
 }