Class GraphHandler
A RDF Handler which asserts Triples into a Graph.
Inherited Members
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRdf.dll
Syntax
public class GraphHandler : BaseRdfHandler, IRdfHandler, INodeFactory
Constructors
| Improve this Doc View SourceGraphHandler(IGraph)
Creates a new Graph Handler.
Declaration
public GraphHandler(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph. |
Properties
| Improve this Doc View SourceAcceptsAll
Gets that this Handler accepts all Triples.
Declaration
public override bool AcceptsAll { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceGraph
Gets the Graph that this handler wraps.
Declaration
protected IGraph Graph { get; }
Property Value
| Type | Description |
|---|---|
| IGraph |
Methods
| Improve this Doc View SourceEndRdfInternal(bool)
Ends Handling RDF discarding the handled Triples if parsing failed (indicated by false for the ok parameter) and otherwise merging the handled triples from the temporary graph into the target graph if necessary.
Declaration
protected override void EndRdfInternal(bool ok)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | ok | Indicates whether parsing completed OK. |
Overrides
| Improve this Doc View SourceHandleBaseUriInternal(Uri)
Handles Base URI Declarations by setting the Graphs Base URI.
Declaration
protected override bool HandleBaseUriInternal(Uri baseUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | baseUri | Base URI. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceHandleNamespaceInternal(string, Uri)
Handles Namespace Declarations by adding them to the Graphs Namespace Map.
Declaration
protected override bool HandleNamespaceInternal(string prefix, Uri namespaceUri)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix | Namespace Prefix. |
| System.Uri | namespaceUri | Namespace URI. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceHandleQuadInternal(Triple, IRefNode)
Handles Quads by asserting them in the target graph specified in the constructor of this handler.
Declaration
protected override bool HandleQuadInternal(Triple t, IRefNode graph)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | |
| IRefNode | graph | The name of the graph containing the triple. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Remarks
This handler asserts all triples received into the target graph, regardless of the graph name passed in graph.
HandleTripleInternal(Triple)
Handles Triples by asserting them in the Graph.
Declaration
protected override bool HandleTripleInternal(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceStartRdfInternal()
Starts Handling RDF ensuring that if the target Graph is non-empty RDF is handling into a temporary Graph until parsing completes successfully.
Declaration
protected override void StartRdfInternal()