/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(String fileName, String baseURI, Syntax syntax) { return read(null, fileName, baseURI, syntax); }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param usingList The list of externally defined USING statements * @param input The source of the update request (must be UTF-8). */ public static UpdateRequest read(UsingList usingList, InputStream input) { return read(usingList, input, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(String fileName, Syntax syntax) { return read(fileName, fileName, syntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param input The source of the update request (must be UTF-8). */ public static UpdateRequest read(InputStream input) { return read(input, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(UsingList usingList, String fileName) { return read(usingList, fileName, null, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(String fileName) { return read(fileName, fileName, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param usingList The list of externally defined USING statements * @param input The source of the update request (must be UTF-8). * @param baseURI The base URI for resolving relative URIs. */ public static UpdateRequest read(UsingList usingList, InputStream input, String baseURI) { return read(usingList, input, baseURI, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(UsingList usingList, String fileName, Syntax syntax) { return read(usingList, fileName, fileName, syntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param input The source of the update request (must be UTF-8). * @param syntax The update language syntax */ public static UpdateRequest read(InputStream input, Syntax syntax) { return read(input, null, syntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param usingList The list of externally defined USING statements * @param input The source of the update request (must be UTF-8). * @param syntax The update language syntax */ public static UpdateRequest read(UsingList usingList, InputStream input, Syntax syntax) { return read(usingList, input, null, syntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param input The source of the update request (must be UTF-8). * @param baseURI The base URI for resolving relative URIs. */ public static UpdateRequest read(InputStream input, String baseURI) { return read(input, baseURI, defaultUpdateSyntax) ; }
/** Create an UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param input The source of the update request (must be UTF-8). * @param baseURI The base URI for resolving relative URIs. * @param syntax The update language syntax */ public static UpdateRequest read(InputStream input, String baseURI, Syntax syntax) { return read(null, input, baseURI, syntax); }
@Override public UpdateRequest readFrom(Class<UpdateRequest> type, Type type1, Annotation[] antns, javax.ws.rs.core.MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream in) throws IOException, WebApplicationException { if (log.isTraceEnabled()) log.trace("Reading UpdateRequest with HTTP headers: {} MediaType: {}", httpHeaders, mediaType); return UpdateFactory.read(in); }
/** Read a file containing SPARQL Update operations, and execute the operations. * @param filename * @param dataset * @param inputBinding */ public static void readExecute(String filename, Dataset dataset, QuerySolution inputBinding) { UpdateRequest req = UpdateFactory.read(filename) ; execute(req, dataset, inputBinding) ; }
/** Read a file containing SPARQL Update operations, and execute the operations. * @param filename * @param datasetGraph * @param inputBinding */ public static void readExecute(String filename, DatasetGraph datasetGraph, Binding inputBinding) { UpdateRequest req = UpdateFactory.read(filename) ; execute$(req, datasetGraph, inputBinding) ; }
protected void execOneFile(String filename, DatasetGraph store) { UpdateRequest req = UpdateFactory.read(filename, updateSyntax); UpdateExecutionFactory.create(req, store).execute(); }
private void execOneFile(String filename, Dataset store) { UpdateRequest req = UpdateFactory.read(filename, Syntax.syntaxARQ) ; UpdateExecutionFactory.create(req, store).execute() ; }
protected void execOneFile(String filename, DatasetGraph store) { UpdateRequest req = UpdateFactory.read(filename, updateSyntax); UpdateExecutionFactory.create(req, store).execute(); }
/** Create an UpdateRequest by reading it from a file */ public static UpdateRequest read(UsingList usingList, String fileName, String baseURI, Syntax syntax) { InputStream in = null ; try { if ( fileName.equals("-") ) in = System.in ; else { in = IO.openFile(fileName) ; if ( in == null ) throw new UpdateException("File could not be opened: "+fileName) ; } return read(usingList, in, baseURI, syntax) ; } finally { if ( in != null && ! fileName.equals("-") ) IO.close(in) ; } }
protected UpdateRequest updateFromTestItem(TestItem testItem) { if ( testItem.getQueryFile() == null ) { fail("Query test file is null") ; return null ; } UpdateRequest request = UpdateFactory.read(testItem.getQueryFile(), Syntax.syntaxSPARQL_11) ; return request ; }