X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2FReadGraph.java;h=36081c3a802276bd8ec81f7a974b9b9617d90958;hp=bead66644ff103a67c6a3ad4db713457f068c2fd;hb=0d9b90834ce56b292c00b1a39850ed842c3e4d42;hpb=e5db6157fd8722c946613d4e46d7aaf6bfa92609 diff --git a/bundles/org.simantics.db/src/org/simantics/db/ReadGraph.java b/bundles/org.simantics.db/src/org/simantics/db/ReadGraph.java index bead66644..36081c3a8 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/ReadGraph.java +++ b/bundles/org.simantics.db/src/org/simantics/db/ReadGraph.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * Copyright (c) 2007, 2018 Association for Decentralized Information Management * in Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -12,6 +12,7 @@ package org.simantics.db; import java.util.Collection; +import java.util.Map; import java.util.Set; import org.simantics.databoard.accessor.Accessor; @@ -36,7 +37,6 @@ import org.simantics.db.procedure.SyncMultiListener; import org.simantics.db.procedure.SyncMultiProcedure; import org.simantics.db.procedure.SyncProcedure; import org.simantics.db.procedure.SyncSetListener; -import org.simantics.db.request.MultiRead; import org.simantics.db.request.Read; import org.simantics.scl.compiler.types.Type; @@ -67,7 +67,7 @@ import org.simantics.scl.compiler.types.Type; * @see Statement * @noimplement */ -public interface ReadGraph extends AsyncReadGraph, RequestProcessor { +public interface ReadGraph extends RequestProcessor { /** * @@ -108,6 +108,18 @@ public interface ReadGraph extends AsyncReadGraph, RequestProcessor { */ Resource getPossibleResource(String uri) throws ResourceNotFoundException, ValidationException, ServiceException; + /** + * Computes a map of objects related to resource with L0.ConsistsOf that also contain a L0.HasName property + * + * @param resource the resource + * @return the children + * @throws ValidationException if a resource could not be produced due to + * invalid semantics + * @throws ServiceException on connection and database failures + * @see AsyncReadGraph#forResourceByURI + */ + Map getChildren(Resource resource) throws ValidationException, ServiceException; + /** * Gets a builtin resource. For a list of builtin resources see TODO Wiki * @@ -1071,4 +1083,9 @@ public interface ReadGraph extends AsyncReadGraph, RequestProcessor { boolean setSynchronous(boolean value); boolean getSynchronous(); + + boolean isImmutable(Resource resource) throws DatabaseException; + + int thread(); + }