nsIRDFCompositeDataSource.idl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. #include "nsIRDFDataSource.idl"
  6. interface nsISimpleEnumerator;
  7. /**
  8. * An nsIRDFCompositeDataSource composes individual data sources, providing
  9. * the illusion of a single, coherent RDF graph.
  10. */
  11. [scriptable, uuid(96343820-307C-11D2-BC15-00805F912FE7)]
  12. interface nsIRDFCompositeDataSource : nsIRDFDataSource {
  13. /**
  14. *
  15. * Set this value to <code>true</code> if the composite datasource
  16. * may contains at least one datasource that has <em>negative</em>
  17. * assertions. (This is the default.)
  18. *
  19. * Set this value to <code>false</code> if none of the datasources
  20. * being composed contains a negative assertion. This allows the
  21. * composite datasource to perform some query optimizations.
  22. *
  23. * By default, this value is <code>true</true>.
  24. */
  25. attribute boolean allowNegativeAssertions;
  26. /**
  27. * Set to <code>true</code> if the composite datasource should
  28. * take care to coalesce duplicate arcs when returning values from
  29. * queries. (This is the default.)
  30. *
  31. * Set to <code>false</code> if the composite datasource shouldn't
  32. * bother to check for duplicates. This allows the composite
  33. * datasource to more efficiently answer queries.
  34. *
  35. * By default, this value is <code>true</code>.
  36. */
  37. attribute boolean coalesceDuplicateArcs;
  38. /**
  39. * Add a datasource the the composite data source.
  40. * @param aDataSource the datasource to add to composite
  41. */
  42. void AddDataSource(in nsIRDFDataSource aDataSource);
  43. /**
  44. * Remove a datasource from the composite data source.
  45. * @param aDataSource the datasource to remove from the composite
  46. */
  47. void RemoveDataSource(in nsIRDFDataSource aDataSource);
  48. /**
  49. * Retrieve the datasources in the composite data source.
  50. * @return an nsISimpleEnumerator that will enumerate each
  51. * of the datasources in the composite
  52. */
  53. nsISimpleEnumerator GetDataSources();
  54. };
  55. %{C++
  56. extern nsresult
  57. NS_NewRDFCompositeDataSource(nsIRDFCompositeDataSource** result);
  58. %}