Package org.apache.marmotta.ldclient.exception

Examples of org.apache.marmotta.ldclient.exception.DataRetrievalException


        List<String> data;
    try {
      data = getChildList(suffix, con);
    } catch (Exception e) {
      log.error("Error getting childs: {}", e.getMessage(), e);
      throw new DataRetrievalException(e);
    }
        String next = null;
        for (String dn : data) {
            if (dn.toLowerCase().endsWith((current + "," + suffix).toLowerCase())) {
                next = dn;
                break;
            }
        }

        if (next == null) throw new DataRetrievalException("The Object '" + current + "' cannot be found");

        return buildDN(next, path.replaceFirst("^[^/]*(/|$)", ""), con);
    }
View Full Code Here


                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } catch (RDFParseException e) {
                throw new DataRetrievalException("could not parse resource data for file "+filename);
            } catch (IOException e) {
                throw new DataRetrievalException("could not load resource data for file "+filename);
            } finally {
                con.close();
            }

            ClientResponse response = new ClientResponse(triples);

            return response;
        } catch (RepositoryException e) {
            throw new DataRetrievalException("could not load resource data for file "+filename);
        }

    }
View Full Code Here

            ClientResponse result = new ClientResponse(handler.triples);
            result.setExpires(expiresDate);
            return result;
        } catch (RepositoryException e) {
            log.error("error while initialising Sesame repository; classpath problem?",e);
            throw new DataRetrievalException("error while initialising Sesame repository; classpath problem?",e);
        } catch (ClientProtocolException e) {
            log.error("HTTP client error while trying to retrieve resource {}: {}", resource, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resource,e);
        } catch (IOException e) {
            log.error("I/O error while trying to retrieve resource {}: {}", resource, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resource,e);
        } catch(RuntimeException ex) {
            log.error("Unknown error while trying to retrieve resource {}: {}", resource, ex.getMessage());
            throw new DataRetrievalException("Unknown error while trying to retrieve resource "+resource,ex);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.ldclient.exception.DataRetrievalException

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.