Package org.openrdf.repository.util

Examples of org.openrdf.repository.util.RDFInserter


    rdfParser.setVerifyData(true);
    rdfParser.setStopAtFirstError(true);
    rdfParser.setDatatypeHandling(RDFParser.DatatypeHandling.IGNORE);

    RDFInserter rdfInserter = new RDFInserter(this);
    rdfInserter.enforceContext(contexts);
    rdfParser.setRDFHandler(rdfInserter);

    boolean autoCommit = isAutoCommit();
    if (autoCommit) {
      // Add the stream in a single transaction
View Full Code Here


  @Override
  public void removeMatch(Resource subject, URI predicate, Value object, Resource... contexts)
    throws StoreException
  {
    if (archiveContexts.length > 0) {
      RDFHandler handler = new RDFInserter(getDelegate());
      try {
        getDelegate().exportMatch(subject, predicate, object, true, handler, archiveContexts);
      }
      catch (RDFHandlerException e) {
        if (e.getCause() instanceof StoreException) {
View Full Code Here

      rdfParser.setVerifyData(false);
      rdfParser.setStopAtFirstError(true);
      rdfParser.setDatatypeHandling(RDFParser.DatatypeHandling.IGNORE);

      RDFInserter rdfInserter = new RDFInserter(con);
      rdfInserter.enforceContext(contexts);
      rdfParser.setRDFHandler(rdfInserter);

      con.begin();
      try {
        rdfParser.parse(in, baseURI);
View Full Code Here

      RDFParser rdfParser = Rio.createParser(rdfFormat, con.getValueFactory());
      rdfParser.setVerifyData(false);
      rdfParser.setDatatypeHandling(DatatypeHandling.IGNORE);
      // rdfParser.setPreserveBNodeIDs(true);

      RDFInserter rdfInserter = new RDFInserter(con);
      rdfInserter.enforceContext(context);
      rdfParser.setRDFHandler(rdfInserter);

      URL graphURL = new URL(graphURI.toString());
      InputStream in = graphURL.openStream();
      try {
View Full Code Here

    rdfParser.setVerifyData(true);
    rdfParser.setStopAtFirstError(true);
    rdfParser.setDatatypeHandling(RDFParser.DatatypeHandling.IGNORE);

    RDFInserter rdfInserter = new RDFInserter(this);
    rdfInserter.enforceContext(contexts);
    rdfParser.setRDFHandler(rdfInserter);

    boolean autoCommit = isAutoCommit();
    setAutoCommit(false);
View Full Code Here

      RDFParser rdfParser = Rio.createParser(rdfFormat, dataRep.getValueFactory());
      rdfParser.setVerifyData(false);
      rdfParser.setDatatypeHandling(DatatypeHandling.IGNORE);
      // rdfParser.setPreserveBNodeIDs(true);

      RDFInserter rdfInserter = new RDFInserter(con);
      rdfInserter.enforceContext(context);
      rdfParser.setRDFHandler(rdfInserter);

      URL graphURL = new URL(graphURI.toString());
      InputStream in = graphURL.openStream();
      try {
View Full Code Here

                        aConn.begin();

                        for (String aFile : Splitter.on(',').omitEmptyStrings().trimResults().split(aFiles.toString())) {
                            RDFParser aParser = Rio.createParser(Rio.getParserFormatForFileName(aFile));

                            aParser.setRDFHandler(new RDFInserter(aConn));

                            if (NetUtils.isURL(aFile)) {
                                aParser.parse(new java.net.URL(aFile).openStream(), "");
                            }
                            else {
View Full Code Here

TOP

Related Classes of org.openrdf.repository.util.RDFInserter

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.