RDF

Mozilla provides a number of interfaces for manipulating RDF datasources. You can load a serialized RDF-XML file using the nsIRDFService's GetDataSource method. This interface can also be used to get references to resources. Several additional data source interfaces are provided. nsIRDFInMemoryDataSource is commonly used to create custom data sources.

Jump to:


RDF Datasources

The following base datasources are available. These all extend for nsIRDFDataSource which provides most functionality for reading and modifying the data.

nsIRDFCompositeDataSource
nsIRDFDataSource
nsIRDFInMemoryDataSource
nsIRDFInferDataSource
nsIRDFPropagatableDataSource
nsIRDFPurgeableDataSource
nsIRDFRemoteDataSource

RDF Nodes

Mozilla's RDF implementation provides support for a number of basic node types, all of which inherit from nsIRDFNode. Use the functions in nsIRDFService to create references to nodes. This service ensures that each node only exists once.

nsIRDFBlob
nsIRDFDate
nsIRDFInt
nsIRDFLiteral
nsIRDFNode
nsIRDFResource

RDF Interfaces

Some miscellaneous interfaces and services that provide convenience methods for RDF containers and for parsing from and serializing to XML.

nsIRDFContainer
nsIRDFContainerUtils
nsIRDFDelegateFactory
nsIRDFObserver
nsIRDFService
nsIRDFXMLParser
nsIRDFXMLSerializer
nsIRDFXMLSink
nsIRDFXMLSinkObserver
nsIRDFXMLSource
rdfIDataSource
rdfISerializer
rdfITripleVisitor

RDF Components

These components implement the RDF interfaces. The RDF service (@mozilla.org/rdf/rdf-service;1) is the most commonly used component.

@mozilla.org/rdf/container-utils;1
@mozilla.org/rdf/container;1
@mozilla.org/rdf/content-sink;1
@mozilla.org/rdf/rdf-service;1
@mozilla.org/rdf/serializer;1?format=ntriples
@mozilla.org/rdf/xml-parser;1
@mozilla.org/rdf/xml-serializer;1

RDF Datasource Components

The following RDF datasources are available, which all implement nsIRDFDataSource.

@mozilla.org/rdf/datasource;1?name=addressdirectory
@mozilla.org/rdf/datasource;1?name=bookmarks
@mozilla.org/rdf/datasource;1?name=charset-menu
@mozilla.org/rdf/datasource;1?name=composite-datasource
@mozilla.org/rdf/datasource;1?name=files
@mozilla.org/rdf/datasource;1?name=history
@mozilla.org/rdf/datasource;1?name=httpindex
@mozilla.org/rdf/datasource;1?name=in-memory-datasource
@mozilla.org/rdf/datasource;1?name=internetsearch
@mozilla.org/rdf/datasource;1?name=ispdefaults
@mozilla.org/rdf/datasource;1?name=local-store
@mozilla.org/rdf/datasource;1?name=localsearch
@mozilla.org/rdf/datasource;1?name=mailnewsfolders
@mozilla.org/rdf/datasource;1?name=msgaccountmanager
@mozilla.org/rdf/datasource;1?name=msgfilters
@mozilla.org/rdf/datasource;1?name=smtp
@mozilla.org/rdf/datasource;1?name=subscribe
@mozilla.org/rdf/datasource;1?name=window-mediator
@mozilla.org/rdf/datasource;1?name=xml-datasource
@mozilla.org/rdf/infer-datasource;1?engine=forward-proxy

RDF Resource Factories

The following components are used to generate references to objects which implement nsIRDFResource. When the RDF service's GetResource method is called, the scheme of the resource URI is used to determine which factory to use to generate the resource.

@mozilla.org/rdf/delegate-factory;1?key=filter&scheme;=imap
@mozilla.org/rdf/delegate-factory;1?key=filter&scheme;=mailbox
@mozilla.org/rdf/delegate-factory;1?key=filter&scheme;=news
@mozilla.org/rdf/delegate-factory;1?key=smtpserver&scheme;=smtp
@mozilla.org/rdf/resource-factory;1
@mozilla.org/rdf/resource-factory;1?name=NC
@mozilla.org/rdf/resource-factory;1?name=chrome
@mozilla.org/rdf/resource-factory;1?name=engine
@mozilla.org/rdf/resource-factory;1?name=find
@mozilla.org/rdf/resource-factory;1?name=http
@mozilla.org/rdf/resource-factory;1?name=imap
@mozilla.org/rdf/resource-factory;1?name=mailbox
@mozilla.org/rdf/resource-factory;1?name=moz-abdirectory
@mozilla.org/rdf/resource-factory;1?name=moz-abldapdirectory
@mozilla.org/rdf/resource-factory;1?name=moz-abmdbdirectory
@mozilla.org/rdf/resource-factory;1?name=nc
@mozilla.org/rdf/resource-factory;1?name=news
@mozilla.org/rdf/resource-factory;1?name=rdf
@mozilla.org/rdf/resource-factory;1?name=urn

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com