Class BaseDescribeAlgorithm
Abstract Base Class for SPARQL Describe Algorithms which provides BNode rewriting functionality.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Utils.Describe
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseDescribeAlgorithm : IDescribeAlgorithm
Methods
| Improve this Doc View SourceDescribe(IRdfHandler, ITripleIndex, IEnumerable<INode>, Uri, INamespaceMapper)
Generates a graph which is the description of the resources represented by the provided nodes.
Declaration
public void Describe(IRdfHandler handler, ITripleIndex dataset, IEnumerable<INode> nodes, Uri baseUri = null, INamespaceMapper namespaceMap = null)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | The handler to receive the triples that provide the description. |
ITripleIndex | dataset | The dataset to extract descriptions from. |
System.Collections.Generic.IEnumerable<T><INode> | nodes | The nodes to be described. |
System.Uri | baseUri | An optional base URI to pass through to the RDF handler. |
INamespaceMapper | namespaceMap | An optional namespace map to pass through to the RDF handler. |
Describe(ITripleIndex, IEnumerable<INode>)
Generates a Graph which is the description of the resources represented by the provided nodes.
Declaration
public IGraph Describe(ITripleIndex dataset, IEnumerable<INode> nodes)
Parameters
Type | Name | Description |
---|---|---|
ITripleIndex | dataset | The dataset to extract descriptions from. |
System.Collections.Generic.IEnumerable<T><INode> | nodes | The nodes to be described. |
Returns
Type | Description |
---|---|
IGraph |
DescribeInternal(IRdfHandler, ITripleIndex, IEnumerable<INode>)
Generates the Description for each of the Nodes to be described.
Declaration
protected abstract void DescribeInternal(IRdfHandler handler, ITripleIndex dataset, IEnumerable<INode> nodes)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
ITripleIndex | dataset | Dataset to extract descriptions from. |
System.Collections.Generic.IEnumerable<T><INode> | nodes | Nodes to be described. |
RewriteDescribeBNodes(Triple, Dictionary<string, INode>, INodeFactory)
Helper method which rewrites Blank Node IDs for Describe Queries.
Declaration
protected Triple RewriteDescribeBNodes(Triple t, Dictionary<string, INode> mapping, INodeFactory factory)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
System.Collections.Generic.Dictionary<TKey, TValue><string, INode> | mapping | Mapping of IDs to new Blank Nodes. |
INodeFactory | factory | Factory to create Nodes in. |
Returns
Type | Description |
---|---|
Triple |