X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.impl%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fimpl%2FVirtualGraphImpl.java;h=17503977ec7ab77ba804af74731936d77baf68a9;hb=199e71d04a503618e59a1667ea3abee36be08732;hp=16771a8a5a233b73c7ee84cd27aa6981bf447b58;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/VirtualGraphImpl.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/VirtualGraphImpl.java index 16771a8a5..17503977e 100644 --- a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/VirtualGraphImpl.java +++ b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/VirtualGraphImpl.java @@ -1,38 +1,39 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.impl; - -import org.simantics.db.VirtualGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.impl.graph.ReadGraphImpl; -import org.simantics.utils.datastructures.Callback; - -public interface VirtualGraphImpl extends VirtualGraph { - - public int newResource(boolean lazy); - - public void claim(int subject, int predicate, int object); - public int[] getObjects(int subject, int predicate); - public int[] getPredicates(int subject); - public byte[] getValue(int resource); - public void deny(int subject, int predicate, int object); - public void claimValue(int resource, byte[] object, int length); - public void denyValue(int resource); - - public boolean isPending(int resource); - public boolean isPending(int resource, int predicate); - - public void load(ReadGraphImpl graph, int resource, int predicate, Callback callback) throws DatabaseException; - public void load(ReadGraphImpl graph, int resource, Callback callback) throws DatabaseException; - -} - +/******************************************************************************* + * Copyright (c) 2007, 2010 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 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.impl; + +import java.util.function.Consumer; + +import org.simantics.db.VirtualGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.impl.graph.ReadGraphImpl; + +public interface VirtualGraphImpl extends VirtualGraph { + + public int newResource(boolean lazy); + + public void claim(int subject, int predicate, int object); + public int[] getObjects(int subject, int predicate); + public int[] getPredicates(int subject); + public byte[] getValue(int resource); + public void deny(int subject, int predicate, int object); + public void claimValue(int resource, byte[] object, int length); + public void denyValue(int resource); + + public boolean isPending(int resource); + public boolean isPending(int resource, int predicate); + + public void load(ReadGraphImpl graph, int resource, int predicate, Consumer callback) throws DatabaseException; + public void load(ReadGraphImpl graph, int resource, Consumer callback) throws DatabaseException; + +} +