Class BaseRdfHandler
Abstract Base Class for RDF Handlers.
Inheritance
Inherited Members
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseRdfHandler : BaseHandler, ICommentRdfHandler, IRdfHandler, INodeFactory
Constructors
| Edit this page View SourceBaseRdfHandler()
Creates a new RDF Handler.
Declaration
protected BaseRdfHandler()
BaseRdfHandler(INodeFactory)
Creates a new RDF Handler using the given Node Factory.
Declaration
protected BaseRdfHandler(INodeFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| INodeFactory | factory | Node Factory. |
Properties
| Edit this page View SourceAcceptsAll
Gets whether the Handler will accept all Triples i.e. it will never abort handling early.
Declaration
public abstract bool AcceptsAll { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceEndRdf(bool)
Ends the Handling of RDF.
Declaration
public void EndRdf(bool ok)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | ok | Whether the parsing completed without error. |
EndRdfInternal(bool)
Optionally used by derived Handlers to do additional actions on ending RDF handling.
Declaration
protected virtual void EndRdfInternal(bool ok)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | ok | Whether the parsing completed without error. |
HandleBaseUri(Uri)
Handles Base URI declarations.
Declaration
public bool HandleBaseUri(Uri baseUri)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | baseUri | Base URI. |
Returns
| Type | Description |
|---|---|
| bool |
HandleBaseUriInternal(Uri)
Optionally used by derived Handlers to do additional actions on handling Base URI declarations.
Declaration
protected virtual bool HandleBaseUriInternal(Uri baseUri)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | baseUri | Base URI. |
Returns
| Type | Description |
|---|---|
| bool |
HandleComment(string)
Handles Comments.
Declaration
public bool HandleComment(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Comment text. |
Returns
| Type | Description |
|---|---|
| bool |
HandleCommentInternal(string)
Optionally used by derived Handlers to do additional actions on handling Comments.
Declaration
protected virtual bool HandleCommentInternal(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Comment text. |
Returns
| Type | Description |
|---|---|
| bool |
HandleNamespace(string, Uri)
Handles Namespace declarations.
Declaration
public bool HandleNamespace(string prefix, Uri namespaceUri)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix | Prefix. |
| Uri | namespaceUri | Namespace URI. |
Returns
| Type | Description |
|---|---|
| bool |
HandleNamespaceInternal(string, Uri)
Optionally used by derived Handlers to do additional actions on handling namespace declarations.
Declaration
protected virtual bool HandleNamespaceInternal(string prefix, Uri namespaceUri)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix | Prefix. |
| Uri | namespaceUri | Namespace URI. |
Returns
| Type | Description |
|---|---|
| bool |
HandleQuad(Triple, IRefNode)
Handles Quads.
Declaration
public bool HandleQuad(Triple t, IRefNode graph)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to handle. |
| IRefNode | graph | The name of the graph containing the triple. |
Returns
| Type | Description |
|---|---|
| bool |
Exceptions
| Type | Condition |
|---|---|
| RdfParseException | Raised if the handler is not currently in a state to handle quads. |
HandleQuadInternal(Triple, IRefNode)
Must be overridden by derived handlers to take appropriate Quad handling action.
Declaration
protected abstract bool HandleQuadInternal(Triple t, IRefNode graph)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple. |
| IRefNode | graph | Name of the graph containing the triple. |
Returns
| Type | Description |
|---|---|
| bool |
Remarks
Implementations that expect to only handle triples in the un-named graph SHOULD
provide an implementation for this method that checks if graph
is null and if so perform their standard triple handling processing.
HandleTriple(Triple)
Handles Triples.
Declaration
public bool HandleTriple(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple. |
Returns
| Type | Description |
|---|---|
| bool |
HandleTripleInternal(Triple)
Must be overridden by derived handlers to take appropriate Triple handling action.
Declaration
protected abstract bool HandleTripleInternal(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple. |
Returns
| Type | Description |
|---|---|
| bool |
StartRdf()
Starts the Handling of RDF.
Declaration
public void StartRdf()
StartRdfInternal()
Optionally used by derived Handlers to do additional actions on starting RDF handling.
Declaration
protected virtual void StartRdfInternal()