Package org.apache.stanbol.entityhub.servicesapi.yard

Examples of org.apache.stanbol.entityhub.servicesapi.yard.YardException


            con = repository.getConnection();
            con.begin();
            remove(con, sesameFactory.createURI(id));
            con.commit();
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove for Representation "+id, e);
        } finally {
            if(con != null){
                try {
                    con.close();
                } catch (RepositoryException ignore) {}
View Full Code Here


                    remove(con, sesameFactory.createURI(id));
                }
            }
            con.commit();
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove parsed Representations", e);
        } finally {
            if(con != null){
                try {
                    con.close();
                } catch (RepositoryException ignore) {}
View Full Code Here

            con = repository.getConnection();
            con.begin();
            con.clear(contexts); //removes everything
            con.commit();
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove parsed Representations", e);
        } finally {
            if(con != null){
                try {
                    con.close();
                } catch (RepositoryException ignore) {}
View Full Code Here

                } //ignore null values in the parsed Iterable!
            }
            con.commit();
            return added;
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove parsed Representations", e);
        } catch (IllegalArgumentException e) {
            try {
                //to avoid Exception logs in case store(..) throws an Exception
                //in the case allowCreate and canNotCreateIsError do not allow
                //the store operation
View Full Code Here

            con.begin();
            Representation added = store(con,representation,allowCreate,canNotCreateIsError);
            con.commit();
            return added;
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove parsed Representations", e);
        } catch (IllegalArgumentException e) {
            try {
                //to avoid Exception logs in case store(..) throws an Exception
                //in the case allowCreate and canNotCreateIsError do not allow
                //the store operation
View Full Code Here

                }
            }
            con.commit();
            return new QueryResultListImpl<String>(query,ids,String.class);
        } catch (RepositoryException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } catch (QueryEvaluationException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } finally {
            if(results != null) { //close the result if present
                try {
                    results.close();
                } catch (QueryEvaluationException ignore) {/* ignore */}
 
View Full Code Here

        } catch (MalformedQueryException e) {
            log.error("Unable to pparse SPARQL Query generated for a FieldQuery");
            log.error("FieldQuery: {}",fieldQuery);
            log.error("SPARQL Query: {}",sparqlQueryString);
            log.error("Exception ", e);
            throw new YardException("Unable to parse SPARQL query generated for the parse FieldQuery", e);
        } catch (UnsupportedQueryTypeException e) {
            String message = "The Sesame Repository '" + repository + "'(class: "
                    + repository.getClass().getName() + ") does not support SPARQL!";
            log.error(message, e);
            throw new YardException(message, e);
        }
        if(dataset != null){ //respect the configured contexts
            sparqlOuery.setDataset(dataset);
        }
        return sparqlOuery.evaluate();
View Full Code Here

                } //ignore non URI results
            }
            con.commit();
            return new SesameQueryResultList(model, query, representations);
        } catch (RepositoryException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } catch (QueryEvaluationException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } finally {
            if(results != null) { //close the result if present
                try {
                    results.close();
                } catch (QueryEvaluationException ignore) {/* ignore */}
 
View Full Code Here

                } //ignore non URI results
            }
            con.commit();
            return new SesameQueryResultList(model, query, representations);
        } catch (RepositoryException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } catch (QueryEvaluationException e) {
            throw new YardException("Unable to execute findReferences query", e);
        } finally {
            if(results != null) { //close the result if present
                try {
                    results.close();
                } catch (QueryEvaluationException ignore) {/* ignore */}
 
View Full Code Here

            throw new IllegalStateException("The SolrYard is already closed!");
        }
        try {
            server.optimize();
        } catch (SolrServerException e) {
            throw new YardException("Unable to optimise SolrIndex!", e);
        } catch (IOException e) {
            throw new YardException("Unable to optimise SolrIndex!", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.yard.YardException

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.