Package org.apache.marmotta.ldclient.exception

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


            if(data.get("link") != null) {
                model.add(subject, FOAF.homepage, vf.createURI(data.get("link").toString()));
            }

        } catch (JsonMappingException e) {
            throw new DataRetrievalException("error while mapping JSON response",e);
        } catch (JsonParseException e) {
            throw new DataRetrievalException("error while parsing JSON response",e);
        } catch (IOException e) {
            throw new DataRetrievalException("error while accessing Facebook Graph API",e);
        }

        return Collections.emptyList();
    }
View Full Code Here


            ClientResponse result = new ClientResponse(200, 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 {}: {}", resourceUri, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resourceUri,e);
        } catch (IOException e) {
            log.error("I/O error while trying to retrieve resource {}: {}", resourceUri, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resourceUri,e);
        } catch(RuntimeException ex) {
            log.error("Unknown error while trying to retrieve resource {}: {}", resourceUri, ex.getMessage());
            throw new DataRetrievalException("Unknown error while trying to retrieve resource "+resourceUri,ex);
        }

    }
View Full Code Here

            }

            return Collections.emptyList();

        } catch (JDOMException e) {
            throw new DataRetrievalException("could not parse XML response. It is not in proper XML format",e);
        } catch (IOException e) {
            throw new DataRetrievalException("I/O error while parsing XML response",e);
        }

    }
View Full Code Here

            con.close();

            return findAdditionalRequestUrls(resource, htmlDoc, requestUrl);

        } catch (RepositoryException e) {
            throw new DataRetrievalException("repository error while parsing XML response",e);
        } catch (IOException e) {
            throw new DataRetrievalException("I/O error while parsing HTML response",e);
        }

    }
View Full Code Here

            ClientResponse result = new ClientResponse(handler.httpStatus, 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

            con.commit();
            con.close();

            return Collections.emptyList();
        } catch (RepositoryException e) {
            throw new DataRetrievalException("error while initializing temporary RDF store",e);
        } catch (RDFParseException e) {
            throw new DataRetrievalException("parse error while trying to parse remote RDF content",e);
        } catch (IOException e) {
            throw new DataRetrievalException("I/O error while trying to read remote RDF content",e);
        }
    }
View Full Code Here

                con.close();
            }
        } catch(RepositoryException ex) {
            log.error("error while storing retrieved triples in repository",ex);
        } catch (JsonMappingException e) {
            throw new DataRetrievalException("error while mapping JSON response",e);
        } catch (JsonParseException e) {
            throw new DataRetrievalException("error while parsing JSON response",e);
        } catch (IOException e) {
            throw new DataRetrievalException("error while accessing Facebook Graph API",e);
        }

        return Collections.EMPTY_LIST;
    }
View Full Code Here

            ClientResponse result = new ClientResponse(200, 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 {}: {}", resourceUri, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resourceUri,e);
        } catch (IOException e) {
            log.error("I/O error while trying to retrieve resource {}: {}", resourceUri, e.getMessage());
            throw new DataRetrievalException("I/O error while trying to retrieve resource "+resourceUri,e);
        } catch(RuntimeException ex) {
            log.error("Unknown error while trying to retrieve resource {}: {}", resourceUri, ex.getMessage());
            throw new DataRetrievalException("Unknown error while trying to retrieve resource "+resourceUri,ex);
        }

    }
View Full Code Here

                    },
                    triples.getValueFactory());

            return Collections.emptyList();
        } catch (QueryResultParseException e) {
            throw new DataRetrievalException("parse error while trying to parse remote SPARQL results",e);
        } catch (TupleQueryResultHandlerException e) {
            throw new DataRetrievalException("parse error while trying to parse remote SPARQL results",e);
        } catch (IOException e) {
            throw new DataRetrievalException("I/O error while trying to read remote RDF content",e);
        }
    }
View Full Code Here

            con.close();

            return Collections.emptyList();

        } catch (JDOMException e) {
            throw new DataRetrievalException("could not parse XML response. It is not in proper XML format",e);
        } catch (IOException e) {
            throw new DataRetrievalException("I/O error while parsing XML response",e);
        } catch (RepositoryException e) {
            throw new DataRetrievalException("repository error while parsing XML response",e);
        }

    }
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.