}
public <T> T get(String id, Class<T> type)
throws StoreConfigException
{
HTTPRequest request = pool.slash(id).get();
try {
request.accept(type);
try {
request.execute();
}
catch (NotFound e) {
return null;
}
catch (UnsupportedQueryLanguage e) {
throw new UnsupportedQueryLanguageException(e);
}
catch (UnsupportedFileFormat e) {
throw new UnsupportedRDFormatException(e);
}
catch (UnsupportedMediaType e) {
throw new UnsupportedRDFormatException(e);
}
catch (Unauthorized e) {
throw new StoreConfigException(e);
}
catch (HTTPException e) {
throw new StoreConfigException(e);
}
return request.read(type);
}
catch (IOException e) {
throw new StoreConfigException(e);
}
catch (NumberFormatException e) {
throw new StoreConfigException(e);
}
catch (QueryResultParseException e) {
throw new StoreConfigException(e);
}
catch (RDFParseException e) {
throw new StoreConfigException(e);
}
catch (NoCompatibleMediaType e) {
throw new StoreConfigException(e);
}
finally {
request.release();
}
}