4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance public static void main (String args[]) throws Exception {
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance System.out.println("<rdf_filename> <query_filename>");
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance InputStream in = new FileInputStream(inputFile);
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance Model model = ModelFactory.createDefaultModel();
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance System.out.println("File" + inputFile + "not found");
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance current = "file://" + new File(inputFile).getAbsolutePath();
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance BufferedReader query_in = new BufferedReader(new FileReader(inputQuery));
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance while ((line = query_in.readLine()) != null)
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance Query query = QueryFactory.create(queryString);
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance //Execute query and obtain results
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance QueryExecution qe = QueryExecutionFactory.create(query, model);
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance // Output query results
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance ResultSetFormatter.out(System.out, results, query);
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance // Important - free up resources used running the query
4b0c94a11262fd5b208008bb4e14cfd06351734fFelix Gabriel Mance //model.write(System.out);