Package org.ontoware.rdf2go.exception

Examples of org.ontoware.rdf2go.exception.ModelRuntimeException


          if(m != null)
            m.close();
        }
        this.connection.close();
      } catch(RepositoryException e) {
        throw new ModelRuntimeException(e);
      } finally {
        this.connection = null;
      }
    }
  }
View Full Code Here


  @Deprecated
  public void commit() {
    try {
      this.connection.commit();
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

  public URI createURI(String uriString) throws ModelRuntimeException {
    // check if Sesame accepts this URI
    try {
      this.valueFactory.createURI(uriString);
    } catch(IllegalArgumentException e) {
      throw new ModelRuntimeException("Wrong URI format for Sesame", e);
    }
   
    // return an URI if no error occured
    return new URIImpl(uriString, false);
  }
View Full Code Here

  public void dump() {
    this.assertModel();
    try {
      this.writeTo(System.out, Syntax.RdfXml);
    } catch(IOException e) {
      throw new ModelRuntimeException(e);
    }
    // RDFWriter sesameWriter = new RDFXMLPrettyWriter(System.out);
    // try {
    // connection.export(sesameWriter);
    // }
View Full Code Here

      }
     
      // wrap them in an iterator that converts them to RDF2Go Statements
      return new StatementIterator(statements);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

  public ClosableIterator<URI> getModelURIs() {
    this.assertModel();
    try {
      return new ContextIterator(this.connection.getContextIDs());
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

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

        Namespace openrdfNamespace = openrdfMap.next();
        nsMap.put(openrdfNamespace.getPrefix(), openrdfNamespace.getName());
      }
      return nsMap;
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

      RepositoryResult<org.openrdf.model.Statement> statements = this.connection
              .getStatements(null, null, null, true);
      // wrap them in an iterator that converts them to RDF2Go Statements
      return new StatementIterator(statements);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

  public ModelSet open() {
    if(!this.isOpen()) {
      try {
        this.connection = this.repository.getConnection();
      } catch(RepositoryException e) {
        throw new ModelRuntimeException(e);
      }
    }
    return this;
  }
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.