Examples of QueryBuildException


Examples of com.hp.hpl.jena.query.QueryBuildException

        DatasetGraph dsg = execCxt.getDataset() ;
        server = chooseTextIndex(dsg) ;

        if (!argSubject.isNode())
            throw new QueryBuildException("Subject is not a single node: " + argSubject) ;

        if (argObject.isList()) {
            List<Node> list = argObject.getArgList() ;
            if (list.size() == 0)
                throw new QueryBuildException("Zero-length argument list") ;

            if (list.size() > 4)
                throw new QueryBuildException("Too many arguments in list : " + list) ;
        }
    }
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryBuildException

{
    @Override
    public void build(PropFuncArg argSubject, Node predicate, PropFuncArg argObject, ExecutionContext execCxt)
    {
        if ( argSubject.isList() || argObject.isList() )
            throw new QueryBuildException("List arguments to "+predicate.getURI()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryBuildException

    public void build(PropFuncArg argSubject, Node predicate, PropFuncArg argObject, ExecutionContext execCxt)
    {
        // Do some checking.
        // These checks are assumed to be passed in .exec()
        if ( argSubject.isList() )
            throw new QueryBuildException(Utils.className(this)+ "Subject must be a single node or variable, not a list") ;
        if ( ! argObject.isList() )
            throw new QueryBuildException(Utils.className(this)+ "Object must be a list of two elements") ;
        if ( argObject.getArgList().size() != 2 )
            throw new QueryBuildException(Utils.className(this)+ "Object is a list but it has "+argObject.getArgList().size()+" elements - should be 2") ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryBuildException

    @Override
    public void build(PropFuncArg argSubject, Node predicate, PropFuncArg argObject, ExecutionContext execCxt)
    {
        super.build(argSubject, predicate, argObject, execCxt) ;
        if ( getIndex(execCxt) == null )
            throw new QueryBuildException("Index not found") ;

        if ( argSubject.isList() && argSubject.getArgListSize() != 2 )
                throw new QueryBuildException("Subject has "+argSubject.getArgList().size()+" elements, not 2: "+argSubject) ;
       
        if ( argObject.isList() && (argObject.getArgListSize() != 2 && argObject.getArgListSize() != 3) )
                throw new QueryBuildException("Object has "+argObject.getArgList().size()+" elements, not 2 or 3: "+argObject) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryBuildException

  public void build(PropFuncArg argSubject, Node predicate,
      PropFuncArg argObject, ExecutionContext execCxt) {
    super.build(argSubject, predicate, argObject, execCxt);

    if (!argSubject.isNode())
      throw new QueryBuildException("Subject is not a single node: "
          + argSubject);

    if (argObject.isList()) {
      List<Node> list = argObject.getArgList();
      if (list.size() < 3)
        throw new QueryBuildException("Not enough arguments in list");

      if (list.size() > 5)
        throw new QueryBuildException("Too many arguments in list : "
            + list);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.