Examples of QueryBuildException


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

{
    @Override
    public void checkBuild(String uri, ExprList args)
    {
        if ( args.size() != 0 )
            throw new QueryBuildException("Function '"+Utils.className(this)+"' takes no arguments") ;
    }
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 ( argObject.isList() && argObject.getArgList().size() != 0 )
            throw new QueryBuildException("List arguments (object) 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 checkBuild(String uri, ExprList args)
    {
        if ( args.size() != 2 && args.size() != 3 )
            throw new QueryBuildException("Function '"+Utils.className(this)+"' takes two or three arguments") ;
    }
View Full Code Here

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

    @Override
    public void checkBuild(String uri, ExprList args)
    {
        if ( args.size() != 2 && args.size() != 3 )
            throw new QueryBuildException("Function '"+Utils.className(this)+"' takes two or three arguments") ;
    }
View Full Code Here

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

{
    @Override
    public void build(String uri, ExprList args)
    {
        if ( args.size() != 1 )
            throw new QueryBuildException("'eval' takes one argument") ;
    }
View Full Code Here

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

    @Override
    public void checkBuild(String uri, ExprList args)
    {
        if ( args.size() < 1 )
            throw new QueryBuildException("Function '"+Utils.className(this)+"' requires at least one arguments") ;
    }
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

    }

    @Override
    public void checkBuild(String uri, ExprList args) {
        if ( args.size() != 1 )
            throw new QueryBuildException("Function '"+com.hp.hpl.jena.sparql.util.Utils.className(this)+"' takes one argument") ;
    }
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
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.