Package org.openrdf.rio.turtle

Examples of org.openrdf.rio.turtle.TurtleWriter


   *
   * @param out
   *        The OutputStream to write the N3 document to.
   */
  public N3Writer(OutputStream out) {
    ttlWriter = new TurtleWriter(out);
  }
View Full Code Here


   *
   * @param writer
   *        The Writer to write the N3 document to.
   */
  public N3Writer(Writer writer) {
    ttlWriter = new TurtleWriter(writer);
  }
View Full Code Here

     * @throws RepositoryException
     */
    protected String dumpModelToTurtle() throws RepositoryException {
        StringWriter w = new StringWriter();
        try {
            conn.export(new TurtleWriter(w));
            return w.toString();
        } catch (RDFHandlerException ex) {
            throw new RuntimeException(ex);
        }
    }
View Full Code Here

    return true;
  }

  public void writeR2RMLMapping(PrintWriter writer)  {
    try {
      con.export(new TurtleWriter(writer));
    } catch (RepositoryException e) {
      logger.error("Error occured while outputing R2RML mapping");
    } catch (RDFHandlerException e) {
      logger.error("Error occured while outputing R2RML mapping");
    }
View Full Code Here

   *
   * @param out
   *        The OutputStream to write the N3 document to.
   */
  public N3Writer(OutputStream out) {
    ttlWriter = new TurtleWriter(out);
  }
View Full Code Here

   *
   * @param writer
   *        The Writer to write the N3 document to.
   */
  public N3Writer(Writer writer) {
    ttlWriter = new TurtleWriter(writer);
  }
View Full Code Here

    if (format == RDFFormat.NTRIPLES) {
      rdfDocumentWriter = new NTriplesWriter(stringWriter);
    } else if (format == RDFFormat.RDFXML) {
      rdfDocumentWriter = new RdfXmlWriter(stringWriter);
    } else {
      rdfDocumentWriter = new TurtleWriter(stringWriter);
    }
   
    try {
      for (Namespace namespace : Namespace.values()) {
        rdfDocumentWriter.setNamespace(namespace.getName(), namespace.getURI());
View Full Code Here

TOP

Related Classes of org.openrdf.rio.turtle.TurtleWriter

Copyright © 2018 www.massapicom. 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.