@Override public PropertyFunction create(String uri) { try { return (PropertyFunction)extClass.newInstance(); } catch (Exception e) { throw new QueryBuildException("Can't instantiate PropertyFunction for " + uri, e); } }
@Override public Procedure create(String uri) { try { return (Procedure)extClass.newInstance() ; } catch (Exception e) { throw new QueryBuildException("Can't instantiate procedure for "+uri, e) ; } } }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 3 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes three arguments") ; }
@Override public void checkBuild(String uri, ExprList args) { if (args.size() != 5) { throw new QueryBuildException("Function '" + Lib.className(this) + "' takes five arguments"); } }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 2 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two arguments") ; }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 1 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes one argument") ; }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 0 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes no arguments") ; }
private static void _addVarExpr(VarExprList varExprList, Var v, Expr expr) { if ( varExprList.contains(v) ) // SELECT ?x (?a+?b AS ?x) // SELECT (2*?a AS ?x) (?a+?b AS ?x) throw new QueryBuildException("Duplicate variable in result projection '"+v+"'") ; varExprList.add(v, expr) ; }
@Override public void checkBuild(String uri, ExprList args) { if(args.size() < 2) throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes at least two arguments") ; }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 1 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes one argument") ; }
@Override public void build(PropFuncArg argSubject, Node predicate, PropFuncArg argObject, ExecutionContext execCxt) { super.build(argSubject, predicate, argObject, execCxt); if (argObject.getArgListSize() != 2) throw new QueryBuildException("Object list must contain exactly two arguments, the string to split and a regular expression") ; }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() < 1 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' requires at least one arguments") ; } }
@Override public void checkBuild(String uri, ExprList args) { if (args.size() > 2) throw new QueryBuildException("Function '" + Lib.className(this) + "' takes between 0, 1 or 2 argument(s)"); }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 2 && args.size() != 3 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two or three arguments") ; }
@Override public void checkBuild(String uri, ExprList args) { if (args.size() != 4 && args.size() != 6) throw new QueryBuildException("Function '" + Lib.className(this) + "' takes 4 or 6 argument(s)"); }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 1 && args.size() != 2 ) throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes one or two arguments") ; } @Override
@Override 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()) ; }
@Override public void checkBuild(String uri, ExprList args) { if (args.size() < 1 || args.size() > 2) throw new QueryBuildException("Function '" + Lib.className(this) + "' takes one/two argument(s)"); }
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 1 && args.size() != 2 ) throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes one or two arguments") ; } @Override
@Override public void checkBuild(String uri, ExprList args) { if ( args.size() != 2 && args.size() != 3 ) throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two or three arguments") ; } @Override