michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIRDFDataSource.idl" michael@0: michael@0: interface nsISimpleEnumerator; michael@0: michael@0: /** michael@0: * An nsIRDFCompositeDataSource composes individual data sources, providing michael@0: * the illusion of a single, coherent RDF graph. michael@0: */ michael@0: [scriptable, uuid(96343820-307C-11D2-BC15-00805F912FE7)] michael@0: interface nsIRDFCompositeDataSource : nsIRDFDataSource { michael@0: michael@0: /** michael@0: * michael@0: * Set this value to true if the composite datasource michael@0: * may contains at least one datasource that has negative michael@0: * assertions. (This is the default.) michael@0: * michael@0: * Set this value to false if none of the datasources michael@0: * being composed contains a negative assertion. This allows the michael@0: * composite datasource to perform some query optimizations. michael@0: * michael@0: * By default, this value is true. michael@0: */ michael@0: attribute boolean allowNegativeAssertions; michael@0: michael@0: /** michael@0: * Set to true if the composite datasource should michael@0: * take care to coalesce duplicate arcs when returning values from michael@0: * queries. (This is the default.) michael@0: * michael@0: * Set to false if the composite datasource shouldn't michael@0: * bother to check for duplicates. This allows the composite michael@0: * datasource to more efficiently answer queries. michael@0: * michael@0: * By default, this value is true. michael@0: */ michael@0: attribute boolean coalesceDuplicateArcs; michael@0: michael@0: /** michael@0: * Add a datasource the the composite data source. michael@0: * @param aDataSource the datasource to add to composite michael@0: */ michael@0: void AddDataSource(in nsIRDFDataSource aDataSource); michael@0: michael@0: /** michael@0: * Remove a datasource from the composite data source. michael@0: * @param aDataSource the datasource to remove from the composite michael@0: */ michael@0: void RemoveDataSource(in nsIRDFDataSource aDataSource); michael@0: michael@0: /** michael@0: * Retrieve the datasources in the composite data source. michael@0: * @return an nsISimpleEnumerator that will enumerate each michael@0: * of the datasources in the composite michael@0: */ michael@0: nsISimpleEnumerator GetDataSources(); michael@0: }; michael@0: michael@0: %{C++ michael@0: extern nsresult michael@0: NS_NewRDFCompositeDataSource(nsIRDFCompositeDataSource** result); michael@0: %} michael@0: