});\r
}\r
\r
- @Override\r
- public RandomAccessBinary newLiteral4RandomAccessBinary\r
- (final Resource resource, final Resource predicate, final Datatype datatype, final Object initialvalue)\r
- throws DatabaseException {\r
+ public RandomAccessBinary createRandomAccessBinary(final Resource resource, final Resource predicate, final Datatype datatype, final Object initialValue) throws DatabaseException {\r
+ return session.syncRequest(new WriteResultRequest<RandomAccessBinary>() {\r
+ @Override\r
+ public RandomAccessBinary perform(WriteGraph graph) throws DatabaseException {\r
+ return graph.createRandomAccessBinary(resource, predicate, datatype, initialValue);\r
+ }\r
+ });\r
+ }\r
+\r
+ public RandomAccessBinary createRandomAccessBinary(final Resource resource, final Datatype datatype, final Object initialValue) throws DatabaseException {\r
return session.syncRequest(new WriteResultRequest<RandomAccessBinary>() {\r
@Override\r
public RandomAccessBinary perform(WriteGraph graph) throws DatabaseException {\r
- return graph.newLiteral4RandomAccessBinary(resource, predicate, datatype, initialvalue);\r
+ return graph.createRandomAccessBinary(resource, datatype, initialValue);\r
}\r
});\r
}\r
\r
@Override\r
public Set<Resource> perform(ReadGraph graph) throws DatabaseException {\r
- return graph.getSupertypes(subject);\r
+ return graph.getSupertypes(subject);\r
}\r
});\r
} catch (DatabaseException e) {\r
\r
@Override\r
public Set<Resource> perform(ReadGraph graph) throws DatabaseException {\r
- return graph.getSuperrelations(subject);\r
+ return graph.getSuperrelations(subject);\r
+ }\r
+ });\r
+ } catch (DatabaseException e) {\r
+ throw new ServiceException(e);\r
+ }\r
+ }\r
+\r
+ public Resource getPossibleSuperrelation(final Resource subject) throws ServiceException {\r
+ try {\r
+ return session.syncRequest(new Read<Resource>() {\r
+ @Override\r
+ public Resource perform(ReadGraph graph) throws DatabaseException {\r
+ return graph.getPossibleSuperrelation(subject);\r
}\r
});\r
} catch (DatabaseException e) {\r
return graph.newLiteral(resource, predicate, datatype, initialValue);\r
}\r
\r
- @Override\r
- public RandomAccessBinary newLiteral4RandomAccessBinary\r
- (Resource resource, Resource predicate, Datatype datatype, Object initialValue)\r
- throws DatabaseException {\r
- return graph.newLiteral4RandomAccessBinary(resource, predicate, datatype, initialValue);\r
- }\r
+ @Override\r
+ public RandomAccessBinary createRandomAccessBinary(Resource resource,\r
+ Resource predicate, Datatype datatype, Object initialValue)\r
+ throws DatabaseException {\r
+ return graph.createRandomAccessBinary(resource, predicate, datatype, initialValue);\r
+ }\r
+ \r
+ @Override\r
+ public RandomAccessBinary createRandomAccessBinary(Resource resource,\r
+ Datatype datatype, Object initialValue) throws DatabaseException {\r
+ return graph.createRandomAccessBinary(resource, datatype, initialValue);\r
+ }\r
+ \r
// @Override\r
// public void claimFile(Resource resource, Object content, Binding binding)\r
// throws DatabaseException {\r
return graph.getSuperrelations(subject);\r
}\r
\r
+ @Override\r
+ public Resource getPossibleSuperrelation(Resource subject)\r
+ throws ServiceException {\r
+ return graph.getPossibleSuperrelation(subject);\r
+ }\r
+\r
// @Override\r
// public Collection<Resource> getObjects(Resource subject,\r
// Resource relation)\r