|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "nsIRDFDataSource.idl" |
|
7 |
|
8 interface nsISimpleEnumerator; |
|
9 |
|
10 /** |
|
11 * An nsIRDFCompositeDataSource composes individual data sources, providing |
|
12 * the illusion of a single, coherent RDF graph. |
|
13 */ |
|
14 [scriptable, uuid(96343820-307C-11D2-BC15-00805F912FE7)] |
|
15 interface nsIRDFCompositeDataSource : nsIRDFDataSource { |
|
16 |
|
17 /** |
|
18 * |
|
19 * Set this value to <code>true</code> if the composite datasource |
|
20 * may contains at least one datasource that has <em>negative</em> |
|
21 * assertions. (This is the default.) |
|
22 * |
|
23 * Set this value to <code>false</code> if none of the datasources |
|
24 * being composed contains a negative assertion. This allows the |
|
25 * composite datasource to perform some query optimizations. |
|
26 * |
|
27 * By default, this value is <code>true</true>. |
|
28 */ |
|
29 attribute boolean allowNegativeAssertions; |
|
30 |
|
31 /** |
|
32 * Set to <code>true</code> if the composite datasource should |
|
33 * take care to coalesce duplicate arcs when returning values from |
|
34 * queries. (This is the default.) |
|
35 * |
|
36 * Set to <code>false</code> if the composite datasource shouldn't |
|
37 * bother to check for duplicates. This allows the composite |
|
38 * datasource to more efficiently answer queries. |
|
39 * |
|
40 * By default, this value is <code>true</code>. |
|
41 */ |
|
42 attribute boolean coalesceDuplicateArcs; |
|
43 |
|
44 /** |
|
45 * Add a datasource the the composite data source. |
|
46 * @param aDataSource the datasource to add to composite |
|
47 */ |
|
48 void AddDataSource(in nsIRDFDataSource aDataSource); |
|
49 |
|
50 /** |
|
51 * Remove a datasource from the composite data source. |
|
52 * @param aDataSource the datasource to remove from the composite |
|
53 */ |
|
54 void RemoveDataSource(in nsIRDFDataSource aDataSource); |
|
55 |
|
56 /** |
|
57 * Retrieve the datasources in the composite data source. |
|
58 * @return an nsISimpleEnumerator that will enumerate each |
|
59 * of the datasources in the composite |
|
60 */ |
|
61 nsISimpleEnumerator GetDataSources(); |
|
62 }; |
|
63 |
|
64 %{C++ |
|
65 extern nsresult |
|
66 NS_NewRDFCompositeDataSource(nsIRDFCompositeDataSource** result); |
|
67 %} |
|
68 |