Package org.ontoware.rdf2go.exception

Examples of org.ontoware.rdf2go.exception.ModelRuntimeException


      GraphQueryResult queryResult = query.evaluate();
     
      // wrap it in a GraphIterable
      return new GraphIterable(queryResult, null);
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here


    this.assertModel();

    try {
      this.connection.add(in, "", getRDFFormat(syntax));
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

    this.assertModel();

    try {
      this.connection.add(in, baseURI, getRDFFormat(syntax));
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

    this.assertModel();

    try {
      this.connection.add(reader, "", getRDFFormat(syntax));
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

    this.assertModel();

    try {
      this.connection.add(reader, baseURI, getRDFFormat(syntax));
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

  public void removeAll() throws ModelRuntimeException {
    this.assertModel();
    try {
      this.connection.clear();
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

  }
 
  @Override
  public void removeAll(Iterator<? extends Statement> iterator) throws ModelRuntimeException {
    if(this.isLocked()) {
      throw new ModelRuntimeException("Model is locked, cannot perform an update.");
    }
    // do not auto-commit
    this.assertModel();
    try {
      this.connection.begin();
      try {
        try {
          // add
          while(iterator.hasNext()) {
            Statement s = iterator.next();
            org.openrdf.model.URI context = ConversionUtil.toOpenRDF(s.getContext(),
                    this.valueFactory);
            org.openrdf.model.Statement sd = ConversionUtil.toOpenRDF(s,
                    this.valueFactory);
            this.connection.remove(sd, context);
          }
          this.connection.commit();
        } catch(RepositoryException x) {
          this.connection.rollback();
        }
      } finally {
        this.connection.commit();
      }
    } catch(RepositoryException x) {
      throw new ModelRuntimeException(x);
    }
  }
View Full Code Here

    org.openrdf.model.Resource context = ConversionUtil
            .toOpenRDF(contextURI, this.valueFactory);
    try {
      this.connection.clear(context);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
    return true;
  }
View Full Code Here

  public void removeNamespace(String prefix) {
    this.assertModel();
    try {
      this.connection.removeNamespace(prefix);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

    this.assertModel();
    try {
      org.openrdf.model.Statement s = ConversionUtil.toOpenRDF(statement, this.valueFactory);
      this.connection.remove(s, s.getContext());
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.exception.ModelRuntimeException

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.