Package org.apache.marmotta.client.exception

Examples of org.apache.marmotta.client.exception.MarmottaClientException


                case 404:
                    log.error("the resource with URI {} does not exist on the server",uri);
                    throw new NotFoundException("the resource with URI "+uri+" does not exist on the server");
                default:
                    log.error("error evaluating LDPath Program Query: {} {}",new Object[] {response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error evaluating LDPath Program Query: "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            get.releaseConnection();
        }
View Full Code Here


                case 404:
                    log.error("resource {} does not exist, cannot retrieve", uri);
                    throw new NotFoundException("resource "+uri+" does not exist, cannot retrieve");
                default:
                    log.error("error retrieving resource {}: {} {}",new Object[] {uri,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving resource "+uri+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } catch (UnsupportedEncodingException e) {
            log.error("could not encode URI parameter",e);
            throw new MarmottaClientException("could not encode URI parameter");
        } finally {
            get.releaseConnection();
        }
    }
View Full Code Here

                case 404:
                    log.error("resource {} does not exist, cannot update", uri);
                    throw new NotFoundException("resource "+uri+" does not exist, cannot update");
                default:
                    log.error("error updating resource {}: {} {}",new Object[] {uri,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error updating resource "+uri+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } catch (UnsupportedEncodingException e) {
            log.error("could not encode URI parameter",e);
            throw new MarmottaClientException("could not encode URI parameter");
        } finally {
            put.releaseConnection();
        }
    }
View Full Code Here

                case 404:
                    log.error("resource {} does not exist, cannot retrieve content", uri);
                    throw new NotFoundException("resource "+uri+" does not exist, cannot retrieve");
                default:
                    log.error("error retrieving resource {}: {} {}",new Object[] {uri,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving resource "+uri+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } catch (UnsupportedEncodingException e) {
            log.error("could not encode URI parameter",e);
            throw new MarmottaClientException("could not encode URI parameter");
        } finally {
            get.releaseConnection();
        }
    }
View Full Code Here

                    Map<String,Map<String,Object>> result =
                            mapper.readValue(response.getEntity().getContent(),new TypeReference<Map<String,Map<String,Object>>>(){});
                    return result.keySet();
                default:
                    log.error("error retrieving list of configuration keys: {} {}",new Object[] {response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving list of configuration keys: "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            get.releaseConnection();
        }
View Full Code Here

                        result.add(new Configuration(entry.getKey(),entry.getValue().get("value")));
                    }
                    return result;
                default:
                    log.error("error retrieving list of configuration keys: {} {}",new Object[] {response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving list of configuration keys: "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            get.releaseConnection();
        }
View Full Code Here

                case 404:
                    log.info("configuration with key {} does not exist", key);
                    return null;
                default:
                    log.error("error retrieving configuration {}: {} {}",new Object[] {key,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving configuration "+key+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            get.releaseConnection();
        }
View Full Code Here

                case 404:
                    log.error("configuration with key {} does not exist",key);
                    throw new NotFoundException("configuration with key "+key+" does not exist");
                default:
                    log.error("error updating configuration {}: {} {}",new Object[] {key,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error updating configuration "+key+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            post.releaseConnection();
        }       
View Full Code Here

                case 404:
                    log.error("configuration with key {} does not exist",key);
                    throw new NotFoundException("configuration with key "+key+" does not exist");
                default:
                    log.error("error deleting configuration {}: {} {}",new Object[] {key,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error deleting configuration "+key+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            delete.releaseConnection();
        }
View Full Code Here

                    Set<String> result =
                            mapper.readValue(response.getEntity().getContent(),new TypeReference<Set<String>>(){});
                    return result;
                 default:
                    log.error("error retrieving list of import types: {} {}",new Object[] {response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error retrieving list of import types: "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            get.releaseConnection();
        }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.client.exception.MarmottaClientException

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.