public static ResultSet fromXML(String str, Model model) { return make(str, model).getResultSet() ; }
public static boolean booleanFromXML(String str) { return make(str, null).getBooleanResult() ; }
/** Synonym for isGraph */ public boolean isModel() { return isGraph() ; }
x = XMLInput.make(in, GraphFactory.makeDefaultModel()) ; if ( x.isResultSet() ) ResultSetFormatter.asRDF(model, x.getResultSet() ) ; else ResultSetFormatter.asRDF(model, x.getBooleanResult() ) ;
private void endElementURI(String ns, String localName, String name) { endAccumulate() ; String uri = buff.toString() ; Node n = Node.createURI(uri) ; if ( checkVarName("URI: "+uri) ) addBinding(binding, Var.alloc(varName), n) ; }
public SPARQLResult(Model model) { set(model) ; } public SPARQLResult(ResultSet resultSet) { set(resultSet) ;}
public boolean getBooleanResult() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isBoolean() ) throw new ResultSetException("Not a boolean result") ; return booleanResult.booleanValue() ; }
public ResultSet getResultSet() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isResultSet() ) throw new ResultSetException("Not a ResultSet result") ; return resultSet ; }
public Model getModel() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isModel() ) throw new ResultSetException("Not a graph result") ; return model ; }
else if (format.equals(ResultsFormat.FMT_RS_TSV)) { ResultSet rs = TSVInput.fromTSV(in); return new SPARQLResult(rs); } else if (format.equals(ResultsFormat.FMT_RS_CSV)) { ResultSet rs = CSVInput.fromCSV(in); return new SPARQLResult(rs); } else if (format.equals(ResultsFormat.FMT_RS_BIO)) { ResultSet rs = BIOInput.fromBIO(in); return new SPARQLResult(rs); return new SPARQLResult(model);
x = XMLInput.make(in, GraphFactory.makeDefaultModel()); if (x.isResultSet()) ResultSetFormatter.asRDF(model, x.getResultSet()); else ResultSetFormatter.asRDF(model, x.getBooleanResult());
private void endElementBNode(String ns, String localName, String name) { endAccumulate() ; String bnodeId = buff.toString() ; Node node = bNodes.asNode(bnodeId) ; if ( checkVarName("BNode: "+bnodeId) ) addBinding(binding, Var.alloc(varName), node) ; }
public SPARQLResult(ResultSet resultSet) { set(resultSet) ;} public SPARQLResult(boolean booleanResult) { set(booleanResult) ; }
public boolean getBooleanResult() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isBoolean() ) throw new ResultSetException("Not a boolean result") ; return booleanResult.booleanValue() ; }
public ResultSet getResultSet() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isResultSet() ) throw new ResultSetException("Not an ResultSet result") ; return resultSet ; }
public Model getModel() { if ( ! hasBeenSet ) throw new ResultSetException("Not set") ; if ( ! isModel() ) throw new ResultSetException("Not a graph result") ; return model ; }
return new SPARQLResult(model) ;
public static ResultSet fromXML(String str, Model model) { return make(str, model).getResultSet() ; }
private void endElementURI(String ns, String localName, String name) { endAccumulate() ; String uri = buff.toString() ; Node n = NodeFactory.createURI(uri) ; if ( checkVarName("URI: " + uri) ) addBinding(binding, Var.alloc(varName), n) ; }
public SPARQLResult(ResultSet resultSet) { set(resultSet) ;} public SPARQLResult(boolean booleanResult) { set(booleanResult) ; }