rdf/base/idl/nsIRDFContainerUtils.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 "nsISupports.idl"
     7 #include "nsIRDFContainer.idl"
     8 #include "nsIRDFResource.idl"
    11 // Container utilities
    12 [scriptable, uuid(D4214E91-FB94-11D2-BDD8-00104BDE6048)]
    13 interface nsIRDFContainerUtils : nsISupports {
    14     /**
    15      * Returns 'true' if the property is an RDF ordinal property.
    16      */
    17     boolean IsOrdinalProperty(in nsIRDFResource aProperty);
    19     /**
    20      * Convert the specified index to an ordinal property.
    21      */
    22     nsIRDFResource IndexToOrdinalResource(in long aIndex);
    24     /**
    25      * Convert the specified ordinal property into an index
    26      */
    27     long OrdinalResourceToIndex(in nsIRDFResource aOrdinal);
    29     /**
    30      * Return 'true' if the specified resource is a container
    31      */
    32     boolean IsContainer(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    34     /**
    35      * Return 'true' if the specified resource is a container and it is empty
    36      */
    37     boolean IsEmpty(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    39     /**
    40      * Return 'true' if the specified resource is a bag
    41      */
    42     boolean IsBag(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    44     /**
    45      * Return 'true' if the specified resource is a sequence
    46      */
    47     boolean IsSeq(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    49     /**
    50      * Return 'true' if the specified resource is an alternation
    51      */
    52     boolean IsAlt(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    54     /**
    55      * Decorates the specified resource appropriately to make it
    56      * usable as an empty bag in the specified data source.
    57      */
    58     nsIRDFContainer MakeBag(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    60     /**
    61      * Decorates the specified resource appropriately to make it
    62      * usable as an empty sequence in the specified data source.
    63      */
    64     nsIRDFContainer MakeSeq(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    66     /**
    67      * Decorates the specified resource appropriately to make it
    68      * usable as an empty alternation in the specified data source.
    69      */
    70     nsIRDFContainer MakeAlt(in nsIRDFDataSource aDataSource, in nsIRDFResource aResource);
    72     /**
    73      * Retrieve the index of element in the container. Returns -1 if
    74      * the element is not in the container.
    75      */
    76     long indexOf(in nsIRDFDataSource aDataSource, in nsIRDFResource aContainer, in nsIRDFNode aElement);
    77 };
    79 %{C++
    80 extern nsresult
    81 NS_NewRDFContainerUtils(nsIRDFContainerUtils** aResult);
    82 %}

mercurial