X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.interop.mapping%2Fsrc%2Forg%2Fsimantics%2Finterop%2Fmapping%2FSplittingWriteGraph.java;fp=org.simantics.interop.mapping%2Fsrc%2Forg%2Fsimantics%2Finterop%2Fmapping%2FSplittingWriteGraph.java;h=a91c8c0b72eff08f3ecf195887967c716a04c870;hb=8b00e8b4094618aab8783242b061a9367ae02bc4;hp=f8e5faea31b86deb45b17fd883067377ef52c3dc;hpb=275cb85d39ce2f2abd1433f8d2d057019197fc34;p=simantics%2Finterop.git diff --git a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java index f8e5fae..a91c8c0 100644 --- a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java +++ b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java @@ -371,14 +371,20 @@ public class SplittingWriteGraph implements WriteGraph { }); } - @Override - public RandomAccessBinary newLiteral4RandomAccessBinary - (final Resource resource, final Resource predicate, final Datatype datatype, final Object initialvalue) - throws DatabaseException { + public RandomAccessBinary createRandomAccessBinary(final Resource resource, final Resource predicate, final Datatype datatype, final Object initialValue) throws DatabaseException { + return session.syncRequest(new WriteResultRequest() { + @Override + public RandomAccessBinary perform(WriteGraph graph) throws DatabaseException { + return graph.createRandomAccessBinary(resource, predicate, datatype, initialValue); + } + }); + } + + public RandomAccessBinary createRandomAccessBinary(final Resource resource, final Datatype datatype, final Object initialValue) throws DatabaseException { return session.syncRequest(new WriteResultRequest() { @Override public RandomAccessBinary perform(WriteGraph graph) throws DatabaseException { - return graph.newLiteral4RandomAccessBinary(resource, predicate, datatype, initialvalue); + return graph.createRandomAccessBinary(resource, datatype, initialValue); } }); } @@ -2439,7 +2445,7 @@ public class SplittingWriteGraph implements WriteGraph { @Override public Set perform(ReadGraph graph) throws DatabaseException { - return graph.getSupertypes(subject); + return graph.getSupertypes(subject); } }); } catch (DatabaseException e) { @@ -2455,7 +2461,20 @@ public class SplittingWriteGraph implements WriteGraph { @Override public Set perform(ReadGraph graph) throws DatabaseException { - return graph.getSuperrelations(subject); + return graph.getSuperrelations(subject); + } + }); + } catch (DatabaseException e) { + throw new ServiceException(e); + } + } + + public Resource getPossibleSuperrelation(final Resource subject) throws ServiceException { + try { + return session.syncRequest(new Read() { + @Override + public Resource perform(ReadGraph graph) throws DatabaseException { + return graph.getPossibleSuperrelation(subject); } }); } catch (DatabaseException e) {