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/. */
6 #include
"nsIRDFDataSource.idl"
8 interface nsISimpleEnumerator
;
11 * An nsIRDFCompositeDataSource composes individual data sources, providing
12 * the illusion of a single, coherent RDF graph.
14 [scriptable
, uuid(96343820-307C
-11D2
-BC15
-00805F912FE7
)]
15 interface nsIRDFCompositeDataSource
: nsIRDFDataSource
{
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.)
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.
27 * By default, this value is <code>true</true>.
29 attribute
boolean allowNegativeAssertions
;
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.)
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.
40 * By default, this value is <code>true</code>.
42 attribute
boolean coalesceDuplicateArcs
;
45 * Add a datasource the the composite data source.
46 * @param aDataSource the datasource to add to composite
48 void AddDataSource
(in nsIRDFDataSource aDataSource
);
51 * Remove a datasource from the composite data source.
52 * @param aDataSource the datasource to remove from the composite
54 void RemoveDataSource
(in nsIRDFDataSource aDataSource
);
57 * Retrieve the datasources in the composite data source.
58 * @return an nsISimpleEnumerator that will enumerate each
59 * of the datasources in the composite
61 nsISimpleEnumerator GetDataSources
();
66 NS_NewRDFCompositeDataSource
(nsIRDFCompositeDataSource
** result
);