Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.Var$NotAVariableException


    {
        List<Var> varList2 = new ArrayList<Var>(varList.size()) ;
        boolean changed = false ;
        for ( Var v : varList )
        {
            Var v2 = (Var)nodeTransform.convert(v) ;
            varList2.add(v2) ;
            if ( !equal(v, v2) )
                changed = true ;
        }
        if ( ! changed )
View Full Code Here


    SolutionModifier();
    ValuesClause();
  }

  final public void SelectClause() throws ParseException {
                        Var v ; Expr expr ; Node n ;
    jj_consume_token(SELECT);
      getQuery().setQuerySelectType() ;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case DISTINCT:
    case REDUCED:
View Full Code Here

      }
    }
  }

  final public void GroupCondition() throws ParseException {
                          Var v = null ; Expr expr = null ;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case EXISTS:
    case NOT:
    case COUNT:
    case MIN:
View Full Code Here

      {if (true) return new ElementService(n, el, silent) ;}
    throw new Error("Missing return statement in function");
  }

  final public Element Bind() throws ParseException {
                   Var v ; Expr expr ;
    jj_consume_token(BIND);
    jj_consume_token(LPAREN);
    expr = Expression();
    jj_consume_token(AS);
    v = Var();
View Full Code Here

      throw new ParseException();
    }
  }

  final public void InlineDataOneVar() throws ParseException {
                            Var v ; Node n ; Token t ;
    v = Var();
    emitDataBlockVariable(v) ;
    t = jj_consume_token(LBRACE);
    label_15:
    while (true) {
View Full Code Here

    }
    t = jj_consume_token(RBRACE);
  }

  final public void InlineDataFull() throws ParseException {
                          Var v ; Node n ; Token t ; int beginLine; int beginColumn;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case NIL:
      jj_consume_token(NIL);
      break;
    case LPAREN:
View Full Code Here

public class Rename
{
    /** Given an old name, and some names already in use, pick a fresh, new name*/
    public static Var chooseVarName(Var var, Collection<Var> inUse, String prefix)
    {
        Var var2 = var ;
        do {
            var2 = Var.alloc(prefix+var2.getName()) ;
        } while (inUse.contains(var2)) ;   
        return var2 ;
    }
View Full Code Here

        public final Node convert(Node node)
        {
            if ( ! Var.isVar(node) ) return node ;
            if ( constants.contains(node) ) return node ;

            Var var = (Var)node ;
            Var var2 = aliases.get(var) ;
            if ( var2 != null )
                return var2 ;
            // The new name is the old name with a "/" - clashes?
            // Provided the old name isn't a constant as well, this is safe
            // if renaming is bottom up and done once.
View Full Code Here

        @Override
        public Node convert(Node node)
        {
            if ( ! Var.isVar(node) )
                return node ;
            Var var = (Var)node ;
            String varName = var.getName() ;
           
            if ( repeatedly )
            {
                while ( varName.startsWith(varPrefix) )
                    varName = varName.substring(varPrefix.length()) ;
            }
            else
            {
                if ( varName.startsWith(varPrefix) )
                    varName = varName.substring(varPrefix.length()) ;
            }
               
            if ( varName == var.getName() )
                return node ;
            return Var.alloc(varName) ;
        }
View Full Code Here

        ExprFunction2 eq = (ExprFunction2) e;
        Expr left = eq.getArg1();
        Expr right = eq.getArg2();

        Var var = null;
        NodeValue constant = null;

        if (left.isVariable() && right.isConstant()) {
            var = left.asVar();
            constant = right.getConstant();
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.Var$NotAVariableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.