1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db;
16 import org.simantics.databoard.binding.Binding;
17 import org.simantics.db.exception.DatabaseException;
18 import org.simantics.db.procedure.AsyncListener;
19 import org.simantics.db.procedure.AsyncMultiListener;
20 import org.simantics.db.procedure.AsyncMultiProcedure;
21 import org.simantics.db.procedure.AsyncProcedure;
22 import org.simantics.db.procedure.AsyncSetListener;
23 import org.simantics.db.procedure.Listener;
24 import org.simantics.db.procedure.MultiListener;
25 import org.simantics.db.procedure.MultiProcedure;
26 import org.simantics.db.procedure.Procedure;
27 import org.simantics.db.procedure.SetListener;
28 import org.simantics.db.procedure.SyncListener;
29 import org.simantics.db.procedure.SyncMultiListener;
30 import org.simantics.db.procedure.SyncMultiProcedure;
31 import org.simantics.db.procedure.SyncProcedure;
32 import org.simantics.db.procedure.SyncSetListener;
33 import org.simantics.db.request.MultiRead;
34 import org.simantics.db.request.Read;
38 * For accessing and manipulating the graph data in asynchronous manner. A client
39 * receives AsyncReadGraph instances for performing requests in {@link Read} and
40 * {@link MultiRead} as well as for reacting to request results using
41 * {@link AsyncProcedure}, {@link AsyncListener}, {@link AsyncMultiProcedure},
42 * {@link AsyncMultiListener} and {@link AsyncSetListener}
44 * AsyncReadGraph instances are stateful and may not be stored and used outside the
45 * supplier method activation. The methods receiving AsyncReadGraph should not block for long
46 * periods of time since that may delay the processing of other requests. For a
47 * synchronous counterpart with the same functionality as AsyncReadGraph see
51 * @author Antti Villberg
52 * @see RequestProcessor
53 * @see AsyncRequestProcessor
58 public interface AsyncReadGraph extends AsyncRequestProcessor {
61 * @see ReadGraph#getURI(Resource)
63 void forURI(Resource resource, AsyncListener<String> procedure);
65 * @see ReadGraph#getURI(Resource)
67 void forURI(Resource resource, SyncListener<String> procedure);
69 * @see ReadGraph#getURI(Resource)
71 void forURI(Resource resource, Listener<String> procedure);
73 * @see ReadGraph#getURI(Resource)
75 void forURI(Resource resource, AsyncProcedure<String> procedure);
77 * @see ReadGraph#getURI(Resource)
79 void forURI(Resource resource, SyncProcedure<String> procedure);
81 * @see ReadGraph#getURI(Resource)
83 void forURI(Resource resource, Procedure<String> procedure);
86 * @see ReadGraph#getResourceByURI(String)
88 void forResource(String id, AsyncListener<Resource> procedure);
90 * @see ReadGraph#getResourceByURI(String)
92 void forResource(String id, SyncListener<Resource> procedure);
94 * @see ReadGraph#getResourceByURI(String)
96 void forResource(String id, Listener<Resource> procedure);
98 * @see ReadGraph#getResourceByURI(String)
100 void forResource(String id, AsyncProcedure<Resource> procedure);
102 * @see ReadGraph#getResourceByURI(String)
104 void forResource(String id, SyncProcedure<Resource> procedure);
106 * @see ReadGraph#getResourceByURI(String)
108 void forResource(String id, Procedure<Resource> procedure);
111 * @see ReadGraph#getBuiltin(String)
113 void forBuiltin(String id, AsyncListener<Resource> procedure);
115 * @see ReadGraph#getBuiltin(String)
117 void forBuiltin(String id, SyncListener<Resource> procedure);
119 * @see ReadGraph#getBuiltin(String)
121 void forBuiltin(String id, Listener<Resource> procedure);
123 * @see ReadGraph#getBuiltin(String)
125 void forBuiltin(String id, AsyncProcedure<Resource> procedure);
127 * @see ReadGraph#getBuiltin(String)
129 void forBuiltin(String id, SyncProcedure<Resource> procedure);
131 * @see ReadGraph#getBuiltin(String)
133 void forBuiltin(String id, Procedure<Resource> procedure);
136 * @see ReadGraph#getStatements(Resource, Resource)
138 void forEachStatement(Resource subject, Resource relation, AsyncMultiProcedure<Statement> procedure);
140 * @see ReadGraph#getStatements(Resource, Resource)
142 void forEachStatement(Resource subject, Resource relation, SyncMultiProcedure<Statement> procedure);
144 * @see ReadGraph#getStatements(Resource, Resource)
146 void forEachStatement(Resource subject, Resource relation, MultiProcedure<Statement> procedure);
149 * @see ReadGraph#getStatements(Resource, Resource)
151 void forStatementSet(Resource subject, Resource relation, AsyncSetListener<Statement> procedure);
153 * @see ReadGraph#getStatements(Resource, Resource)
155 void forStatementSet(Resource subject, Resource relation, SyncSetListener<Statement> procedure);
157 * @see ReadGraph#getStatements(Resource, Resource)
159 void forStatementSet(Resource subject, Resource relation, SetListener<Statement> procedure);
162 * @see ReadGraph#getAssertedStatements(Resource, Resource)
164 void forEachAssertedStatement(Resource subject, Resource relation, AsyncMultiProcedure<Statement> procedure);
166 * @see ReadGraph#getAssertedStatements(Resource, Resource)
168 void forEachAssertedStatement(Resource subject, Resource relation, SyncMultiProcedure<Statement> procedure);
170 * @see ReadGraph#getAssertedStatements(Resource, Resource)
172 void forEachAssertedStatement(Resource subject, Resource relation, MultiProcedure<Statement> procedure);
175 * @see ReadGraph#getAssertedStatements(Resource, Resource)
177 void forAssertedStatementSet(Resource subject, Resource relation, AsyncSetListener<Statement> procedure);
179 * @see ReadGraph#getAssertedStatements(Resource, Resource)
181 void forAssertedStatementSet(Resource subject, Resource relation, SyncSetListener<Statement> procedure);
183 * @see ReadGraph#getAssertedStatements(Resource, Resource)
185 void forAssertedStatementSet(Resource subject, Resource relation, SetListener<Statement> procedure);
188 * @see ReadGraph#getPredicates(Resource)
190 void forEachPredicate(Resource subject, AsyncMultiProcedure<Resource> procedure);
192 * @see ReadGraph#getPredicates(Resource)
194 void forEachPredicate(Resource subject, SyncMultiProcedure<Resource> procedure);
196 * @see ReadGraph#getPredicates(Resource)
198 void forEachPredicate(Resource subject, MultiProcedure<Resource> procedure);
201 * @see ReadGraph#getPredicates(Resource)
203 void forPredicateSet(Resource subject, AsyncSetListener<Resource> procedure);
205 * @see ReadGraph#getPredicates(Resource)
207 void forPredicateSet(Resource subject, SyncSetListener<Resource> procedure);
209 * @see ReadGraph#getPredicates(Resource)
211 void forPredicateSet(Resource subject, SetListener<Resource> procedure);
214 * @see ReadGraph#getPrincipalTypes(Resource)
216 void forEachPrincipalType(Resource subject, AsyncMultiProcedure<Resource> procedure);
218 * @see ReadGraph#getPrincipalTypes(Resource)
220 void forEachPrincipalType(Resource subject, SyncMultiProcedure<Resource> procedure);
222 * @see ReadGraph#getPrincipalTypes(Resource)
224 void forEachPrincipalType(Resource subject, MultiProcedure<Resource> procedure);
227 * @see ReadGraph#getPrincipalTypes(Resource)
229 void forPrincipalTypeSet(Resource subject, AsyncSetListener<Resource> procedure);
231 * @see ReadGraph#getPrincipalTypes(Resource)
233 void forPrincipalTypeSet(Resource subject, SyncSetListener<Resource> procedure);
235 * @see ReadGraph#getPrincipalTypes(Resource)
237 void forPrincipalTypeSet(Resource subject, SetListener<Resource> procedure);
240 * @see ReadGraph#getTypes(Resource)
242 void forTypes(Resource subject, AsyncListener<Set<Resource>> procedure);
244 * @see ReadGraph#getTypes(Resource)
246 void forTypes(Resource subject, SyncListener<Set<Resource>> procedure);
248 * @see ReadGraph#getTypes(Resource)
250 void forTypes(Resource subject, Listener<Set<Resource>> procedure);
252 * @see ReadGraph#getTypes(Resource)
254 void forTypes(Resource subject, AsyncProcedure<Set<Resource>> procedure);
256 * @see ReadGraph#getTypes(Resource)
258 void forTypes(Resource subject, SyncProcedure<Set<Resource>> procedure);
260 * @see ReadGraph#getTypes(Resource)
262 void forTypes(Resource subject, Procedure<Set<Resource>> procedure);
265 * @see ReadGraph#getSupertypes(Resource)
267 void forSupertypes(Resource subject, AsyncListener<Set<Resource>> procedure);
269 * @see ReadGraph#getSupertypes(Resource)
271 void forSupertypes(Resource subject, SyncListener<Set<Resource>> procedure);
273 * @see ReadGraph#getSupertypes(Resource)
275 void forSupertypes(Resource subject, Listener<Set<Resource>> procedure);
277 * @see ReadGraph#getSupertypes(Resource)
279 void forSupertypes(Resource subject, AsyncProcedure<Set<Resource>> procedure);
281 * @see ReadGraph#getSupertypes(Resource)
283 void forSupertypes(Resource subject, SyncProcedure<Set<Resource>> procedure);
285 * @see ReadGraph#getSupertypes(Resource)
287 void forSupertypes(Resource subject, Procedure<Set<Resource>> procedure);
290 * @see ReadGraph#getSuperrelations(Resource)
292 void forDirectSuperrelations(Resource subject, AsyncMultiProcedure<Resource> procedure);
295 * @see ReadGraph#getSuperrelations(Resource)
297 void forPossibleSuperrelation(Resource subject, AsyncProcedure<Resource> procedure);
300 * @see ReadGraph#getSuperrelations(Resource)
302 void forSuperrelations(Resource subject, AsyncListener<Set<Resource>> procedure);
304 * @see ReadGraph#getSuperrelations(Resource)
306 void forSuperrelations(Resource subject, SyncListener<Set<Resource>> procedure);
308 * @see ReadGraph#getSuperrelations(Resource)
310 void forSuperrelations(Resource subject, Listener<Set<Resource>> procedure);
312 * @see ReadGraph#getSuperrelations(Resource)
314 void forSuperrelations(Resource subject, AsyncProcedure<Set<Resource>> procedure);
316 * @see ReadGraph#getSuperrelations(Resource)
318 void forSuperrelations(Resource subject, SyncProcedure<Set<Resource>> procedure);
320 * @see ReadGraph#getSuperrelations(Resource)
322 void forSuperrelations(Resource subject, Procedure<Set<Resource>> procedure);
326 * If relation is functional this do one of the following
327 * -call execute 0 or 1 times and then call finished
328 * -call exception with ManyObjectsForFunctionalRelation
330 * @see ReadGraph#getObjects(Resource, Resource)
332 void forEachObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
334 * @see ReadGraph#getObjects(Resource, Resource)
336 void forEachObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
338 * @see ReadGraph#getObjects(Resource, Resource)
340 void forEachObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
343 * @see ReadGraph#getObjects(Resource, Resource)
345 // void forEachDirectObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
347 // * @see ReadGraph#getObjects(Resource, Resource)
349 // void forEachDirectObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
351 // * @see ReadGraph#getObjects(Resource, Resource)
353 // void forEachDirectObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
356 * @see ReadGraph#getObjects(Resource, Resource)
358 void forEachDirectPredicate(Resource subject, AsyncMultiProcedure<Resource> procedure);
360 * @see ReadGraph#getObjects(Resource, Resource)
362 void forEachDirectPredicate(Resource subject, SyncMultiProcedure<Resource> procedure);
364 * @see ReadGraph#getObjects(Resource, Resource)
366 void forEachDirectPredicate(Resource subject, MultiProcedure<Resource> procedure);
369 * @see ReadGraph#getObjects(Resource, Resource)
371 void forObjectSet(Resource subject, Resource relation, AsyncSetListener<Resource> procedure);
373 * @see ReadGraph#getObjects(Resource, Resource)
375 void forObjectSet(Resource subject, Resource relation, SyncSetListener<Resource> procedure);
377 * @see ReadGraph#getObjects(Resource, Resource)
379 void forObjectSet(Resource subject, Resource relation, SetListener<Resource> procedure);
382 * @see ReadGraph#getAssertedObjects(Resource, Resource)
384 void forEachAssertedObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
386 * @see ReadGraph#getAssertedObjects(Resource, Resource)
388 void forEachAssertedObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
390 * @see ReadGraph#getAssertedObjects(Resource, Resource)
392 void forEachAssertedObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
395 * @see ReadGraph#getAssertedObjects(Resource, Resource)
397 void forAssertedObjectSet(Resource subject, Resource relation, AsyncSetListener<Resource> procedure);
399 * @see ReadGraph#getAssertedObjects(Resource, Resource)
401 void forAssertedObjectSet(Resource subject, Resource relation, SyncSetListener<Resource> procedure);
403 * @see ReadGraph#getAssertedObjects(Resource, Resource)
405 void forAssertedObjectSet(Resource subject, Resource relation, SetListener<Resource> procedure);
408 * @see ReadGraph#getInverse(Resource)
410 void forInverse(Resource relation, AsyncListener<Resource> procedure);
412 * @see ReadGraph#getInverse(Resource)
414 void forInverse(Resource relation, SyncListener<Resource> procedure);
416 * @see ReadGraph#getInverse(Resource)
418 void forInverse(Resource relation, Listener<Resource> procedure);
420 * @see ReadGraph#getInverse(Resource)
422 void forInverse(Resource relation, AsyncProcedure<Resource> procedure);
424 * @see ReadGraph#getInverse(Resource)
426 void forInverse(Resource relation, SyncProcedure<Resource> procedure);
428 * @see ReadGraph#getInverse(Resource)
430 void forInverse(Resource relation, Procedure<Resource> procedure);
433 * @see ReadGraph#getSingleObject(Resource, Resource)
435 void forSingleObject(Resource subject, Resource relation, AsyncListener<Resource> procedure);
437 * @see ReadGraph#getSingleObject(Resource, Resource)
439 void forSingleObject(Resource subject, Resource relation, SyncListener<Resource> procedure);
441 * @see ReadGraph#getSingleObject(Resource, Resource)
443 void forSingleObject(Resource subject, Resource relation, Listener<Resource> procedure);
445 * @see ReadGraph#getSingleObject(Resource, Resource)
447 void forSingleObject(Resource subject, Resource relation, AsyncProcedure<Resource> procedure);
449 * @see ReadGraph#getSingleObject(Resource, Resource)
451 void forSingleObject(Resource subject, Resource relation, SyncProcedure<Resource> procedure);
453 * @see ReadGraph#getSingleObject(Resource, Resource)
455 void forSingleObject(Resource subject, Resource relation, Procedure<Resource> procedure);
458 * @see ReadGraph#getSingleStatement(Resource, Resource)
460 void forSingleStatement(Resource subject, Resource relation, AsyncListener<Statement> procedure);
462 * @see ReadGraph#getSingleStatement(Resource, Resource)
464 void forSingleStatement(Resource subject, Resource relation, SyncListener<Statement> procedure);
466 * @see ReadGraph#getSingleStatement(Resource, Resource)
468 void forSingleStatement(Resource subject, Resource relation, Listener<Statement> procedure);
470 * @see ReadGraph#getSingleStatement(Resource, Resource)
472 void forSingleStatement(Resource subject, Resource relation, AsyncProcedure<Statement> procedure);
474 * @see ReadGraph#getSingleStatement(Resource, Resource)
476 void forSingleStatement(Resource subject, Resource relation, SyncProcedure<Statement> procedure);
478 * @see ReadGraph#getSingleStatement(Resource, Resource)
480 void forSingleStatement(Resource subject, Resource relation, Procedure<Statement> procedure);
483 * @see ReadGraph#getSingleType(Resource, Resource)
485 void forSingleType(Resource subject, AsyncListener<Resource> procedure);
487 * @see ReadGraph#getSingleType(Resource, Resource)
489 void forSingleType(Resource subject, SyncListener<Resource> procedure);
491 * @see ReadGraph#getSingleType(Resource, Resource)
493 void forSingleType(Resource subject, Listener<Resource> procedure);
495 * @see ReadGraph#getSingleType(Resource, Resource)
497 void forSingleType(Resource subject, AsyncProcedure<Resource> procedure);
499 * @see ReadGraph#getSingleType(Resource, Resource)
501 void forSingleType(Resource subject, SyncProcedure<Resource> procedure);
503 * @see ReadGraph#getSingleType(Resource, Resource)
505 void forSingleType(Resource subject, Procedure<Resource> procedure);
508 * @see ReadGraph#getSingleType(Resource, Resource)
510 void forSingleType(Resource subject, Resource baseType, AsyncListener<Resource> procedure);
512 * @see ReadGraph#getSingleType(Resource, Resource)
514 void forSingleType(Resource subject, Resource baseType, SyncListener<Resource> procedure);
516 * @see ReadGraph#getSingleType(Resource, Resource)
518 void forSingleType(Resource subject, Resource baseType, Listener<Resource> procedure);
520 * @see ReadGraph#getSingleType(Resource, Resource)
522 void forSingleType(Resource subject, Resource baseType, AsyncProcedure<Resource> procedure);
524 * @see ReadGraph#getSingleType(Resource, Resource)
526 void forSingleType(Resource subject, Resource baseType, SyncProcedure<Resource> procedure);
528 * @see ReadGraph#getSingleType(Resource, Resource)
530 void forSingleType(Resource subject, Resource baseType, Procedure<Resource> procedure);
533 * @see ReadGraph#getValue(Resource)
535 <T> void forValue(Resource subject, AsyncListener<T> procedure);
537 * @see ReadGraph#getValue(Resource)
539 <T> void forValue(Resource subject, SyncListener<T> procedure);
541 * @see ReadGraph#getValue(Resource)
543 <T> void forValue(Resource subject, Listener<T> procedure);
545 * @see ReadGraph#getValue(Resource)
547 <T> void forValue(Resource subject, AsyncProcedure<T> procedure);
549 * @see ReadGraph#getValue(Resource)
551 <T> void forValue(Resource subject, SyncProcedure<T> procedure);
553 * @see ReadGraph#getValue(Resource)
555 <T> void forValue(Resource subject, Procedure<T> procedure);
558 * @see ReadGraph#getValue(Resource)
560 <T> void forValue(Resource subject, Binding binding, AsyncListener<T> procedure);
562 * @see ReadGraph#getValue(Resource)
564 <T> void forValue(Resource subject, Binding binding, SyncListener<T> procedure);
566 * @see ReadGraph#getValue(Resource)
568 <T> void forValue(Resource subject, Binding binding, Listener<T> procedure);
570 * @see ReadGraph#getValue(Resource)
572 <T> void forValue(Resource subject, Binding binding, AsyncProcedure<T> procedure);
574 * @see ReadGraph#getValue(Resource)
576 <T> void forValue(Resource subject, Binding binding, SyncProcedure<T> procedure);
578 * @see ReadGraph#getValue(Resource)
580 <T> void forValue(Resource subject, Binding binding, Procedure<T> procedure);
583 * @see ReadGraph#getRelatedValue(Resource, Resource)
585 <T> void forRelatedValue(Resource subject, Resource relation, AsyncListener<T> procedure);
587 * @see ReadGraph#getRelatedValue(Resource, Resource)
589 <T> void forRelatedValue(Resource subject, Resource relation, SyncListener<T> procedure);
591 * @see ReadGraph#getRelatedValue(Resource, Resource)
593 <T> void forRelatedValue(Resource subject, Resource relation, Listener<T> procedure);
595 * @see ReadGraph#getRelatedValue(Resource, Resource)
597 <T> void forRelatedValue(Resource subject, Resource relation, AsyncProcedure<T> procedure);
599 * @see ReadGraph#getRelatedValue(Resource, Resource)
601 <T> void forRelatedValue(Resource subject, Resource relation, SyncProcedure<T> procedure);
603 * @see ReadGraph#getRelatedValue(Resource, Resource)
605 <T> void forRelatedValue(Resource subject, Resource relation, Procedure<T> procedure);
608 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
610 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, AsyncListener<T> procedure);
612 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
614 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, SyncListener<T> procedure);
616 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
618 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, Listener<T> procedure);
620 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
622 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, AsyncProcedure<T> procedure);
624 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
626 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, SyncProcedure<T> procedure);
628 * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
630 <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, Procedure<T> procedure);
633 * @see ReadGraph#adapt(Resource, Class)
635 <T> void forAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
637 * @see ReadGraph#adapt(Resource, Class)
639 <T> void forAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
641 * @see ReadGraph#adapt(Resource, Class)
643 <T> void forAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
645 * @see ReadGraph#adapt(Resource, Class)
647 <T> void forAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
649 * @see ReadGraph#adapt(Resource, Class)
651 <T> void forAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
653 * @see ReadGraph#adapt(Resource, Class)
655 <T> void forAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
658 * @see ReadGraph#adapt(Resource, Class)
660 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
662 * @see ReadGraph#adapt(Resource, Class)
664 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
666 * @see ReadGraph#adapt(Resource, Class)
668 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
670 * @see ReadGraph#adapt(Resource, Class)
672 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
674 * @see ReadGraph#adapt(Resource, Class)
676 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
678 * @see ReadGraph#adapt(Resource, Class)
680 <T> void forUniqueAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
683 * @see ReadGraph#getPossibleInverse(Resource)
685 void forPossibleInverse(Resource relation, AsyncListener<Resource> procedure);
687 * @see ReadGraph#getPossibleInverse(Resource)
689 void forPossibleInverse(Resource relation, SyncListener<Resource> procedure);
691 * @see ReadGraph#getPossibleInverse(Resource)
693 void forPossibleInverse(Resource relation, Listener<Resource> procedure);
695 * @see ReadGraph#getPossibleInverse(Resource)
697 void forPossibleInverse(Resource relation, AsyncProcedure<Resource> procedure);
699 * @see ReadGraph#getPossibleInverse(Resource)
701 void forPossibleInverse(Resource relation, SyncProcedure<Resource> procedure);
703 * @see ReadGraph#getPossibleInverse(Resource)
705 void forPossibleInverse(Resource relation, Procedure<Resource> procedure);
708 * @see ReadGraph#getPossibleObject(Resource, Resource)
710 void forPossibleObject(Resource subject, Resource relation, AsyncListener<Resource> procedure);
712 * @see ReadGraph#getPossibleObject(Resource, Resource)
714 void forPossibleObject(Resource subject, Resource relation, SyncListener<Resource> procedure);
716 * @see ReadGraph#getPossibleObject(Resource, Resource)
718 void forPossibleObject(Resource subject, Resource relation, Listener<Resource> procedure);
720 * @see ReadGraph#getPossibleObject(Resource, Resource)
722 void forPossibleObject(Resource subject, Resource relation, AsyncProcedure<Resource> procedure);
724 * @see ReadGraph#getPossibleObject(Resource, Resource)
726 void forPossibleObject(Resource subject, Resource relation, SyncProcedure<Resource> procedure);
728 * @see ReadGraph#getPossibleObject(Resource, Resource)
730 void forPossibleObject(Resource subject, Resource relation, Procedure<Resource> procedure);
733 * @see ReadGraph#getPossibleStatement(Resource, Resource)
735 void forPossibleStatement(Resource subject, Resource relation, AsyncListener<Statement> procedure);
737 * @see ReadGraph#getPossibleStatement(Resource, Resource)
739 void forPossibleStatement(Resource subject, Resource relation, SyncListener<Statement> procedure);
741 * @see ReadGraph#getPossibleStatement(Resource, Resource)
743 void forPossibleStatement(Resource subject, Resource relation, Listener<Statement> procedure);
745 * @see ReadGraph#getPossibleStatement(Resource, Resource)
747 void forPossibleStatement(Resource subject, Resource relation, AsyncProcedure<Statement> procedure);
749 * @see ReadGraph#getPossibleStatement(Resource, Resource)
751 void forPossibleStatement(Resource subject, Resource relation, SyncProcedure<Statement> procedure);
753 * @see ReadGraph#getPossibleStatement(Resource, Resource)
755 void forPossibleStatement(Resource subject, Resource relation, Procedure<Statement> procedure);
758 * @see ReadGraph#getPossibleType(Resource, Resource)
760 void forPossibleType(Resource subject, Resource baseType, AsyncListener<Resource> procedure);
762 * @see ReadGraph#getPossibleType(Resource, Resource)
764 void forPossibleType(Resource subject, Resource baseType, SyncListener<Resource> procedure);
766 * @see ReadGraph#getPossibleType(Resource, Resource)
768 void forPossibleType(Resource subject, Resource baseType, Listener<Resource> procedure);
770 * @see ReadGraph#getPossibleType(Resource, Resource)
772 void forPossibleType(Resource subject, Resource baseType, AsyncProcedure<Resource> procedure);
774 * @see ReadGraph#getPossibleType(Resource, Resource)
776 void forPossibleType(Resource subject, Resource baseType, SyncProcedure<Resource> procedure);
778 * @see ReadGraph#getPossibleType(Resource, Resource)
780 void forPossibleType(Resource subject, Resource baseType, Procedure<Resource> procedure);
783 * @see ReadGraph#getPossibleValue(Resource)
785 <T> void forPossibleValue(Resource subject, AsyncListener<T> procedure);
787 * @see ReadGraph#getPossibleValue(Resource)
789 <T> void forPossibleValue(Resource subject, SyncListener<T> procedure);
791 * @see ReadGraph#getPossibleValue(Resource)
793 <T> void forPossibleValue(Resource subject, Listener<T> procedure);
795 * @see ReadGraph#getPossibleValue(Resource)
797 <T> void forPossibleValue(Resource subject, AsyncProcedure<T> procedure);
799 * @see ReadGraph#getPossibleValue(Resource)
801 <T> void forPossibleValue(Resource subject, SyncProcedure<T> procedure);
803 * @see ReadGraph#getPossibleValue(Resource)
805 <T> void forPossibleValue(Resource subject, Procedure<T> procedure);
808 * @see ReadGraph#getPossibleValue(Resource, Binding)
810 <T> void forPossibleValue(Resource subject, Binding binding, AsyncListener<T> procedure);
812 * @see ReadGraph#getPossibleValue(Resource, Binding)
814 <T> void forPossibleValue(Resource subject, Binding binding, SyncListener<T> procedure);
816 * @see ReadGraph#getPossibleValue(Resource, Binding)
818 <T> void forPossibleValue(Resource subject, Binding binding, Listener<T> procedure);
820 * @see ReadGraph#getPossibleValue(Resource, Binding)
822 <T> void forPossibleValue(Resource subject, Binding binding, AsyncProcedure<T> procedure);
824 * @see ReadGraph#getPossibleValue(Resource, Binding)
826 <T> void forPossibleValue(Resource subject, Binding binding, SyncProcedure<T> procedure);
828 * @see ReadGraph#getPossibleValue(Resource, Binding)
830 <T> void forPossibleValue(Resource subject, Binding binding, Procedure<T> procedure);
833 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
835 <T> void forPossibleRelatedValue(Resource subject, Resource relation, AsyncListener<T> procedure);
837 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
839 <T> void forPossibleRelatedValue(Resource subject, Resource relation, SyncListener<T> procedure);
841 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
843 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Listener<T> procedure);
845 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
847 <T> void forPossibleRelatedValue(Resource subject, Resource relation, AsyncProcedure<T> procedure);
849 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
851 <T> void forPossibleRelatedValue(Resource subject, Resource relation, SyncProcedure<T> procedure);
853 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
855 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Procedure<T> procedure);
858 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
860 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, AsyncListener<T> procedure);
862 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
864 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, SyncListener<T> procedure);
866 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
868 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, Listener<T> procedure);
870 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
872 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, AsyncProcedure<T> procedure);
874 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
876 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, SyncProcedure<T> procedure);
878 * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
880 <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, Procedure<T> procedure);
883 * @see ReadGraph#getPossibleAdapter(Resource, Class)
885 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
887 * @see ReadGraph#getPossibleAdapter(Resource, Class)
889 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
891 * @see ReadGraph#getPossibleAdapter(Resource, Class)
893 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
895 * @see ReadGraph#getPossibleAdapter(Resource, Class)
897 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
899 * @see ReadGraph#getPossibleAdapter(Resource, Class)
901 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
903 * @see ReadGraph#getPossibleAdapter(Resource, Class)
905 <T> void forPossibleAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
908 * @see ReadGraph#getPossibleAdapter(Resource, Class)
910 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
912 * @see ReadGraph#getPossibleAdapter(Resource, Class)
914 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
916 * @see ReadGraph#getPossibleAdapter(Resource, Class)
918 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
920 * @see ReadGraph#getPossibleAdapter(Resource, Class)
922 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
924 * @see ReadGraph#getPossibleAdapter(Resource, Class)
926 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
928 * @see ReadGraph#getPossibleAdapter(Resource, Class)
930 <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
933 * @see ReadGraph#isInstanceOf(Resource, Resource)
935 void forIsInstanceOf(Resource resource, Resource type, AsyncListener<Boolean> procedure);
937 * @see ReadGraph#isInstanceOf(Resource, Resource)
939 void forIsInstanceOf(Resource resource, Resource type, SyncListener<Boolean> procedure);
941 * @see ReadGraph#isInstanceOf(Resource, Resource)
943 void forIsInstanceOf(Resource resource, Resource type, Listener<Boolean> procedure);
945 * @see ReadGraph#isInstanceOf(Resource, Resource)
947 void forIsInstanceOf(Resource resource, Resource type, AsyncProcedure<Boolean> procedure);
949 * @see ReadGraph#isInstanceOf(Resource, Resource)
951 void forIsInstanceOf(Resource resource, Resource type, SyncProcedure<Boolean> procedure);
953 * @see ReadGraph#isInstanceOf(Resource, Resource)
955 void forIsInstanceOf(Resource resource, Resource type, Procedure<Boolean> procedure);
958 * @see ReadGraph#isInheritedFrom(Resource, Resource)
960 void forIsInheritedFrom(Resource resource, Resource type, AsyncListener<Boolean> procedure);
962 * @see ReadGraph#isInheritedFrom(Resource, Resource)
964 void forIsInheritedFrom(Resource resource, Resource type, SyncListener<Boolean> procedure);
966 * @see ReadGraph#isInheritedFrom(Resource, Resource)
968 void forIsInheritedFrom(Resource resource, Resource type, Listener<Boolean> procedure);
970 * @see ReadGraph#isInheritedFrom(Resource, Resource)
972 void forIsInheritedFrom(Resource resource, Resource type, AsyncProcedure<Boolean> procedure);
974 * @see ReadGraph#isInheritedFrom(Resource, Resource)
976 void forIsInheritedFrom(Resource resource, Resource type, SyncProcedure<Boolean> procedure);
978 * @see ReadGraph#isInheritedFrom(Resource, Resource)
980 void forIsInheritedFrom(Resource resource, Resource type, Procedure<Boolean> procedure);
983 * @see ReadGraph#isSubrelationOf(Resource, Resource)
985 void forIsSubrelationOf(Resource resource, Resource relation, AsyncListener<Boolean> procedure);
987 * @see ReadGraph#isSubrelationOf(Resource, Resource)
989 void forIsSubrelationOf(Resource resource, Resource relation, SyncListener<Boolean> procedure);
991 * @see ReadGraph#isSubrelationOf(Resource, Resource)
993 void forIsSubrelationOf(Resource resource, Resource relation, Listener<Boolean> procedure);
995 * @see ReadGraph#isSubrelationOf(Resource, Resource)
997 void forIsSubrelationOf(Resource resource, Resource relation, AsyncProcedure<Boolean> procedure);
999 * @see ReadGraph#isSubrelationOf(Resource, Resource)
1001 void forIsSubrelationOf(Resource resource, Resource relation, SyncProcedure<Boolean> procedure);
1003 * @see ReadGraph#isSubrelationOf(Resource, Resource)
1005 void forIsSubrelationOf(Resource resource, Resource relation, Procedure<Boolean> procedure);
1008 * @see ReadGraph#hasStatement(Resource)
1010 void forHasStatement(Resource subject, AsyncListener<Boolean> procedure);
1012 * @see ReadGraph#hasStatement(Resource)
1014 void forHasStatement(Resource subject, SyncListener<Boolean> procedure);
1016 * @see ReadGraph#hasStatement(Resource)
1018 void forHasStatement(Resource subject, Listener<Boolean> procedure);
1020 * @see ReadGraph#hasStatement(Resource)
1022 void forHasStatement(Resource subject, AsyncProcedure<Boolean> procedure);
1024 * @see ReadGraph#hasStatement(Resource)
1026 void forHasStatement(Resource subject, SyncProcedure<Boolean> procedure);
1028 * @see ReadGraph#hasStatement(Resource)
1030 void forHasStatement(Resource subject, Procedure<Boolean> procedure);
1033 * @see ReadGraph#hasStatement(Resource, Resource)
1035 void forHasStatement(Resource subject, Resource relation, AsyncListener<Boolean> procedure);
1037 * @see ReadGraph#hasStatement(Resource, Resource)
1039 void forHasStatement(Resource subject, Resource relation, SyncListener<Boolean> procedure);
1041 * @see ReadGraph#hasStatement(Resource, Resource)
1043 void forHasStatement(Resource subject, Resource relation, Listener<Boolean> procedure);
1045 * @see ReadGraph#hasStatement(Resource, Resource)
1047 void forHasStatement(Resource subject, Resource relation, AsyncProcedure<Boolean> procedure);
1049 * @see ReadGraph#hasStatement(Resource, Resource)
1051 void forHasStatement(Resource subject, Resource relation, SyncProcedure<Boolean> procedure);
1053 * @see ReadGraph#hasStatement(Resource, Resource)
1055 void forHasStatement(Resource subject, Resource relation, Procedure<Boolean> procedure);
1058 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1060 void forHasStatement(Resource subject, Resource relation, Resource object, AsyncListener<Boolean> procedure);
1062 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1064 void forHasStatement(Resource subject, Resource relation, Resource object, SyncListener<Boolean> procedure);
1066 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1068 void forHasStatement(Resource subject, Resource relation, Resource object, Listener<Boolean> procedure);
1070 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1072 void forHasStatement(Resource subject, Resource relation, Resource object, AsyncProcedure<Boolean> procedure);
1074 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1076 void forHasStatement(Resource subject, Resource relation, Resource object, SyncProcedure<Boolean> procedure);
1078 * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1080 void forHasStatement(Resource subject, Resource relation, Resource object, Procedure<Boolean> procedure);
1083 * @see ReadGraph#hasValue(Resource)
1085 void forHasValue(Resource subject, AsyncListener<Boolean> procedure);
1087 * @see ReadGraph#hasValue(Resource)
1089 void forHasValue(Resource subject, SyncListener<Boolean> procedure);
1091 * @see ReadGraph#hasValue(Resource)
1093 void forHasValue(Resource subject, Listener<Boolean> procedure);
1095 * @see ReadGraph#hasValue(Resource)
1097 void forHasValue(Resource subject, AsyncProcedure<Boolean> procedure);
1099 * @see ReadGraph#hasValue(Resource)
1101 void forHasValue(Resource subject, SyncProcedure<Boolean> procedure);
1103 * @see ReadGraph#hasValue(Resource)
1105 void forHasValue(Resource subject, Procedure<Boolean> procedure);
1108 * @see ReadGraph#getTypes(Resource)
1110 void forOrderedSet(Resource subject, AsyncMultiListener<Resource> procedure);
1112 * @see ReadGraph#getTypes(Resource)
1114 void forOrderedSet(Resource subject, SyncMultiListener<Resource> procedure);
1116 * @see ReadGraph#getTypes(Resource)
1118 void forOrderedSet(Resource subject, MultiListener<Resource> procedure);
1120 * @see ReadGraph#getTypes(Resource)
1122 void forOrderedSet(Resource subject, AsyncMultiProcedure<Resource> procedure);
1124 * @see ReadGraph#getTypes(Resource)
1126 void forOrderedSet(Resource subject, SyncMultiProcedure<Resource> procedure);
1128 * @see ReadGraph#getTypes(Resource)
1130 void forOrderedSet(Resource subject, MultiProcedure<Resource> procedure);
1136 boolean isImmutable(Resource resource) throws DatabaseException;