Package org.ontoware.rdf2go.exception

Examples of org.ontoware.rdf2go.exception.ModelRuntimeException


          RepositoryConnection connection) throws ModelRuntimeException {
    try {
      this.query = connection.prepareTupleQuery(language, queryString);
      this.queryResult = this.query.evaluate();
    } catch(OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here


  @Override
  public List<String> getVariables() {
    try {
      return new ArrayList<String>(this.queryResult.getBindingNames());
    } catch (QueryEvaluationException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

    Node node = getValue(varName);
    if (node instanceof Literal) {
      return ((Literal)node).getValue();
    }
    else {
      throw new ModelRuntimeException("Node is not a literal: " + node);
    }
  }
View Full Code Here

      boolean hasNext;
      try {
        hasNext = this.cit.hasNext();
      }
      catch (OpenRDFException e) {
        throw new ModelRuntimeException(e);
      }
      if (!hasNext) {
        close();
      }
      return hasNext;
View Full Code Here

      if (!this.cit.hasNext()) {
        close();
      }
    }
    catch (OpenRDFException e) {
      throw new ModelRuntimeException(e);

    }

    return result;
  }
View Full Code Here

  public void close() {
    try {
      this.cit.close();
    }
    catch (OpenRDFException e) {
      throw new ModelRuntimeException(e);
    }
    this.closed = true;
  }
View Full Code Here

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
   
    return repository;
  }
View Full Code Here

      endpoint.initialize();
      RepositoryConnection connection = endpoint.getConnection();
     
      return new RepositoryQueryResultTable(sparqlQuery, connection);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
   
  }
View Full Code Here

        ModelFactory modelBuilder;
        try {
          modelBuilder = (ModelFactory)constructor.newInstance();
          register(modelBuilder);
        } catch(IllegalArgumentException e) {
          throw new ModelRuntimeException(e);
        } catch(InstantiationException e) {
          throw new ModelRuntimeException(e);
        } catch(IllegalAccessException e) {
          throw new ModelRuntimeException(e);
        } catch(InvocationTargetException e) {
          throw new ModelRuntimeException(e);
        }
      } catch(SecurityException e) {
        throw new ModelRuntimeException(e);
      } catch(NoSuchMethodException e) {
        throw new ModelRuntimeException(e);
      }
    } catch(ClassNotFoundException e) {
      throw new ModelRuntimeException(e);
    }
   
  }
View Full Code Here

          log.debug("Using ModelFactory '" + result.getClass()
                  + "' which was loaded via org.ontoware.rdf2go.impl.StaticBinding.");
        }
      } catch(ClassNotFoundException e) {
        // class org.ontoware.rdf2go.impl.StaticBinding not present
        throw new ModelRuntimeException(e);
      } catch(SecurityException e) {
        throw new ModelRuntimeException(e);
      } catch(NoSuchMethodException e) {
        throw new ModelRuntimeException(e);
      } catch(IllegalArgumentException e) {
        throw new ModelRuntimeException(e);
      } catch(IllegalAccessException e) {
        throw new ModelRuntimeException(e);
      } catch(InvocationTargetException e) {
        throw new ModelRuntimeException(e);
      }
     
    }
   
    // if modelfactory is still null, give up
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.