Examples of endRDF()


Examples of org.openrdf.rio.RDFWriter.endRDF()

        final RDFWriter jsonldWriter = new SesameJSONLDWriter(writer);
        jsonldWriter.startRDF();
        for (final Statement nextStatement : statements) {
            jsonldWriter.handleStatement(nextStatement);
        }
        jsonldWriter.endRDF();

        // System.out.println(writer.toString());

        return new ByteArrayInputStream(writer.toString().getBytes(Charset.forName("UTF-8")));
    }
View Full Code Here

Examples of org.openrdf.rio.RDFWriter.endRDF()

        rdfWriter.handleStatement(st2);
        rdfWriter.handleStatement(st3);
        rdfWriter.handleStatement(st4);
        rdfWriter.handleStatement(st5);
        rdfWriter.handleStatement(st6);
        rdfWriter.endRDF();

        final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        final RDFParser rdfParser = rdfParserFactory.getParser();
        final ParserConfig config = new ParserConfig();
        config.set(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES, true);
View Full Code Here

Examples of org.openrdf.rio.helpers.BufferedGroupingRDFHandler.endRDF()

    writer.handleNamespace("primal", PRIMAL.NAMESPACE);

    for (final Statement st : model) {
      writer.handleStatement(st);
    }
    writer.endRDF();
  }

  private static PrimalAccount getPrimalAccount() throws Exception {
    // Read properties file.
    final Properties properties = new Properties();
View Full Code Here

Examples of org.openrdf.rio.ntriples.NTriplesWriter.endRDF()

    while (iter.hasNext()) {
        Statement _stmt = iter.next();
        ntw.handleStatement(_stmt);
        _stmtcnt++;
    }
    ntw.endRDF();
    outStream.close();
      }
      catch (Exception e) {
    e.printStackTrace();
    System.exit (-1);
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.