Click or drag to resize

IGraph Interface

Interface for RDF Graphs.

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
public interface IGraph : INodeFactory, IDisposable, 
	IXmlSerializable

The IGraph type exposes the following members.

Properties
  NameDescription
Public propertyAllNodes
Gets the unique Subject, Predicate and Object nodes of the Graph.
Public propertyBaseUri
Gets/Sets the Base Uri for the Graph.
Public propertyIsEmpty
Gets whether a Graph is Empty.
Public propertyNamespaceMap
Gets the Namespace Map for the Graph.
Public propertyNodes
Gets the unique Subject and Object nodes of the Graph.
Public propertyTriples
Gets the Triple Collection for the Graph.
Top
Methods
  NameDescription
Public methodAssert(IEnumerableTriple)
Asserts an Enumerable of Triples in the Graph.
Public methodAssert(Triple)
Asserts a Triple in the Graph.
Public methodClear
Retracts all Triples from the Graph.
Public methodContainsTriple
Gets whether a given Triple is in this Graph.
Public methodCreateBlankNode
Creates a Blank Node with a new automatically generated ID.
(Inherited from INodeFactory.)
Public methodCreateBlankNode(String)
Creates a Blank Node with the given Node ID.
(Inherited from INodeFactory.)
Public methodCreateGraphLiteralNode
Creates a Graph Literal Node which represents the empty Subgraph.
(Inherited from INodeFactory.)
Public methodCreateGraphLiteralNode(IGraph)
Creates a Graph Literal Node which represents the given Subgraph.
(Inherited from INodeFactory.)
Public methodCreateLiteralNode(String)
Creates a Literal Node with the given Value.
(Inherited from INodeFactory.)
Public methodCreateLiteralNode(String, String)
Creates a Literal Node with the given Value and Language.
(Inherited from INodeFactory.)
Public methodCreateLiteralNode(String, Uri)
Creates a Literal Node with the given Value and Data Type.
(Inherited from INodeFactory.)
Public methodCreateUriNode
Creates a URI Node that corresponds to the Base URI of the Graph.
Public methodCreateUriNode(String)
Creates a URI Node for the given QName using the Graphs NamespaceMap to resolve the QName.
Public methodCreateUriNode(Uri)
Creates a URI Node for the given URI.
(Inherited from INodeFactory.)
Public methodCreateVariableNode
Creates a Variable Node for the given Variable Name.
(Inherited from INodeFactory.)
Public methodDifference
Calculates the difference between this Graph and the given Graph.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodEquals
Checks whether a Graph is equal to another Graph and if so returns the mapping of Blank Nodes.
Public methodGetBlankNode
Selects the Blank Node with the given ID if it exists in the Graph, returns null otherwise.
Public methodGetLiteralNode(String)
Selects the Literal Node with the given Value if it exists in the Graph, returns null otherwise.
Public methodGetLiteralNode(String, String)
Selects the Literal Node with the given Value and Language if it exists in the Graph, returns null otherwise.
Public methodGetLiteralNode(String, Uri)
Selects the Literal Node with the given Value and DataType if it exists in the Graph, returns otherwise.
Public methodGetNextBlankNodeID
Creates a new unused Blank Node ID and returns it.
(Inherited from INodeFactory.)
Public methodGetSchema
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return ( in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.
(Inherited from IXmlSerializable.)
Public methodGetTriples(Uri)
Selects all Triples which have a Uri Node with the given Uri.
Public methodGetTriples(INode)
Selects all Triples which contain the given Node.
Public methodGetTriplesWithObject(Uri)
Selects all Triples where the Object is a Uri Node with the given Uri.
Public methodGetTriplesWithObject(INode)
Selects all Triples where the Object is a given Node.
Public methodGetTriplesWithPredicate(Uri)
Selects all Triples where the Predicate is a Uri Node with the given Uri.
Public methodGetTriplesWithPredicate(INode)
Selects all Triples where the Predicate is a given Node.
Public methodGetTriplesWithPredicateObject
Selects all Triples with the given Predicate and Object.
Public methodGetTriplesWithSubject(Uri)
Selects all Triples where the Subject is a Uri Node with the given Uri.
Public methodGetTriplesWithSubject(INode)
Selects all Triples where the Subject is a given Node.
Public methodGetTriplesWithSubjectObject
Selects all Triples with the given Subject and Object.
Public methodGetTriplesWithSubjectPredicate
Selects all Triples with the given Subject and Predicate.
Public methodGetUriNode(String)
Selects the Uri Node with the given QName if it exists in the Graph, returns null otherwise.
Public methodGetUriNode(Uri)
Selects the Uri Node with the given Uri if it exists in the Graph, returns null otherwise.
Public methodHasSubGraph(IGraph)
Checks whether this Graph has the given Graph as a sub-graph.
Public methodHasSubGraph(IGraph, DictionaryINode, INode)
Checks whether this Graph has the given Graph as a sub-graph.
Public methodIsSubGraphOf(IGraph)
Checks whether this Graph is a sub-graph of the given Graph.
Public methodIsSubGraphOf(IGraph, DictionaryINode, INode)
Checks whether this Graph is a sub-graph of the given Graph.
Public methodMerge(IGraph)
Merges the given Graph into this Graph.
Public methodMerge(IGraph, Boolean)
Merges the given Graph into this Graph.
Public methodReadXml
Generates an object from its XML representation.
(Inherited from IXmlSerializable.)
Public methodResolveQName
Resolves a QName into a URI using the Namespace Map and Base URI of this Graph.
Public methodRetract(IEnumerableTriple)
Retracts an Enumerable of Triples from the Graph.
Public methodRetract(Triple)
Retracts a Triple from the Graph.
Public methodWriteXml
Converts an object into its XML representation.
(Inherited from IXmlSerializable.)
Top
Events
  NameDescription
Public eventChanged
Event which is raised when the Graph contents change
Public eventCleared
Event which is raised after the Graph is cleared of its contents
Public eventClearRequested
Event which is raised just before the Graph is cleared of its contents
Public eventMerged
Event which is raised when a Merge operation is completed on the Graph
Public eventMergeRequested
Event which is raised just before a Merge operation begins on the Graph
Public eventTripleAsserted
Event which is raised when a Triple is asserted in the Graph
Public eventTripleRetracted
Event which is raised when a Triple is retracted from the Graph
Top
Extension Methods
  NameDescription
Public Extension MethodAddToList(INode, IEnumerableINode)Overloaded.
Adds new items to the end of a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodAddToListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Adds new items to the end of a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodAsDynamic
Dynamically wraps a graph.
(Defined by DynamicExtensions.)
Public Extension MethodAssert
Asserts a new Triple in the Graph.
(Defined by Extensions.)
Public Extension MethodAssertList(IEnumerableINode)Overloaded.
Asserts a list as a RDF collection and returns the node that represents the root of the RDF collection.
(Defined by Extensions.)
Public Extension MethodAssertList(INode, IEnumerableINode)Overloaded.
Asserts a list as a RDF collection using an existing node as the list root.
(Defined by Extensions.)
Public Extension MethodAssertListT(IEnumerableT, FuncT, INode)Overloaded.
Asserts a list as a RDF collection and returns the node that represents the root of the RDF collection.
(Defined by Extensions.)
Public Extension MethodAssertListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Asserts a list as a RDF collection using an existing node as the list root.
(Defined by Extensions.)
Public Extension MethodExecuteQuery(String)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(SparqlParameterizedString)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(SparqlQuery)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, String)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, SparqlParameterizedString)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, SparqlQuery)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodGetListAsTriples
Gets all the Triples that make up a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodGetListItems
Gets all the Nodes which are the items of the list (aka the RDF collection).
(Defined by Extensions.)
Public Extension MethodGetListNodes
Gets all the Nodes which are the intermediate nodes in the list (aka the RDF collection). These represents the nodes used to link the actual items of the list together rather than the actual items of the list.
(Defined by Extensions.)
Public Extension MethodLoadFromEmbeddedResource(String)Overloaded.
Loads RDF data from an Embedded Resource into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromEmbeddedResource(String, IRdfReader)Overloaded.
Loads RDF data from an Embedded Resource into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromFile(String)Overloaded.
Loads RDF data from a file into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromFile(String, IRdfReader)Overloaded.
Loads RDF data from a file into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromString(String)Overloaded.
Loads RDF data from a String into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromString(String, IRdfReader)Overloaded.
Loads RDF data from a String into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromUri(Uri)Overloaded.
Loads RDF data from a URI into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromUri(Uri, IRdfReader)Overloaded.
Loads RDF data from a URI into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodRemoveFromList(INode, IEnumerableINode)Overloaded.
Removes the given items from a list (aka a RDF collection), if an item occurs multiple times in the list all occurrences will be removed.
(Defined by Extensions.)
Public Extension MethodRemoveFromListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Removes the given items from a list (aka a RDF collection), if an item occurs multiple times in the list all occurrences will be removed.
(Defined by Extensions.)
Public Extension MethodRetract
Retracts a Triple from the Graph.
(Defined by Extensions.)
Public Extension MethodRetractList
Retracts a List (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodSaveToFile(String)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToFile(String, IRdfWriter)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToFile(String, IStoreWriter)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(TextWriter, IRdfWriter)Overloaded.
Saves a Graph to a stream.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(TextWriter, IStoreWriter)Overloaded.
Saves a Graph to a stream.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(String, TextWriter)Overloaded.
Save a graph to a stream, determining the type of writer to use by the output file name.
(Defined by GraphExtensions.)
Top
Remarks

Most implementations will probably want to inherit from the abstract class BaseGraph since it contains reference implementations of various algorithms (Graph Equality/Graph Difference/Sub-Graph testing etc) which will save considerable work in implementation and ensure consistent behaviour of some methods across implementations.

See Also