1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/rdf/base/idl/nsIRDFCompositeDataSource.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,68 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIRDFDataSource.idl" 1.10 + 1.11 +interface nsISimpleEnumerator; 1.12 + 1.13 +/** 1.14 + * An nsIRDFCompositeDataSource composes individual data sources, providing 1.15 + * the illusion of a single, coherent RDF graph. 1.16 + */ 1.17 +[scriptable, uuid(96343820-307C-11D2-BC15-00805F912FE7)] 1.18 +interface nsIRDFCompositeDataSource : nsIRDFDataSource { 1.19 + 1.20 + /** 1.21 + * 1.22 + * Set this value to <code>true</code> if the composite datasource 1.23 + * may contains at least one datasource that has <em>negative</em> 1.24 + * assertions. (This is the default.) 1.25 + * 1.26 + * Set this value to <code>false</code> if none of the datasources 1.27 + * being composed contains a negative assertion. This allows the 1.28 + * composite datasource to perform some query optimizations. 1.29 + * 1.30 + * By default, this value is <code>true</true>. 1.31 + */ 1.32 + attribute boolean allowNegativeAssertions; 1.33 + 1.34 + /** 1.35 + * Set to <code>true</code> if the composite datasource should 1.36 + * take care to coalesce duplicate arcs when returning values from 1.37 + * queries. (This is the default.) 1.38 + * 1.39 + * Set to <code>false</code> if the composite datasource shouldn't 1.40 + * bother to check for duplicates. This allows the composite 1.41 + * datasource to more efficiently answer queries. 1.42 + * 1.43 + * By default, this value is <code>true</code>. 1.44 + */ 1.45 + attribute boolean coalesceDuplicateArcs; 1.46 + 1.47 + /** 1.48 + * Add a datasource the the composite data source. 1.49 + * @param aDataSource the datasource to add to composite 1.50 + */ 1.51 + void AddDataSource(in nsIRDFDataSource aDataSource); 1.52 + 1.53 + /** 1.54 + * Remove a datasource from the composite data source. 1.55 + * @param aDataSource the datasource to remove from the composite 1.56 + */ 1.57 + void RemoveDataSource(in nsIRDFDataSource aDataSource); 1.58 + 1.59 + /** 1.60 + * Retrieve the datasources in the composite data source. 1.61 + * @return an nsISimpleEnumerator that will enumerate each 1.62 + * of the datasources in the composite 1.63 + */ 1.64 + nsISimpleEnumerator GetDataSources(); 1.65 +}; 1.66 + 1.67 +%{C++ 1.68 +extern nsresult 1.69 +NS_NewRDFCompositeDataSource(nsIRDFCompositeDataSource** result); 1.70 +%} 1.71 +