Class SpinWrappedGraph
A simple IGraph implementation that only tracks triple removal and additions
Inheritance
Inherited Members
Namespace: VDS.RDF.Query.Spin
Assembly: dotNetRdf.Query.Spin.dll
Syntax
public class SpinWrappedGraph : IGraph, INodeFactory, IDisposable, ITripleIndex, IEquatable<IGraph>
Constructors
| Improve this Doc View SourceSpinWrappedGraph(IRefNode)
Create a new SPIN graph
Declaration
public SpinWrappedGraph(IRefNode graphName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IRefNode | graphName | The graph name. May be null. |
Properties
| Improve this Doc View SourceAllNodes
Gets the unique Subject, Predicate and Object nodes of the asserted triples in the Graph.
Declaration
public IEnumerable<INode> AllNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><INode> |
AllQuotedNodes
Gets the unique subject, predicate and object nodes of the quoted triples in the graph.
Declaration
public IEnumerable<INode> AllQuotedNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><INode> |
BaseUri
Get or set the base URI used to resolve relative URI references.
Declaration
public Uri BaseUri { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Uri |
IsEmpty
Gets whether a Graph is Empty.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Name
Gets the name of the graph.
Declaration
public IRefNode Name { get; }
Property Value
| Type | Description |
|---|---|
| IRefNode |
Remarks
The graph name May be NULL for an unnamed (default) graph.
NamespaceMap
Get the namespace map for this node factory.
Declaration
public INamespaceMapper NamespaceMap { get; }
Property Value
| Type | Description |
|---|---|
| INamespaceMapper |
Nodes
Gets the unique Subject and Object nodes of the Graph.
Declaration
public IEnumerable<INode> Nodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><INode> |
Remarks
This property returns only nodes that appear in the Subject or Object position in asserted triples. To retrieve a list of all INode instances in a graph including those in Predicate position in a triple, use the AllNodes property.
NormalizeLiteralValues
Get or set the flag that controls whether the value strings of literal nodes should be normalized on creation.
Declaration
public bool NormalizeLiteralValues { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
QuotedNodes
Gets the unique subject and object nodes of the quoted triples in the graph.
Declaration
public IEnumerable<INode> QuotedNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><INode> |
QuotedTriples
Gets the quoted triples in the graph.
Declaration
public IEnumerable<Triple> QuotedTriples { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
Triples
Gets the Triple Collection for the Graph.
Declaration
public BaseTripleCollection Triples { get; }
Property Value
| Type | Description |
|---|---|
| BaseTripleCollection |
UriFactory
Get or set the factory to use when creating URIs.
Declaration
public IUriFactory UriFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| IUriFactory |
Methods
| Improve this Doc View SourceAssert(IEnumerable<Triple>)
Asserts an Enumerable of Triples in the Graph.
Declaration
public bool Assert(IEnumerable<Triple> ts)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> | ts | An Enumerable of Triples. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Assert(Triple)
Asserts a Triple in the Graph.
Declaration
public bool Assert(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | A Triple. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Clear()
Retracts all Triples from the Graph.
Declaration
public void Clear()
Remarks
The Graph should raise the ClearRequested event at the start of the Clear operation and abort the operation if the operation is cancelled by an event handler. On completing the Clear the Cleared event should be raised.
ContainsAssertedTriple(Triple)
Declaration
public bool ContainsAssertedTriple(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ContainsQuotedTriple(Triple)
Gets whether a given triple is quoted in this graph.
Declaration
public bool ContainsQuotedTriple(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to test. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the triple is quoted in this graph, false otherwise. |
ContainsTriple(Triple)
Gets whether a given triple is asserted in this Graph.
Declaration
public bool ContainsTriple(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to test. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the triple is asserted in this graph, false otherwise. |
CreateBlankNode()
Creates a Blank Node with a new automatically generated ID.
Declaration
public IBlankNode CreateBlankNode()
Returns
| Type | Description |
|---|---|
| IBlankNode |
CreateBlankNode(string)
Creates a Blank Node with the given Node ID.
Declaration
public IBlankNode CreateBlankNode(string nodeId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | nodeId | Node ID. |
Returns
| Type | Description |
|---|---|
| IBlankNode |
CreateGraphLiteralNode()
Creates a Graph Literal Node which represents the empty Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode()
Returns
| Type | Description |
|---|---|
| IGraphLiteralNode |
CreateGraphLiteralNode(IGraph)
Creates a Graph Literal Node which represents the given Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode(IGraph subgraph)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | subgraph | Subgraph. |
Returns
| Type | Description |
|---|---|
| IGraphLiteralNode |
CreateLiteralNode(string, string)
Creates a Literal Node with the given Value and Language.
Declaration
public ILiteralNode CreateLiteralNode(string literal, string langSpec)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
| string | langSpec | Language Specifier for the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode |
CreateLiteralNode(string, Uri)
Creates a Literal Node with the given Value and Data Type.
Declaration
public ILiteralNode CreateLiteralNode(string literal, Uri datatype)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
| System.Uri | datatype | Data Type URI of the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode |
CreateLiteralNode(string)
Creates a Literal Node with the given Value.
Declaration
public ILiteralNode CreateLiteralNode(string literal)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode |
CreateTripleNode(Triple)
Creates a node that quotes the given triple.
Declaration
public ITripleNode CreateTripleNode(Triple triple)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | triple | The triple to be the quoted value of the created node. |
Returns
| Type | Description |
|---|---|
| ITripleNode |
CreateUriNode()
Creates a URI Node that corresponds to the current Base URI of the node factory.
Declaration
public IUriNode CreateUriNode()
Returns
| Type | Description |
|---|---|
| IUriNode |
CreateUriNode(string)
Creates a URI Node for the given QName using the Graphs NamespaceMap to resolve the QName.
Declaration
public IUriNode CreateUriNode(string qName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | qName | QName. |
Returns
| Type | Description |
|---|---|
| IUriNode |
CreateUriNode(Uri)
Creates a URI Node for the given URI.
Declaration
public IUriNode CreateUriNode(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | URI. |
Returns
| Type | Description |
|---|---|
| IUriNode |
CreateVariableNode(string)
Creates a Variable Node for the given Variable Name.
Declaration
public IVariableNode CreateVariableNode(string varName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | varName |
Returns
| Type | Description |
|---|---|
| IVariableNode |
Difference(IGraph)
Calculates the difference between this Graph and the given Graph.
Declaration
public GraphDiffReport Difference(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
Returns
| Type | Description |
|---|---|
| GraphDiffReport |
Remarks
Produces a report which shows the changes that must be made to this Graph to produce the given Graph.
Dispose()
Declaration
public void Dispose()
Equals(IGraph, out Dictionary<INode, INode>)
Checks whether a Graph is equal to another Graph and if so returns the mapping of Blank Nodes.
Declaration
public bool Equals(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph to compare with. |
| System.Collections.Generic.Dictionary<TKey, TValue><INode, INode> | mapping | Mapping of Blank Nodes. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Equals(IGraph)
Declaration
public bool Equals(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetBlankNode(string)
Selects the Blank Node with the given ID if it exists in the Graph, returns null otherwise.
Declaration
public IBlankNode GetBlankNode(string nodeId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | nodeId | Node ID. |
Returns
| Type | Description |
|---|---|
| IBlankNode | The Node if it exists in the Graph or null. |
GetLiteralNode(string, string)
Selects the Literal Node with the given Value and Language if it exists in the Graph, returns null otherwise.
Declaration
public ILiteralNode GetLiteralNode(string literal, string langspec)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
| string | langspec | Language Specifier of the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode | The Node if it exists in the Graph or null. |
GetLiteralNode(string, Uri)
Selects the Literal Node with the given Value and DataType if it exists in the Graph, returns otherwise.
Declaration
public ILiteralNode GetLiteralNode(string literal, Uri datatype)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
| System.Uri | datatype | Data Type of the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode | The Node if it exists in the Graph or null. |
GetLiteralNode(string)
Selects the Literal Node with the given Value if it exists in the Graph, returns null otherwise.
Declaration
public ILiteralNode GetLiteralNode(string literal)
Parameters
| Type | Name | Description |
|---|---|---|
| string | literal | Value of the Literal. |
Returns
| Type | Description |
|---|---|
| ILiteralNode | The Node if it exists in the Graph or null. |
GetNextBlankNodeID()
Creates a new unused Blank Node ID and returns it.
Declaration
public string GetNextBlankNodeID()
Returns
| Type | Description |
|---|---|
| string |
GetQuoted(Uri)
Selects all quoted triples which have a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetQuoted(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuoted(INode)
Selects all quoted triples which contain the given Node.
Declaration
public IEnumerable<Triple> GetQuoted(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithObject(Uri)
Selects all quoted triples where the Object is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetQuotedWithObject(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithObject(INode)
Selects all quoted triples where the Object is a given Node.
Declaration
public IEnumerable<Triple> GetQuotedWithObject(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithPredicate(Uri)
Selects all quoted triples where the Predicate is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetQuotedWithPredicate(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithPredicate(INode)
Selects all quoted triples where the Predicate is a given Node.
Declaration
public IEnumerable<Triple> GetQuotedWithPredicate(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithPredicateObject(INode, INode)
Selects all quoted triples with the given Predicate and Object.
Declaration
public IEnumerable<Triple> GetQuotedWithPredicateObject(INode pred, INode obj)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | pred | Predicate. |
| INode | obj | Object. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithSubject(Uri)
Selects all quoted triples where the Subject is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetQuotedWithSubject(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithSubject(INode)
Selects all quoted triples where the Subject is a given Node.
Declaration
public IEnumerable<Triple> GetQuotedWithSubject(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithSubjectObject(INode, INode)
Selects all quoted triples with the given Subject and Object.
Declaration
public IEnumerable<Triple> GetQuotedWithSubjectObject(INode subj, INode obj)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | subj | Subject. |
| INode | obj | Object. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetQuotedWithSubjectPredicate(INode, INode)
Selects all quoted triples with the given Subject and Predicate.
Declaration
public IEnumerable<Triple> GetQuotedWithSubjectPredicate(INode subj, INode pred)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | subj | Subject. |
| INode | pred | Predicate. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetSchema()
Declaration
public XmlSchema GetSchema()
Returns
| Type | Description |
|---|---|
| System.Xml.Schema.XmlSchema |
GetTripleNode(Triple)
Selects the Triple Node with the given Triple value if it exists in the graph.
Declaration
public ITripleNode GetTripleNode(Triple triple)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | triple | Triple. |
Returns
| Type | Description |
|---|---|
| ITripleNode | The triple node if it exists in the graph or else null. |
GetTriples(Uri)
Selects all Triples which have a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetTriples(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriples(INode)
Selects all Triples which contain the given Node.
Declaration
public IEnumerable<Triple> GetTriples(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithObject(Uri)
Selects all Triples where the Object is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetTriplesWithObject(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithObject(INode)
Selects all Triples where the Object is a given Node.
Declaration
public IEnumerable<Triple> GetTriplesWithObject(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithPredicate(Uri)
Selects all Triples where the Predicate is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithPredicate(INode)
Selects all Triples where the Predicate is a given Node.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithPredicateObject(INode, INode)
Selects all Triples with the given Predicate and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicateObject(INode pred, INode obj)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | pred | Predicate. |
| INode | obj | Object. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithSubject(Uri)
Selects all Triples where the Subject is a Uri Node with the given Uri.
Declaration
public IEnumerable<Triple> GetTriplesWithSubject(Uri u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | u | Uri. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithSubject(INode)
Selects all Triples where the Subject is a given Node.
Declaration
public IEnumerable<Triple> GetTriplesWithSubject(INode n)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | n | Node. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithSubjectObject(INode, INode)
Selects all Triples with the given Subject and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectObject(INode subj, INode obj)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | subj | Subject. |
| INode | obj | Object. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetTriplesWithSubjectPredicate(INode, INode)
Selects all Triples with the given Subject and Predicate.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectPredicate(INode subj, INode pred)
Parameters
| Type | Name | Description |
|---|---|---|
| INode | subj | Subject. |
| INode | pred | Predicate. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
GetUriNode(string)
Selects the Uri Node with the given QName if it exists in the Graph, returns null otherwise.
Declaration
public IUriNode GetUriNode(string qname)
Parameters
| Type | Name | Description |
|---|---|---|
| string | qname | QName. |
Returns
| Type | Description |
|---|---|
| IUriNode | The Node if it exists in the Graph or null. |
GetUriNode(Uri)
Selects the Uri Node with the given Uri if it exists in the Graph, returns null otherwise.
Declaration
public IUriNode GetUriNode(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | Uri. |
Returns
| Type | Description |
|---|---|
| IUriNode | The Node if it exists in the Graph or null. |
HasSubGraph(IGraph, out Dictionary<INode, INode>)
Checks whether this Graph has the given Graph as a sub-graph.
Declaration
public bool HasSubGraph(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
| System.Collections.Generic.Dictionary<TKey, TValue><INode, INode> | mapping | Mapping of Blank Nodes. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
HasSubGraph(IGraph)
Checks whether this Graph has the given Graph as a sub-graph.
Declaration
public bool HasSubGraph(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsSubGraphOf(IGraph, out Dictionary<INode, INode>)
Checks whether this Graph is a sub-graph of the given Graph.
Declaration
public bool IsSubGraphOf(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
| System.Collections.Generic.Dictionary<TKey, TValue><INode, INode> | mapping | Mapping of Blank Nodes. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsSubGraphOf(IGraph)
Checks whether this Graph is a sub-graph of the given Graph.
Declaration
public bool IsSubGraphOf(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Merge(IGraph, bool)
Merges the given Graph into this Graph.
Declaration
public void Merge(IGraph g, bool keepOriginalGraphUri)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph to merge. |
| System.Boolean | keepOriginalGraphUri | Indicates that the Merge should preserve the Graph URIs of Nodes. |
Remarks
The Graph should raise the MergeRequested event at the start of the Merge operation and abort the operation if the operation is cancelled by an event handler. On completing the Merge the Merged event should be raised.
Merge(IGraph)
Merges the given Graph into this Graph.
Declaration
public void Merge(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph to merge. |
Remarks
The Graph should raise the MergeRequested event at the start of the Merge operation and abort the operation if the operation is cancelled by an event handler. On completing the Merge the Merged event should be raised.
RaiseTripleEvent(Triple, bool)
Helper method for raising the triple events manually
Declaration
protected void RaiseTripleEvent(Triple t, bool asserted)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple |
| System.Boolean | asserted | True to raise TripleAsserted, false to raise TripleRetracted |
ReadXml(XmlReader)
Declaration
public void ReadXml(XmlReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlReader | reader |
ResolveQName(string)
Resolve a QName to a URI using this factory's NamespaceMap and BaseUri.
Declaration
public Uri ResolveQName(string qname)
Parameters
| Type | Name | Description |
|---|---|---|
| string | qname |
Returns
| Type | Description |
|---|---|
| System.Uri |
Retract(IEnumerable<Triple>)
Retracts an Enumerable of Triples from the Graph.
Declaration
public bool Retract(IEnumerable<Triple> ts)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> | ts | Enumerable of Triples. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Retract(Triple)
Retracts a Triple from the Graph.
Declaration
public bool Retract(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | A Triple. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Unstar()
Converts an graph containing quoted triples into to a graph with no quoted triples by applying the unstar operation described in https://w3c.github.io/rdf-star/cg-spec/2021-12-17.html#mapping.
Declaration
public void Unstar()
Remarks
The unstar operation modifies the graph in-place by calls to Assert(Triple) an Retract(Triple).
WriteXml(XmlWriter)
Declaration
public void WriteXml(XmlWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlWriter | writer |
Events
| Improve this Doc View SourceChanged
Event which is raised when the Graph contents change
Declaration
public event GraphEventHandler Changed
Event Type
| Type | Description |
|---|---|
| GraphEventHandler |
Cleared
Event which is raised after the Graph is cleared of its contents
Declaration
public event GraphEventHandler Cleared
Event Type
| Type | Description |
|---|---|
| GraphEventHandler |
ClearRequested
Event which is raised just before the Graph is cleared of its contents
Declaration
public event CancellableGraphEventHandler ClearRequested
Event Type
| Type | Description |
|---|---|
| CancellableGraphEventHandler |
Merged
Event which is raised when a Merge operation is completed on the Graph
Declaration
public event GraphEventHandler Merged
Event Type
| Type | Description |
|---|---|
| GraphEventHandler |
MergeRequested
Event which is raised just before a Merge operation begins on the Graph
Declaration
public event CancellableGraphEventHandler MergeRequested
Event Type
| Type | Description |
|---|---|
| CancellableGraphEventHandler |
TripleAsserted
Event which is raised when a Triple is asserted in the Graph
Declaration
public event TripleEventHandler TripleAsserted
Event Type
| Type | Description |
|---|---|
| TripleEventHandler |
Remarks
Whenever this event is raised the Changed event should also be raised
TripleRetracted
Event which is raised when a Triple is retracted from the Graph
Declaration
public event TripleEventHandler TripleRetracted
Event Type
| Type | Description |
|---|---|
| TripleEventHandler |
Remarks
Whenever this event is raised the Changed event should also be raised