]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/AsyncReadGraph.java
Amendment to commit 373affcc
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / AsyncReadGraph.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db;
13
14 import java.util.Set;
15
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;
35
36 /**
37  * 
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}
43  * <p>
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
48  * {@link ReadGraph}
49  * 
50  * @version 0.7
51  * @author Antti Villberg
52  * @see RequestProcessor
53  * @see AsyncRequestProcessor
54  * @see ReadGraph
55  * @see Resource
56  * @see Statement
57  */
58 public interface AsyncReadGraph extends AsyncRequestProcessor {
59
60     /**
61      * @see ReadGraph#getURI(Resource)
62      */
63     void forURI(Resource resource, AsyncListener<String> procedure);
64     /**
65      * @see ReadGraph#getURI(Resource)
66      */
67     void forURI(Resource resource, SyncListener<String> procedure);
68     /**
69      * @see ReadGraph#getURI(Resource)
70      */
71     void forURI(Resource resource, Listener<String> procedure);
72     /**
73      * @see ReadGraph#getURI(Resource)
74      */
75     void forURI(Resource resource, AsyncProcedure<String> procedure);
76     /**
77      * @see ReadGraph#getURI(Resource)
78      */
79     void forURI(Resource resource, SyncProcedure<String> procedure);
80     /**
81      * @see ReadGraph#getURI(Resource)
82      */
83     void forURI(Resource resource, Procedure<String> procedure);
84
85     /**
86      * @see ReadGraph#getResourceByURI(String)
87      */
88     void forResource(String id, AsyncListener<Resource> procedure);
89     /**
90      * @see ReadGraph#getResourceByURI(String)
91      */
92     void forResource(String id, SyncListener<Resource> procedure);
93     /**
94      * @see ReadGraph#getResourceByURI(String)
95      */
96     void forResource(String id, Listener<Resource> procedure);
97     /**
98      * @see ReadGraph#getResourceByURI(String)
99      */
100     void forResource(String id, AsyncProcedure<Resource> procedure);
101     /**
102      * @see ReadGraph#getResourceByURI(String)
103      */
104     void forResource(String id, SyncProcedure<Resource> procedure);
105     /**
106      * @see ReadGraph#getResourceByURI(String)
107      */
108     void forResource(String id, Procedure<Resource> procedure);
109
110     /**
111      * @see ReadGraph#getBuiltin(String)
112      */
113     void forBuiltin(String id, AsyncListener<Resource> procedure);
114     /**
115      * @see ReadGraph#getBuiltin(String)
116      */
117     void forBuiltin(String id, SyncListener<Resource> procedure);
118     /**
119      * @see ReadGraph#getBuiltin(String)
120      */
121     void forBuiltin(String id, Listener<Resource> procedure);
122     /**
123      * @see ReadGraph#getBuiltin(String)
124      */
125     void forBuiltin(String id, AsyncProcedure<Resource> procedure);
126     /**
127      * @see ReadGraph#getBuiltin(String)
128      */
129     void forBuiltin(String id, SyncProcedure<Resource> procedure);
130     /**
131      * @see ReadGraph#getBuiltin(String)
132      */
133     void forBuiltin(String id, Procedure<Resource> procedure);
134
135     /**
136      * @see ReadGraph#getStatements(Resource, Resource)
137      */
138     void forEachStatement(Resource subject, Resource relation, AsyncMultiProcedure<Statement> procedure);
139     /**
140      * @see ReadGraph#getStatements(Resource, Resource)
141      */
142     void forEachStatement(Resource subject, Resource relation, SyncMultiProcedure<Statement> procedure);
143     /**
144      * @see ReadGraph#getStatements(Resource, Resource)
145      */
146     void forEachStatement(Resource subject, Resource relation, MultiProcedure<Statement> procedure);
147
148     /**
149      * @see ReadGraph#getStatements(Resource, Resource)
150      */
151     void forStatementSet(Resource subject, Resource relation, AsyncSetListener<Statement> procedure);
152     /**
153      * @see ReadGraph#getStatements(Resource, Resource)
154      */
155     void forStatementSet(Resource subject, Resource relation, SyncSetListener<Statement> procedure);
156     /**
157      * @see ReadGraph#getStatements(Resource, Resource)
158      */
159     void forStatementSet(Resource subject, Resource relation, SetListener<Statement> procedure);
160
161     /**
162      * @see ReadGraph#getAssertedStatements(Resource, Resource)
163      */
164     void forEachAssertedStatement(Resource subject, Resource relation, AsyncMultiProcedure<Statement> procedure);
165     /**
166      * @see ReadGraph#getAssertedStatements(Resource, Resource)
167      */
168     void forEachAssertedStatement(Resource subject, Resource relation, SyncMultiProcedure<Statement> procedure);
169     /**
170      * @see ReadGraph#getAssertedStatements(Resource, Resource)
171      */
172     void forEachAssertedStatement(Resource subject, Resource relation, MultiProcedure<Statement> procedure);
173
174     /**
175      * @see ReadGraph#getAssertedStatements(Resource, Resource)
176      */
177     void forAssertedStatementSet(Resource subject, Resource relation, AsyncSetListener<Statement> procedure);
178     /**
179      * @see ReadGraph#getAssertedStatements(Resource, Resource)
180      */
181     void forAssertedStatementSet(Resource subject, Resource relation, SyncSetListener<Statement> procedure);
182     /**
183      * @see ReadGraph#getAssertedStatements(Resource, Resource)
184      */
185     void forAssertedStatementSet(Resource subject, Resource relation, SetListener<Statement> procedure);
186
187     /**
188      * @see ReadGraph#getPredicates(Resource)
189      */
190     void forEachPredicate(Resource subject, AsyncMultiProcedure<Resource> procedure);
191     /**
192      * @see ReadGraph#getPredicates(Resource)
193      */
194     void forEachPredicate(Resource subject, SyncMultiProcedure<Resource> procedure);
195     /**
196      * @see ReadGraph#getPredicates(Resource)
197      */
198     void forEachPredicate(Resource subject, MultiProcedure<Resource> procedure);
199
200     /**
201      * @see ReadGraph#getPredicates(Resource)
202      */
203     void forPredicateSet(Resource subject, AsyncSetListener<Resource> procedure);
204     /**
205      * @see ReadGraph#getPredicates(Resource)
206      */
207     void forPredicateSet(Resource subject, SyncSetListener<Resource> procedure);
208     /**
209      * @see ReadGraph#getPredicates(Resource)
210      */
211     void forPredicateSet(Resource subject, SetListener<Resource> procedure);
212
213     /**
214      * @see ReadGraph#getPrincipalTypes(Resource)
215      */
216     void forEachPrincipalType(Resource subject, AsyncMultiProcedure<Resource> procedure);
217     /**
218      * @see ReadGraph#getPrincipalTypes(Resource)
219      */
220     void forEachPrincipalType(Resource subject, SyncMultiProcedure<Resource> procedure);
221     /**
222      * @see ReadGraph#getPrincipalTypes(Resource)
223      */
224     void forEachPrincipalType(Resource subject, MultiProcedure<Resource> procedure);
225
226     /**
227      * @see ReadGraph#getPrincipalTypes(Resource)
228      */
229     void forPrincipalTypeSet(Resource subject, AsyncSetListener<Resource> procedure);
230     /**
231      * @see ReadGraph#getPrincipalTypes(Resource)
232      */
233     void forPrincipalTypeSet(Resource subject, SyncSetListener<Resource> procedure);
234     /**
235      * @see ReadGraph#getPrincipalTypes(Resource)
236      */
237     void forPrincipalTypeSet(Resource subject, SetListener<Resource> procedure);
238
239     /**
240      * @see ReadGraph#getTypes(Resource)
241      */
242     void forTypes(Resource subject, AsyncListener<Set<Resource>> procedure);
243     /**
244      * @see ReadGraph#getTypes(Resource)
245      */
246     void forTypes(Resource subject, SyncListener<Set<Resource>> procedure);
247     /**
248      * @see ReadGraph#getTypes(Resource)
249      */
250     void forTypes(Resource subject, Listener<Set<Resource>> procedure);
251     /**
252      * @see ReadGraph#getTypes(Resource)
253      */
254     void forTypes(Resource subject, AsyncProcedure<Set<Resource>> procedure);
255     /**
256      * @see ReadGraph#getTypes(Resource)
257      */
258     void forTypes(Resource subject, SyncProcedure<Set<Resource>> procedure);
259     /**
260      * @see ReadGraph#getTypes(Resource)
261      */
262     void forTypes(Resource subject, Procedure<Set<Resource>> procedure);
263
264     /**
265      * @see ReadGraph#getSupertypes(Resource)
266      */
267     void forSupertypes(Resource subject, AsyncListener<Set<Resource>> procedure);
268     /**
269      * @see ReadGraph#getSupertypes(Resource)
270      */
271     void forSupertypes(Resource subject, SyncListener<Set<Resource>> procedure);
272     /**
273      * @see ReadGraph#getSupertypes(Resource)
274      */
275     void forSupertypes(Resource subject, Listener<Set<Resource>> procedure);
276     /**
277      * @see ReadGraph#getSupertypes(Resource)
278      */
279     void forSupertypes(Resource subject, AsyncProcedure<Set<Resource>> procedure);
280     /**
281      * @see ReadGraph#getSupertypes(Resource)
282      */
283     void forSupertypes(Resource subject, SyncProcedure<Set<Resource>> procedure);
284     /**
285      * @see ReadGraph#getSupertypes(Resource)
286      */
287     void forSupertypes(Resource subject, Procedure<Set<Resource>> procedure);
288
289     /**
290      * @see ReadGraph#getSuperrelations(Resource)
291      */
292     void forDirectSuperrelations(Resource subject, AsyncMultiProcedure<Resource> procedure);
293
294     /**
295      * @see ReadGraph#getSuperrelations(Resource)
296      */
297     void forPossibleSuperrelation(Resource subject, AsyncProcedure<Resource> procedure);
298
299     /**
300      * @see ReadGraph#getSuperrelations(Resource)
301      */
302     void forSuperrelations(Resource subject, AsyncListener<Set<Resource>> procedure);
303     /**
304      * @see ReadGraph#getSuperrelations(Resource)
305      */
306     void forSuperrelations(Resource subject, SyncListener<Set<Resource>> procedure);
307     /**
308      * @see ReadGraph#getSuperrelations(Resource)
309      */
310     void forSuperrelations(Resource subject, Listener<Set<Resource>> procedure);
311     /**
312      * @see ReadGraph#getSuperrelations(Resource)
313      */
314     void forSuperrelations(Resource subject, AsyncProcedure<Set<Resource>> procedure);
315     /**
316      * @see ReadGraph#getSuperrelations(Resource)
317      */
318     void forSuperrelations(Resource subject, SyncProcedure<Set<Resource>> procedure);
319     /**
320      * @see ReadGraph#getSuperrelations(Resource)
321      */
322     void forSuperrelations(Resource subject, Procedure<Set<Resource>> procedure);
323
324     /**
325      * 
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
329      * 
330      * @see ReadGraph#getObjects(Resource, Resource)
331      */
332     void forEachObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
333     /**
334      * @see ReadGraph#getObjects(Resource, Resource)
335      */
336     void forEachObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
337     /**
338      * @see ReadGraph#getObjects(Resource, Resource)
339      */
340     void forEachObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
341
342     /**
343      * @see ReadGraph#getObjects(Resource, Resource)
344      */
345 //    void forEachDirectObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
346 //    /**
347 //     * @see ReadGraph#getObjects(Resource, Resource)
348 //     */
349 //    void forEachDirectObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
350 //    /**
351 //     * @see ReadGraph#getObjects(Resource, Resource)
352 //     */
353 //    void forEachDirectObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
354
355     /**
356      * @see ReadGraph#getObjects(Resource, Resource)
357      */
358     void forEachDirectPredicate(Resource subject, AsyncMultiProcedure<Resource> procedure);
359     /**
360      * @see ReadGraph#getObjects(Resource, Resource)
361      */
362     void forEachDirectPredicate(Resource subject, SyncMultiProcedure<Resource> procedure);
363     /**
364      * @see ReadGraph#getObjects(Resource, Resource)
365      */
366     void forEachDirectPredicate(Resource subject, MultiProcedure<Resource> procedure);
367
368     /**
369      * @see ReadGraph#getObjects(Resource, Resource)
370      */
371     void forObjectSet(Resource subject, Resource relation, AsyncSetListener<Resource> procedure);
372     /**
373      * @see ReadGraph#getObjects(Resource, Resource)
374      */
375     void forObjectSet(Resource subject, Resource relation, SyncSetListener<Resource> procedure);
376     /**
377      * @see ReadGraph#getObjects(Resource, Resource)
378      */
379     void forObjectSet(Resource subject, Resource relation, SetListener<Resource> procedure);
380
381     /**
382      * @see ReadGraph#getAssertedObjects(Resource, Resource)
383      */
384     void forEachAssertedObject(Resource subject, Resource relation, AsyncMultiProcedure<Resource> procedure);
385     /**
386      * @see ReadGraph#getAssertedObjects(Resource, Resource)
387      */
388     void forEachAssertedObject(Resource subject, Resource relation, SyncMultiProcedure<Resource> procedure);
389     /**
390      * @see ReadGraph#getAssertedObjects(Resource, Resource)
391      */
392     void forEachAssertedObject(Resource subject, Resource relation, MultiProcedure<Resource> procedure);
393
394     /**
395      * @see ReadGraph#getAssertedObjects(Resource, Resource)
396      */
397     void forAssertedObjectSet(Resource subject, Resource relation, AsyncSetListener<Resource> procedure);
398     /**
399      * @see ReadGraph#getAssertedObjects(Resource, Resource)
400      */
401     void forAssertedObjectSet(Resource subject, Resource relation, SyncSetListener<Resource> procedure);
402     /**
403      * @see ReadGraph#getAssertedObjects(Resource, Resource)
404      */
405     void forAssertedObjectSet(Resource subject, Resource relation, SetListener<Resource> procedure);
406
407     /**
408      * @see ReadGraph#getInverse(Resource)
409      */
410     void forInverse(Resource relation, AsyncListener<Resource> procedure);
411     /**
412      * @see ReadGraph#getInverse(Resource)
413      */
414     void forInverse(Resource relation, SyncListener<Resource> procedure);
415     /**
416      * @see ReadGraph#getInverse(Resource)
417      */
418     void forInverse(Resource relation, Listener<Resource> procedure);
419     /**
420      * @see ReadGraph#getInverse(Resource)
421      */
422     void forInverse(Resource relation, AsyncProcedure<Resource> procedure);
423     /**
424      * @see ReadGraph#getInverse(Resource)
425      */
426     void forInverse(Resource relation, SyncProcedure<Resource> procedure);
427     /**
428      * @see ReadGraph#getInverse(Resource)
429      */
430     void forInverse(Resource relation, Procedure<Resource> procedure);
431
432     /**
433      * @see ReadGraph#getSingleObject(Resource, Resource)
434      */
435     void forSingleObject(Resource subject, Resource relation, AsyncListener<Resource> procedure);
436     /**
437      * @see ReadGraph#getSingleObject(Resource, Resource)
438      */
439     void forSingleObject(Resource subject, Resource relation, SyncListener<Resource> procedure);
440     /**
441      * @see ReadGraph#getSingleObject(Resource, Resource)
442      */
443     void forSingleObject(Resource subject, Resource relation, Listener<Resource> procedure);
444     /**
445      * @see ReadGraph#getSingleObject(Resource, Resource)
446      */
447     void forSingleObject(Resource subject, Resource relation, AsyncProcedure<Resource> procedure);
448     /**
449      * @see ReadGraph#getSingleObject(Resource, Resource)
450      */
451     void forSingleObject(Resource subject, Resource relation, SyncProcedure<Resource> procedure);
452     /**
453      * @see ReadGraph#getSingleObject(Resource, Resource)
454      */
455     void forSingleObject(Resource subject, Resource relation, Procedure<Resource> procedure);
456
457     /**
458      * @see ReadGraph#getSingleStatement(Resource, Resource)
459      */
460     void forSingleStatement(Resource subject, Resource relation, AsyncListener<Statement> procedure);
461     /**
462      * @see ReadGraph#getSingleStatement(Resource, Resource)
463      */
464     void forSingleStatement(Resource subject, Resource relation, SyncListener<Statement> procedure);
465     /**
466      * @see ReadGraph#getSingleStatement(Resource, Resource)
467      */
468     void forSingleStatement(Resource subject, Resource relation, Listener<Statement> procedure);
469     /**
470      * @see ReadGraph#getSingleStatement(Resource, Resource)
471      */
472     void forSingleStatement(Resource subject, Resource relation, AsyncProcedure<Statement> procedure);
473     /**
474      * @see ReadGraph#getSingleStatement(Resource, Resource)
475      */
476     void forSingleStatement(Resource subject, Resource relation, SyncProcedure<Statement> procedure);
477     /**
478      * @see ReadGraph#getSingleStatement(Resource, Resource)
479      */
480     void forSingleStatement(Resource subject, Resource relation, Procedure<Statement> procedure);
481
482     /**
483      * @see ReadGraph#getSingleType(Resource, Resource)
484      */
485     void forSingleType(Resource subject, AsyncListener<Resource> procedure);
486     /**
487      * @see ReadGraph#getSingleType(Resource, Resource)
488      */
489     void forSingleType(Resource subject, SyncListener<Resource> procedure);
490     /**
491      * @see ReadGraph#getSingleType(Resource, Resource)
492      */
493     void forSingleType(Resource subject, Listener<Resource> procedure);
494     /**
495      * @see ReadGraph#getSingleType(Resource, Resource)
496      */
497     void forSingleType(Resource subject, AsyncProcedure<Resource> procedure);
498     /**
499      * @see ReadGraph#getSingleType(Resource, Resource)
500      */
501     void forSingleType(Resource subject, SyncProcedure<Resource> procedure);
502     /**
503      * @see ReadGraph#getSingleType(Resource, Resource)
504      */
505     void forSingleType(Resource subject, Procedure<Resource> procedure);
506
507     /**
508      * @see ReadGraph#getSingleType(Resource, Resource)
509      */
510     void forSingleType(Resource subject, Resource baseType, AsyncListener<Resource> procedure);
511     /**
512      * @see ReadGraph#getSingleType(Resource, Resource)
513      */
514     void forSingleType(Resource subject, Resource baseType, SyncListener<Resource> procedure);
515     /**
516      * @see ReadGraph#getSingleType(Resource, Resource)
517      */
518     void forSingleType(Resource subject, Resource baseType, Listener<Resource> procedure);
519     /**
520      * @see ReadGraph#getSingleType(Resource, Resource)
521      */
522     void forSingleType(Resource subject, Resource baseType, AsyncProcedure<Resource> procedure);
523     /**
524      * @see ReadGraph#getSingleType(Resource, Resource)
525      */
526     void forSingleType(Resource subject, Resource baseType, SyncProcedure<Resource> procedure);
527     /**
528      * @see ReadGraph#getSingleType(Resource, Resource)
529      */
530     void forSingleType(Resource subject, Resource baseType, Procedure<Resource> procedure);
531
532     /**
533      * @see ReadGraph#getValue(Resource)
534      */
535     <T> void forValue(Resource subject, AsyncListener<T> procedure);
536     /**
537      * @see ReadGraph#getValue(Resource)
538      */
539     <T> void forValue(Resource subject, SyncListener<T> procedure);
540     /**
541      * @see ReadGraph#getValue(Resource)
542      */
543     <T> void forValue(Resource subject, Listener<T> procedure);
544     /**
545      * @see ReadGraph#getValue(Resource)
546      */
547     <T> void forValue(Resource subject, AsyncProcedure<T> procedure);
548     /**
549      * @see ReadGraph#getValue(Resource)
550      */
551     <T> void forValue(Resource subject, SyncProcedure<T> procedure);
552     /**
553      * @see ReadGraph#getValue(Resource)
554      */
555     <T> void forValue(Resource subject, Procedure<T> procedure);
556
557     /**
558      * @see ReadGraph#getValue(Resource)
559      */
560     <T> void forValue(Resource subject, Binding binding, AsyncListener<T> procedure);
561     /**
562      * @see ReadGraph#getValue(Resource)
563      */
564     <T> void forValue(Resource subject, Binding binding, SyncListener<T> procedure);
565     /**
566      * @see ReadGraph#getValue(Resource)
567      */
568     <T> void forValue(Resource subject, Binding binding, Listener<T> procedure);
569     /**
570      * @see ReadGraph#getValue(Resource)
571      */
572     <T> void forValue(Resource subject, Binding binding, AsyncProcedure<T> procedure);
573     /**
574      * @see ReadGraph#getValue(Resource)
575      */
576     <T> void forValue(Resource subject, Binding binding, SyncProcedure<T> procedure);
577     /**
578      * @see ReadGraph#getValue(Resource)
579      */
580     <T> void forValue(Resource subject, Binding binding, Procedure<T> procedure);
581
582     /**
583      * @see ReadGraph#getRelatedValue(Resource, Resource)
584      */
585     <T> void forRelatedValue(Resource subject, Resource relation, AsyncListener<T> procedure);
586     /**
587      * @see ReadGraph#getRelatedValue(Resource, Resource)
588      */
589     <T> void forRelatedValue(Resource subject, Resource relation, SyncListener<T> procedure);
590     /**
591      * @see ReadGraph#getRelatedValue(Resource, Resource)
592      */
593     <T> void forRelatedValue(Resource subject, Resource relation, Listener<T> procedure);
594     /**
595      * @see ReadGraph#getRelatedValue(Resource, Resource)
596      */
597     <T> void forRelatedValue(Resource subject, Resource relation, AsyncProcedure<T> procedure);
598     /**
599      * @see ReadGraph#getRelatedValue(Resource, Resource)
600      */
601     <T> void forRelatedValue(Resource subject, Resource relation, SyncProcedure<T> procedure);
602     /**
603      * @see ReadGraph#getRelatedValue(Resource, Resource)
604      */
605     <T> void forRelatedValue(Resource subject, Resource relation, Procedure<T> procedure);
606
607     /**
608      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
609      */
610     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, AsyncListener<T> procedure);
611     /**
612      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
613      */
614     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, SyncListener<T> procedure);
615     /**
616      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
617      */
618     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, Listener<T> procedure);
619     /**
620      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
621      */
622     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, AsyncProcedure<T> procedure);
623     /**
624      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
625      */
626     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, SyncProcedure<T> procedure);
627     /**
628      * @see ReadGraph#getRelatedValue(Resource, Resource, Binding)
629      */
630     <T> void forRelatedValue(Resource subject, Resource relation, Binding binding, Procedure<T> procedure);
631
632     /**
633      * @see ReadGraph#adapt(Resource, Class)
634      */
635     <T> void forAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
636     /**
637      * @see ReadGraph#adapt(Resource, Class)
638      */
639     <T> void forAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
640     /**
641      * @see ReadGraph#adapt(Resource, Class)
642      */
643     <T> void forAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
644     /**
645      * @see ReadGraph#adapt(Resource, Class)
646      */
647     <T> void forAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
648     /**
649      * @see ReadGraph#adapt(Resource, Class)
650      */
651     <T> void forAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
652     /**
653      * @see ReadGraph#adapt(Resource, Class)
654      */
655     <T> void forAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
656
657     /**
658      * @see ReadGraph#adapt(Resource, Class)
659      */
660     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
661     /**
662      * @see ReadGraph#adapt(Resource, Class)
663      */
664     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
665     /**
666      * @see ReadGraph#adapt(Resource, Class)
667      */
668     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
669     /**
670      * @see ReadGraph#adapt(Resource, Class)
671      */
672     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
673     /**
674      * @see ReadGraph#adapt(Resource, Class)
675      */
676     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
677     /**
678      * @see ReadGraph#adapt(Resource, Class)
679      */
680     <T> void forUniqueAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
681
682     /**
683      * @see ReadGraph#getPossibleInverse(Resource)
684      */
685     void forPossibleInverse(Resource relation, AsyncListener<Resource> procedure);
686     /**
687      * @see ReadGraph#getPossibleInverse(Resource)
688      */
689     void forPossibleInverse(Resource relation, SyncListener<Resource> procedure);
690     /**
691      * @see ReadGraph#getPossibleInverse(Resource)
692      */
693     void forPossibleInverse(Resource relation, Listener<Resource> procedure);
694     /**
695      * @see ReadGraph#getPossibleInverse(Resource)
696      */
697     void forPossibleInverse(Resource relation, AsyncProcedure<Resource> procedure);
698     /**
699      * @see ReadGraph#getPossibleInverse(Resource)
700      */
701     void forPossibleInverse(Resource relation, SyncProcedure<Resource> procedure);
702     /**
703      * @see ReadGraph#getPossibleInverse(Resource)
704      */
705     void forPossibleInverse(Resource relation, Procedure<Resource> procedure);
706
707     /**
708      * @see ReadGraph#getPossibleObject(Resource, Resource)
709      */
710     void forPossibleObject(Resource subject, Resource relation, AsyncListener<Resource> procedure);
711     /**
712      * @see ReadGraph#getPossibleObject(Resource, Resource)
713      */
714     void forPossibleObject(Resource subject, Resource relation, SyncListener<Resource> procedure);
715     /**
716      * @see ReadGraph#getPossibleObject(Resource, Resource)
717      */
718     void forPossibleObject(Resource subject, Resource relation, Listener<Resource> procedure);
719     /**
720      * @see ReadGraph#getPossibleObject(Resource, Resource)
721      */
722     void forPossibleObject(Resource subject, Resource relation, AsyncProcedure<Resource> procedure);
723     /**
724      * @see ReadGraph#getPossibleObject(Resource, Resource)
725      */
726     void forPossibleObject(Resource subject, Resource relation, SyncProcedure<Resource> procedure);
727     /**
728      * @see ReadGraph#getPossibleObject(Resource, Resource)
729      */
730     void forPossibleObject(Resource subject, Resource relation, Procedure<Resource> procedure);
731
732     /**
733      * @see ReadGraph#getPossibleStatement(Resource, Resource)
734      */
735     void forPossibleStatement(Resource subject, Resource relation, AsyncListener<Statement> procedure);
736     /**
737      * @see ReadGraph#getPossibleStatement(Resource, Resource)
738      */
739     void forPossibleStatement(Resource subject, Resource relation, SyncListener<Statement> procedure);
740     /**
741      * @see ReadGraph#getPossibleStatement(Resource, Resource)
742      */
743     void forPossibleStatement(Resource subject, Resource relation, Listener<Statement> procedure);
744     /**
745      * @see ReadGraph#getPossibleStatement(Resource, Resource)
746      */
747     void forPossibleStatement(Resource subject, Resource relation, AsyncProcedure<Statement> procedure);
748     /**
749      * @see ReadGraph#getPossibleStatement(Resource, Resource)
750      */
751     void forPossibleStatement(Resource subject, Resource relation, SyncProcedure<Statement> procedure);
752     /**
753      * @see ReadGraph#getPossibleStatement(Resource, Resource)
754      */
755     void forPossibleStatement(Resource subject, Resource relation, Procedure<Statement> procedure);
756
757     /**
758      * @see ReadGraph#getPossibleType(Resource, Resource)
759      */
760     void forPossibleType(Resource subject, Resource baseType, AsyncListener<Resource> procedure);
761     /**
762      * @see ReadGraph#getPossibleType(Resource, Resource)
763      */
764     void forPossibleType(Resource subject, Resource baseType, SyncListener<Resource> procedure);
765     /**
766      * @see ReadGraph#getPossibleType(Resource, Resource)
767      */
768     void forPossibleType(Resource subject, Resource baseType, Listener<Resource> procedure);
769     /**
770      * @see ReadGraph#getPossibleType(Resource, Resource)
771      */
772     void forPossibleType(Resource subject, Resource baseType, AsyncProcedure<Resource> procedure);
773     /**
774      * @see ReadGraph#getPossibleType(Resource, Resource)
775      */
776     void forPossibleType(Resource subject, Resource baseType, SyncProcedure<Resource> procedure);
777     /**
778      * @see ReadGraph#getPossibleType(Resource, Resource)
779      */
780     void forPossibleType(Resource subject, Resource baseType, Procedure<Resource> procedure);
781
782     /**
783      * @see ReadGraph#getPossibleValue(Resource)
784      */
785     <T> void forPossibleValue(Resource subject, AsyncListener<T> procedure);
786     /**
787      * @see ReadGraph#getPossibleValue(Resource)
788      */
789     <T> void forPossibleValue(Resource subject, SyncListener<T> procedure);
790     /**
791      * @see ReadGraph#getPossibleValue(Resource)
792      */
793     <T> void forPossibleValue(Resource subject, Listener<T> procedure);
794     /**
795      * @see ReadGraph#getPossibleValue(Resource)
796      */
797     <T> void forPossibleValue(Resource subject, AsyncProcedure<T> procedure);
798     /**
799      * @see ReadGraph#getPossibleValue(Resource)
800      */
801     <T> void forPossibleValue(Resource subject, SyncProcedure<T> procedure);
802     /**
803      * @see ReadGraph#getPossibleValue(Resource)
804      */
805     <T> void forPossibleValue(Resource subject, Procedure<T> procedure);
806
807     /**
808      * @see ReadGraph#getPossibleValue(Resource, Binding)
809      */
810     <T> void forPossibleValue(Resource subject, Binding binding, AsyncListener<T> procedure);
811     /**
812      * @see ReadGraph#getPossibleValue(Resource, Binding)
813      */
814     <T> void forPossibleValue(Resource subject, Binding binding, SyncListener<T> procedure);
815     /**
816      * @see ReadGraph#getPossibleValue(Resource, Binding)
817      */
818     <T> void forPossibleValue(Resource subject, Binding binding, Listener<T> procedure);
819     /**
820      * @see ReadGraph#getPossibleValue(Resource, Binding)
821      */
822     <T> void forPossibleValue(Resource subject, Binding binding, AsyncProcedure<T> procedure);
823     /**
824      * @see ReadGraph#getPossibleValue(Resource, Binding)
825      */
826     <T> void forPossibleValue(Resource subject, Binding binding, SyncProcedure<T> procedure);
827     /**
828      * @see ReadGraph#getPossibleValue(Resource, Binding)
829      */
830     <T> void forPossibleValue(Resource subject, Binding binding, Procedure<T> procedure);
831
832     /**
833      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
834      */
835     <T> void forPossibleRelatedValue(Resource subject, Resource relation, AsyncListener<T> procedure);
836     /**
837      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
838      */
839     <T> void forPossibleRelatedValue(Resource subject, Resource relation, SyncListener<T> procedure);
840     /**
841      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
842      */
843     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Listener<T> procedure);
844     /**
845      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
846      */
847     <T> void forPossibleRelatedValue(Resource subject, Resource relation, AsyncProcedure<T> procedure);
848     /**
849      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
850      */
851     <T> void forPossibleRelatedValue(Resource subject, Resource relation, SyncProcedure<T> procedure);
852     /**
853      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource)
854      */
855     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Procedure<T> procedure);
856
857     /**
858      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
859      */
860     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, AsyncListener<T> procedure);
861     /**
862      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
863      */
864     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, SyncListener<T> procedure);
865     /**
866      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
867      */
868     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, Listener<T> procedure);
869     /**
870      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
871      */
872     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, AsyncProcedure<T> procedure);
873     /**
874      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
875      */
876     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, SyncProcedure<T> procedure);
877     /**
878      * @see ReadGraph#getPossibleRelatedValue(Resource, Resource, Binding)
879      */
880     <T> void forPossibleRelatedValue(Resource subject, Resource relation, Binding binding, Procedure<T> procedure);
881
882     /**
883      * @see ReadGraph#getPossibleAdapter(Resource, Class)
884      */
885     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
886     /**
887      * @see ReadGraph#getPossibleAdapter(Resource, Class)
888      */
889     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
890     /**
891      * @see ReadGraph#getPossibleAdapter(Resource, Class)
892      */
893     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
894     /**
895      * @see ReadGraph#getPossibleAdapter(Resource, Class)
896      */
897     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
898     /**
899      * @see ReadGraph#getPossibleAdapter(Resource, Class)
900      */
901     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
902     /**
903      * @see ReadGraph#getPossibleAdapter(Resource, Class)
904      */
905     <T> void forPossibleAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
906
907     /**
908      * @see ReadGraph#getPossibleAdapter(Resource, Class)
909      */
910     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, AsyncListener<T> procedure);
911     /**
912      * @see ReadGraph#getPossibleAdapter(Resource, Class)
913      */
914     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, SyncListener<T> procedure);
915     /**
916      * @see ReadGraph#getPossibleAdapter(Resource, Class)
917      */
918     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, Listener<T> procedure);
919     /**
920      * @see ReadGraph#getPossibleAdapter(Resource, Class)
921      */
922     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, AsyncProcedure<T> procedure);
923     /**
924      * @see ReadGraph#getPossibleAdapter(Resource, Class)
925      */
926     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, SyncProcedure<T> procedure);
927     /**
928      * @see ReadGraph#getPossibleAdapter(Resource, Class)
929      */
930     <T> void forPossibleUniqueAdapted(Resource resource, Class<T> clazz, Procedure<T> procedure);
931
932     /**
933      * @see ReadGraph#isInstanceOf(Resource, Resource)
934      */
935     void forIsInstanceOf(Resource resource, Resource type, AsyncListener<Boolean> procedure);
936     /**
937      * @see ReadGraph#isInstanceOf(Resource, Resource)
938      */
939     void forIsInstanceOf(Resource resource, Resource type, SyncListener<Boolean> procedure);
940     /**
941      * @see ReadGraph#isInstanceOf(Resource, Resource)
942      */
943     void forIsInstanceOf(Resource resource, Resource type, Listener<Boolean> procedure);
944     /**
945      * @see ReadGraph#isInstanceOf(Resource, Resource)
946      */
947     void forIsInstanceOf(Resource resource, Resource type, AsyncProcedure<Boolean> procedure);
948     /**
949      * @see ReadGraph#isInstanceOf(Resource, Resource)
950      */
951     void forIsInstanceOf(Resource resource, Resource type, SyncProcedure<Boolean> procedure);
952     /**
953      * @see ReadGraph#isInstanceOf(Resource, Resource)
954      */
955     void forIsInstanceOf(Resource resource, Resource type, Procedure<Boolean> procedure);
956
957     /**
958      * @see ReadGraph#isInheritedFrom(Resource, Resource)
959      */
960     void forIsInheritedFrom(Resource resource, Resource type, AsyncListener<Boolean> procedure);
961     /**
962      * @see ReadGraph#isInheritedFrom(Resource, Resource)
963      */
964     void forIsInheritedFrom(Resource resource, Resource type, SyncListener<Boolean> procedure);
965     /**
966      * @see ReadGraph#isInheritedFrom(Resource, Resource)
967      */
968     void forIsInheritedFrom(Resource resource, Resource type, Listener<Boolean> procedure);
969     /**
970      * @see ReadGraph#isInheritedFrom(Resource, Resource)
971      */
972     void forIsInheritedFrom(Resource resource, Resource type, AsyncProcedure<Boolean> procedure);
973     /**
974      * @see ReadGraph#isInheritedFrom(Resource, Resource)
975      */
976     void forIsInheritedFrom(Resource resource, Resource type, SyncProcedure<Boolean> procedure);
977     /**
978      * @see ReadGraph#isInheritedFrom(Resource, Resource)
979      */
980     void forIsInheritedFrom(Resource resource, Resource type, Procedure<Boolean> procedure);
981
982     /**
983      * @see ReadGraph#isSubrelationOf(Resource, Resource)
984      */
985     void forIsSubrelationOf(Resource resource, Resource relation, AsyncListener<Boolean> procedure);
986     /**
987      * @see ReadGraph#isSubrelationOf(Resource, Resource)
988      */
989     void forIsSubrelationOf(Resource resource, Resource relation, SyncListener<Boolean> procedure);
990     /**
991      * @see ReadGraph#isSubrelationOf(Resource, Resource)
992      */
993     void forIsSubrelationOf(Resource resource, Resource relation, Listener<Boolean> procedure);
994     /**
995      * @see ReadGraph#isSubrelationOf(Resource, Resource)
996      */
997     void forIsSubrelationOf(Resource resource, Resource relation, AsyncProcedure<Boolean> procedure);
998     /**
999      * @see ReadGraph#isSubrelationOf(Resource, Resource)
1000      */
1001     void forIsSubrelationOf(Resource resource, Resource relation, SyncProcedure<Boolean> procedure);
1002     /**
1003      * @see ReadGraph#isSubrelationOf(Resource, Resource)
1004      */
1005     void forIsSubrelationOf(Resource resource, Resource relation, Procedure<Boolean> procedure);
1006
1007     /**
1008      * @see ReadGraph#hasStatement(Resource)
1009      */
1010     void forHasStatement(Resource subject, AsyncListener<Boolean> procedure);
1011     /**
1012      * @see ReadGraph#hasStatement(Resource)
1013      */
1014     void forHasStatement(Resource subject, SyncListener<Boolean> procedure);
1015     /**
1016      * @see ReadGraph#hasStatement(Resource)
1017      */
1018     void forHasStatement(Resource subject, Listener<Boolean> procedure);
1019     /**
1020      * @see ReadGraph#hasStatement(Resource)
1021      */
1022     void forHasStatement(Resource subject, AsyncProcedure<Boolean> procedure);
1023     /**
1024      * @see ReadGraph#hasStatement(Resource)
1025      */
1026     void forHasStatement(Resource subject, SyncProcedure<Boolean> procedure);
1027     /**
1028      * @see ReadGraph#hasStatement(Resource)
1029      */
1030     void forHasStatement(Resource subject, Procedure<Boolean> procedure);
1031
1032     /**
1033      * @see ReadGraph#hasStatement(Resource, Resource)
1034      */
1035     void forHasStatement(Resource subject, Resource relation, AsyncListener<Boolean> procedure);
1036     /**
1037      * @see ReadGraph#hasStatement(Resource, Resource)
1038      */
1039     void forHasStatement(Resource subject, Resource relation, SyncListener<Boolean> procedure);
1040     /**
1041      * @see ReadGraph#hasStatement(Resource, Resource)
1042      */
1043     void forHasStatement(Resource subject, Resource relation, Listener<Boolean> procedure);
1044     /**
1045      * @see ReadGraph#hasStatement(Resource, Resource)
1046      */
1047     void forHasStatement(Resource subject, Resource relation, AsyncProcedure<Boolean> procedure);
1048     /**
1049      * @see ReadGraph#hasStatement(Resource, Resource)
1050      */
1051     void forHasStatement(Resource subject, Resource relation, SyncProcedure<Boolean> procedure);
1052     /**
1053      * @see ReadGraph#hasStatement(Resource, Resource)
1054      */
1055     void forHasStatement(Resource subject, Resource relation, Procedure<Boolean> procedure);
1056
1057     /**
1058      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1059      */
1060     void forHasStatement(Resource subject, Resource relation, Resource object, AsyncListener<Boolean> procedure);
1061     /**
1062      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1063      */
1064     void forHasStatement(Resource subject, Resource relation, Resource object, SyncListener<Boolean> procedure);
1065     /**
1066      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1067      */
1068     void forHasStatement(Resource subject, Resource relation, Resource object, Listener<Boolean> procedure);
1069     /**
1070      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1071      */
1072     void forHasStatement(Resource subject, Resource relation, Resource object, AsyncProcedure<Boolean> procedure);
1073     /**
1074      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1075      */
1076     void forHasStatement(Resource subject, Resource relation, Resource object, SyncProcedure<Boolean> procedure);
1077     /**
1078      * @see ReadGraph#hasStatement(Resource, Resource, Resource)
1079      */
1080     void forHasStatement(Resource subject, Resource relation, Resource object, Procedure<Boolean> procedure);
1081
1082     /**
1083      * @see ReadGraph#hasValue(Resource)
1084      */
1085     void forHasValue(Resource subject, AsyncListener<Boolean> procedure);
1086     /**
1087      * @see ReadGraph#hasValue(Resource)
1088      */
1089     void forHasValue(Resource subject, SyncListener<Boolean> procedure);
1090     /**
1091      * @see ReadGraph#hasValue(Resource)
1092      */
1093     void forHasValue(Resource subject, Listener<Boolean> procedure);
1094     /**
1095      * @see ReadGraph#hasValue(Resource)
1096      */
1097     void forHasValue(Resource subject, AsyncProcedure<Boolean> procedure);
1098     /**
1099      * @see ReadGraph#hasValue(Resource)
1100      */
1101     void forHasValue(Resource subject, SyncProcedure<Boolean> procedure);
1102     /**
1103      * @see ReadGraph#hasValue(Resource)
1104      */
1105     void forHasValue(Resource subject, Procedure<Boolean> procedure);
1106
1107     /**
1108      * @see ReadGraph#getTypes(Resource)
1109      */
1110     void forOrderedSet(Resource subject, AsyncMultiListener<Resource> procedure);
1111     /**
1112      * @see ReadGraph#getTypes(Resource)
1113      */
1114     void forOrderedSet(Resource subject, SyncMultiListener<Resource> procedure);
1115     /**
1116      * @see ReadGraph#getTypes(Resource)
1117      */
1118     void forOrderedSet(Resource subject, MultiListener<Resource> procedure);
1119     /**
1120      * @see ReadGraph#getTypes(Resource)
1121      */
1122     void forOrderedSet(Resource subject, AsyncMultiProcedure<Resource> procedure);
1123     /**
1124      * @see ReadGraph#getTypes(Resource)
1125      */
1126     void forOrderedSet(Resource subject, SyncMultiProcedure<Resource> procedure);
1127     /**
1128      * @see ReadGraph#getTypes(Resource)
1129      */
1130     void forOrderedSet(Resource subject, MultiProcedure<Resource> procedure);
1131
1132     int thread();
1133 //    void inc();
1134 //    void dec();
1135     
1136     boolean isImmutable(Resource resource) throws DatabaseException;
1137     
1138 }