Examples of exportStatements()


Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

      response.setHeader("Content-Disposition", "attachment; filename=" + filename);

      RDFWriter writer = Rio.createWriter(format, response.getOutputStream());

      conn = repo.getConnection();
      conn.exportStatements(settings.getSubject(), settings.getPredicate(), settings.getObject(),
          settings.isIncludeInferred(), writer, settings.getContexts());
    }
    catch (RepositoryException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

      if (rdfFormat.getDefaultFileExtension() != null) {
        filename += "." + rdfFormat.getDefaultFileExtension();
      }
      response.setHeader("Content-Disposition", "attachment; filename=" + filename);

      repositoryCon.exportStatements(subj, pred, obj, useInferencing, rdfWriter, contexts);

      out.close();
    }
    catch (RDFHandlerException e) {
      throw new ServerHTTPException("Serialization error: " + e.getMessage(), e);
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

                        RDFWriter writer = Rio.createWriter(serializer, output);
                        try {
                            RepositoryConnection con = versioningService.getSnapshot(date);
                            URI subject = con.getValueFactory().createURI(resource.stringValue());
                            try {
                                con.exportStatements(subject,null,null,true,writer);
                            } catch (RepositoryException e) {
                                throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR);
                            } catch (RDFHandlerException e) {
                                throw new IOException("error while writing RDF data to stream");
                            } finally {
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

                            RDFWriter writer = Rio.createWriter(serializer,output);
                            try {
                                RepositoryConnection connection = sesameService.getConnection();
                                try {
                                    connection.begin();
                                    connection.exportStatements(subject,null,null,true,writer);
                                } finally {
                                    connection.commit();
                                    connection.close();
                                }
                            } catch (RepositoryException e) {
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

        try {
            RepositoryConnection connection = sesameService.getConnection();
            connection.begin();
            try {
                if(context == null) {
                    connection.exportStatements(null,null,null,true,handler);
                } else {
                    connection.exportStatements(null,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

            connection.begin();
            try {
                if(context == null) {
                    connection.exportStatements(null,null,null,true,handler);
                } else {
                    connection.exportStatements(null,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
                connection.close();
            }
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

        RDFWriter handler = Rio.createWriter(serializer,outputStream);
        try {
            RepositoryConnection connection = sesameService.getConnection();
            try {
                if(context == null) {
                    connection.exportStatements(null,null,null,true,handler);
                } else {
                    connection.exportStatements(null,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

            RepositoryConnection connection = sesameService.getConnection();
            try {
                if(context == null) {
                    connection.exportStatements(null,null,null,true,handler);
                } else {
                    connection.exportStatements(null,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
                connection.close();
            }
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

        RDFWriter handler = Rio.createWriter(serializer,writer);
        try {
            RepositoryConnection connection = sesameService.getConnection();
            try {
                if(context == null) {
                    connection.exportStatements(resource,null,null,true,handler);
                } else {
                    connection.exportStatements(resource,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.exportStatements()

            RepositoryConnection connection = sesameService.getConnection();
            try {
                if(context == null) {
                    connection.exportStatements(resource,null,null,true,handler);
                } else {
                    connection.exportStatements(resource,null,null,true,handler,context);
                }
            } finally {
                connection.commit();
                connection.close();
            }
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.