dotNetRDF API Documentation

VDS.RDF Namespace

Top Level Namespace for the dotNetRDF Library which embodies a simple but powerful API for working with RDF and SPARQL.

Specific Namespaces within the Hierarchy provide Parsing and Serialization functionality along with a host of related classes to support these functions.

Support for querying RDF is provided in the Query namespace which includes SPARQL Query, limited reasoning support in the Query.Inference namespace and a Pellet Server client in the Query.Inference.Pellet namespace.

Support for updating RDF based on the SPARQL 1.1 Update and Graph Store HTTP Protocol for RDF Graph Management is provided in the Update and Update.Protocol namespaces.

Third Party Storage

For communicating with arbitrary Triple Stores we have a dedicated Storage namespace. As of this release we support the following Triple Stores:

ASP.Net Integration

For those building ASP.Net based websites the Web namespace is dedicated to providing classes for integrating RDF into ASP.Net applications.

Ontology API

There is also an Ontology namespace which provides a more resource and ontology centric API for working with RDF than the standard Graph and Triple centric APIs

Configuration API

We provide a Configuration API which provides for encoding configuration in RDF Graphs. This configuration system is used extensively as part of the ASP.Net support as it allows for much more expressive and flexible configurations than were previously possible. See the documentation on the main website for many detailed examples. This is primarily intended as an easy way to help deploy configurations for ASP.Net applications though you can make use of the API to describe the configuration of various types of objects in other applications, for example we use it in our Store Manager utility to store connection details.

Notes

dotNetRDF 1.0.0 is now considered a stable release, this means it should be stable for production scenarios. However it is open source software and despite our best efforts there may still be bugs. Please help us improve this library by emailing us when you find a bug, you can use the Bug Reports list to report bugs, the Support list to ask questions and the Developer list to request new features or discuss development plans (all these are SourceForge mailing lists which require subscription).

Alternative Builds

Mono Build

There is no separate build for Mono since dotNetRDF can run directly under Mono. Note that there may still be some features of .Net we use that Mono does not fully support, see the Mono Issues page for more details. We recommend Mono 2.10 or higher though the library should run on recent 2.6/2.8 releases.

Client Profile Build

The Client Profile build omits the reference to System.Web so lacks the ASP.Net integration and some other features that rely on this dependency but is otherwise a fairly complete build of the library.

Silverlight/Windows Phone 7 Build

The Silverlight and Windows Phone 7 builds of dotNetRDF (dotNetRDF.Silverlight.dll and dotNetRDF.WindowsPhone.dll) are experimental builds that receive limited internal testing so please be aware that these are not as stable as the standard .Net builds. These build runs on Silverlight 4/Windows Phone 7 and omits the following features since they can't be supported on these platforms:

Namespace Hierarchy

Classes

Class Description
BaseBlankNode Abstract Base Class for Blank Nodes
BaseDemandGraphCollection A decorator for graph collections that allows for graphs to be loaded on demand if they don't exist in the underlying graph collection
BaseEndpoint Abstract Base class for HTTP endpoints
BaseGraph Abstract Base Implementation of the IGraph interface
BaseGraphCollection Abstract Base Class for Graph Collections
BaseGraphLiteralNode Abstract Base Class for Graph Literal Nodes
BaseLiteralNode Abstract Base Class for Literal Nodes
BaseNode Abstract Class for Nodes, implements the two basic properties of the INode Interface
BaseTripleCollection Abstract Base Class for Triple Collections
BaseTripleComparer Abstract base class for Triple Comparers which provide for comparisons using different node comparers
BaseTripleStore Abstract Base Class for a Triple Store
BaseUriNode Abstract Base Class for URI Nodes
BaseVariableNode Abstract Base Class for Variable Nodes
BasicTripleContext Class which implements a very basic Triple Context
BlankNode Class for representing Blank RDF Nodes
BlankNodeMapper Mapper class which creates Blank Node IDs and ensures that auto-assigned and user specified IDs don't collide
BlankNodeOutputMapper Mapper class which remaps Blank Node IDs which aren't valid as-is in a given serialization to a new ID
CancellableGraphEventArgs Event Arguments for Events regarding Graphs which may be cancelled
ComparisonHelper Static Helper class containing standard implementations of Comparison between various Node types
DiskDemandGraphCollection A decorator for graph collection where graphs not in the underlying graph collection can be loaded on-demand from the Files on Disk as needed
DiskDemandTripleStore Class for representing Triple Stores which are collections of RDF Graphs
EqualityHelper Static Helper class containing standard implementations of Equality between various Node types
Extensions Provides useful Extension Methods for use elsewhere in the Library
FastNodeComparer A Node Comparer which does faster comparisons since it only does lexical comparisons for literals rather than value comparisons
FileGraphPersistenceWrapper The File Graph Persistence Wrapper is a wrapper around antoher Graph that will be persisted to a file
FullTripleComparer Triple comparer which compares on subjects, then predicates and finally objects
Graph Class for representing RDF Graphs
GraphCollection Wrapper class for Graph Collections
GraphDiff Implementation of a Graph Difference algorithm for RDF Graphs
GraphDiffReport Represents the Differences between 2 Graphs
GraphEventArgs Event Arguments for Events regarding Graphs
GraphExtensions Provides useful Extension Methods for working with Graphs
GraphFactory A Graph Factory provides access to consistent Graph References so that Nodes and Triples can be instantiated in the correct Graphs
GraphLiteralNode Class for representing Graph Literal Nodes which are supported in highly expressive RDF syntaxes like Notation 3
GraphMatcher Implements a Graph Isomorphism Algorithm
GraphPersistenceAction Represents a Graph that is queued for persistence (added/modified/removed)
GraphPersistenceWrapper The Graph Persistence Wrapper is a wrapper around another Graph that can be used to batch persistence actions with the ability to Flush/Discard changes as desired.
GraphSizeComparer A Comparer for Graphs which compares based on number of Triples
IndexHelper Obsolete. Helper Class for indexing related operations
LiteralExtensions Provides extension methods for converting primitive types into appropriately typed Literal Nodes
LiteralNode Class for representing Literal Nodes
MimeTypeDefinition Represents the definition of a MIME Type including mappings to relevant readers and writers
MimeTypeSelector Selector used in selecting which MIME type to use
MimeTypesHelper Helper Class containing definitions of MIME Types for the various RDF Concrete Syntaxes and Content Negotation Methods
NamespaceMapper Class for representing Mappings between Prefixes and Namespace URIs
NestedNamespaceMapper A Namespace Mapper which has an explicit notion of Nesting
NodeFactory A default implementation of a Node Factory which generates Nodes unrelated to Graphs (wherever possible we suggest using a Graph based implementation instead)
NonIndexedGraph Class for representing RDF Graphs when you don't want Indexing
NonIndexedThreadSafeGraph A Thread Safe version of the Graph class
ObjectComparer Triple comparer which compares only on objects
ObjectSubjectComparer Triple comparer which compares on objects and then subjects
Options Configures Global Static Options for the Library
PersistentTripleStore Represents an in-memory view of a triple store provided by an IStorageProvider instance where changes to the in-memory view get reflected in the persisted view.
PredicateComparer Triple comparer which compares only on predicates
PredicateObjectComparer Triple comparer which compares on predicates and then objects
QNameMapping Represents a mapping from a URI to a QName
QNameOutputMapper Class for representing Mappings from URIs to QNames
QueryableGraph Class for representing Graphs which can be directly queried using SPARQL
RdfException Class for representing errors with RDF
StoreGraphPersistenceWrapper The Store Graph Persistence Wrapper is a wrapper around another Graph that will be persisted to an underlying store via a provided IStorageProvider implementation
SubjectComparer Triple comparer which compares only on subjects
SubjectObjectComparer Triple comparer which compares on subjects and then objects
SubjectPredicateComparer Triple comparer which compares on subjects and then predicates
SubTreeIndexedTripleCollection An indexed triple collection that uses our MultiDictionary`2 and BinaryTree`3 implementations under the hood for the index structures
ThreadSafeGraph A Thread Safe version of the Graph class
ThreadSafeGraphCollection Thread Safe decorator around a Graph collection
ThreadSafeQNameOutputMapper Thread Safe version of the QNameOutputMapper
ThreadSafeTripleCollection Thread Safe decorator for triple collections
ThreadSafeTripleStore A thread safe variant of TripleStore, simply a TripleStore instance with a ThreadSafeGraphCollection decorator around it's underlying BaseGraphCollection
Tools Tools class which contains a number of utility methods which are declared as static methods
TreeIndexedTripleCollection An indexed triple collection that uses our MultiDictionary`2 and BinaryTree`3 implementations under the hood for the index structures
Triple Class for representing RDF Triples in memory
TripleCollection Basic Triple Collection which is not indexed
TripleEventArgs Event Arguments for Events regarding the assertion and retraction of Triples
TriplePersistenceAction Represents a Triple that is queued for persistence (either insertion/deletion)
TripleStore Class for representing Triple Stores which are collections of RDF Graphs
TripleStoreEventArgs Event Arguments for Events regarding Graphs
TripleStoreExtensions Provides useful Extension Methods for working with Triple Stores
TripleStorePersistenceAction Represents an action on a Triple Store that is queued for persistence
UnionGraph A Graph which represents the Union of several Graphs
UnionTripleCollection Represents a union of multiple Triple Collections
UriComparer Equality comparer that compares URIs
UriFactory A static helper class for interning URIs to reduce memory usage
UriNode Class for representing URI Nodes
VariableContext Represents the Variable Context for Triples
VariableNode Class representing Variable Nodes (only used for N3)
VirtuosoTripleStore Obsolete. Class for representing a Virtuoso Native Quad Store and executing queries against it
WebDemandGraphCollection A decorator for graph collections where graphs not in the underlying graph collection can be loaded on-demand from the Web as needed
WebDemandTripleStore Class for representing Triple Stores which are collections of RDF Graphs
WrapperGraph Abstract decorator for Graphs to make it easier to layer functionality on top of existing implementations
WrapperGraphCollection Abstract decorator for Graph Collections to make it easier to add new functionality to existing implementations
WrapperTripleCollection Abstract decorator for Triple Collections to make it easier to add additional functionality to existing collections
WrapperTripleStore Abstract decorator for Triple Stores to make it easier to add new functionality on top of existing implementations

Interfaces

Interface Description
IBlankNode Interface for Blank Nodes
IGraph Interface for RDF Graphs
IGraphLiteralNode Interface for Graph Literal Nodes
IInferencingTripleStore Interface for Triple Stores which can have a IInferenceEngine attached to them
IInMemoryQueryableStore Interface for Triple Stores which can be queried in memory using method calls or the SPARQL implementation contained in this library
ILiteralNode Interface for Literal Nodes
INamespaceMapper Interface for Namespace Maps which provide mappings between Namespace Prefixes and Namespace URIs
INativelyQueryableStore Interface for Triple Stores which can be queried natively i.e. the Stores provide their own SPARQL implementations
INode Interface for Nodes
INodeFactory Interface for classes which can create Nodes
IObjectParser(T) Interface for parsers that generate objects of some sort
IRdfHandler Interface for Handlers which handle the RDF produced by parsers
IRdfReader Interface to be implemented by RDF Readers which parse Concrete RDF Syntax
IRdfWriter Interface to be implemented by RDF Writers which generate RDF Concrete Syntax
ISparqlResultsHandler Interface for Handlers which handle the SPARQL Results produced by parsers
ISparqlResultsReader Interface for Reader Classes which parser Sparql Result Set syntaxes into Result Set objects
ISparqlResultsWriter Interface for Writer classes which serialize Sparql Result Sets into concrete results set syntaxes
IStoreReader Interface to be implemented by Triple Store Readers
IStoreWriter Interface to be implemented by Triple Store Writers
ITransactionalGraph Interface for RDF Graphs which provide Transactions i.e. changes to them can be Flushed (committed) or Discard (rolled back) as desired
ITransactionalStore Interface for Triple Stores which are backed by some storage layer that may delay persistence and thus require flushing to ensure changes are persisted to the backing store, as a by product such stores will typically have some notion of transactionality
ITripleContext An Interface for classes which provide Context Information for Triples thus allowing you to create Quads with arbitrary extra information attached to Triples via your Context Objects
ITripleStore Interface for Triple Stores
IUpdateableTripleStore Interface for Triple Stores which support SPARQL Update as per the SPARQL 1.1 specifications
IUriNode Interface for URI Nodes
IVariableNode Interface for Variable Nodes
IWrappingRdfHandler Interface for Handlers which wrap other Handlers

Delegates

Delegate Description
CancellableGraphEventHandler Delegate Type for Graph events raised by Graphs where event handlers may set a Cancel flag to cancel the subsequent operation
GraphCallback Callback for methods that return a IGraph asynchronously
GraphEventHandler Delegate Type for Graph events raised by Graphs
NamespaceCallback Callback for methods that return a Namespace Map
NamespaceChanged Delegate Type for the Events of the Namespace Mapper
NodeListCallback Callbacks for methods that return a list of nodes
QueryCallback Callbacks for methods that may process the results with either an RDF or a SPARQL Results Handler
RdfHandlerCallback Callbacks for methods that process the resulting triples with an RDF Handler asynchronously
RdfReaderWarning Delegate Type for Warning Messages raised by RDF Readers
RdfWriterWarning Delegate Type for Warning Messages raised by RDF Writers
SparqlResultsCallback Callback for methods that return a SparqlResultSet asynchronously
SparqlResultsHandlerCallback Callbacks for methods that process the results with an SPARQL Results Handler asynchronously
SparqlWarning Delegate Type for Warning Events raised by SPARQL Readers and Writers for Queries, Updates and Results
StoreReaderWarning Delegate Type for Warning Events raised by RDF Dataset Readers
StoreWriterWarning Delegate Type for Warning Events raised by RDF Dataset Writers
TripleEventHandler Delegate Type for Triple events raised by Graphs
TripleStoreCallback Callback for methods that return a ITripleStore asynchronously
TripleStoreEventHandler Delegate Type for Triple Store events raised by Triple Stores
UpdateCallback Callbacks for methods that perform SPARQL Updates

Enumerations

Enumeration Description
GraphPersistenceActionType Possible Types of Graph Persistence Actions
LiteralEqualityMode Possible Literal Equality Mode Settings
NodeType Node Type Values
TripleIndexType Possible Triple Index types
VariableContextType Possible Variable Context Types