Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsRDFDataSourceDS.cpp File Reference
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsIRDFService.h"
#include "nsRDFCID.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFRemoteDataSource.h"
#include "rdf.h"
#include "nsIServiceManager.h"
#include "nsEnumeratorUtils.h"
#include "nsXPIDLString.h"

Go to the source code of this file.

Classes

class  nsRDFDataSourceDataSource

Defines

#define NS_RDF_DSDS_NAMESPACE_URI   "http://www.mozilla.org/rdf/vocab/dsds#"
 RDF vocabulary describing assertions in inner datasource.
#define NS_RDF_ARCSOUT   NS_RDF_DSDS_NAMESPACE_URI "arcsout"
#define NS_RDF_ARCSIN   NS_RDF_DSDS_NAMESPACE_URI "arcsin"
#define NS_RDF_SUBJECT   NS_RDF_DSDS_NAMESPACE_URI "subject"
#define NS_RDF_PREDICATE   NS_RDF_DSDS_NAMESPACE_URI "predicate"
#define NS_RDF_OBJECT   NS_RDF_DSDS_NAMESPACE_URI "object"
#define NC_RDF_Name   NC_NAMESPACE_URI "Name"
#define NC_RDF_Value   NC_NAMESPACE_URI "Value"
#define NC_RDF_Child   NC_NAMESPACE_URI "child"

Functions

static NS_DEFINE_CID (kRDFServiceCID, NS_RDFSERVICE_CID)
 NS_IMPL_ISUPPORTS2 (nsRDFDataSourceDataSource, nsIRDFDataSource, nsIRDFRemoteDataSource) NS_IMETHODIMP nsRDFDataSourceDataSource
 Implement nsIRDFRemoteDataSource.
nsresult NS_NewRDFDataSourceDataSource (nsISupports *, const nsIID &iid, void **result)

Define Documentation

Definition at line 91 of file nsRDFDataSourceDS.cpp.

Definition at line 89 of file nsRDFDataSourceDS.cpp.

Definition at line 90 of file nsRDFDataSourceDS.cpp.

Definition at line 84 of file nsRDFDataSourceDS.cpp.

Definition at line 83 of file nsRDFDataSourceDS.cpp.

#define NS_RDF_DSDS_NAMESPACE_URI   "http://www.mozilla.org/rdf/vocab/dsds#"

RDF vocabulary describing assertions in inner datasource.

For a particular resource, we want to provide all arcs out and in that the inner datasource has. This is done by introducing helper resources for each triple of the form x-moz-dsds:<subject-resource-pointer><predicate-resource-pointer>\ <object-node-pointer> For each triple, that has the resource in question as subject, a "arcsout" assertion goes from that resource to a x-moz-dsds resource. For each triple, that has the resource in question as object, a "arcsin" assertion goes from that resource to a x-moz-dsds resource. For each x-moz-dsds resource, there is a "subject" arc to the subject, a "predicate" arc to the predicate and a "object" arc to the object.

The namespace of this vocabulary is "http://www.mozilla.org/rdf/vocab/dsds".

XXX we might want to add a "qname" resource from each resource to a somewhat canonical "prefix:localname" literal.

Definition at line 82 of file nsRDFDataSourceDS.cpp.

Definition at line 87 of file nsRDFDataSourceDS.cpp.

Definition at line 86 of file nsRDFDataSourceDS.cpp.

Definition at line 85 of file nsRDFDataSourceDS.cpp.


Function Documentation

static NS_DEFINE_CID ( kRDFServiceCID  ,
NS_RDFSERVICE_CID   
) [static]

Implement nsIRDFRemoteDataSource.

Definition at line 130 of file nsRDFDataSourceDS.cpp.

{
    nsCOMPtr<nsIRDFRemoteDataSource> remote =
        do_QueryInterface(mDataSource);
    if (remote) {
        return remote->GetLoaded(aLoaded);
    }
    *aLoaded = PR_TRUE;
    return NS_OK;
}

Here is the call graph for this function:

nsresult NS_NewRDFDataSourceDataSource ( nsISupports *  ,
const nsIID iid,
void **  result 
)

Definition at line 481 of file nsRDFDataSourceDS.cpp.

{
  nsRDFDataSourceDataSource * dsds = new nsRDFDataSourceDataSource();
  if (!dsds) return NS_ERROR_NOT_INITIALIZED;
  return dsds->QueryInterface(iid, result);
  
}

Here is the call graph for this function:

Here is the caller graph for this function: