Linux Mac OSX Windows

Implemented by


  
[scriptable, uuid(d4214e90-fb94-11d2-bdd8-00104bde6048)]
interface nsIRDFContainer : nsISupports

Attributes


        
readonly attribute nsIRDFDataSource DataSource

        
readonly attribute nsIRDFResource Resource

Methods

 Append an element to the container, assigning it the next
 available ordinal.
void AppendElement(in nsIRDFNode aElement)
 Return the number of elements in the container. Note that this
 may not always be accurate due to aggregation.
long GetCount()
 Return an enumerator that can be used to enumerate the contents
 of the container in ascending order.
nsISimpleEnumerator GetElements()
 Determine the index of an element in the container.

 @return The index of the specified element in the container. If
 the element is not contained in the container, this function
 returns '-1'.
long IndexOf(in nsIRDFNode aElement)
 Initialize the container wrapper to the specified resource
 using the specified datasource for context.
void Init(in nsIRDFDataSource aDataSource, in nsIRDFResource aContainer)
 Insert aElement at the specified index. If aRenumber is 'true', then
 the underlying RDF graph will be 're-numbered' to accomodate the new
 element.
void InsertElementAt(in nsIRDFNode aElement, in long aIndex, in boolean aRenumber)
 Remove the first occurence of the specified element from the
 container. If aRenumber is 'true', then the underlying RDF graph
 will be 're-numbered' to account for the removal.
void RemoveElement(in nsIRDFNode aElement, in boolean aRenumber)
 Remove the element at the specified index. If aRenumber is 'true', then
 the underlying RDF graph will be 're-numbered' to account for the
 removal.

 @return the element that was removed.
nsIRDFNode RemoveElementAt(in long aIndex, in boolean aRenumber)