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, IRdfHandler, INodeFactory
Constructors
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceEndRdf(bool)
Ends the Handling of RDF.
Declaration
public void EndRdf(bool ok)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | 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 |
---|---|---|
System.Boolean | ok | Whether the parsing completed without error. |
HandleBaseUri(Uri)
Handles Base URI declarations.
Declaration
public bool HandleBaseUri(Uri baseUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | baseUri | Base URI. |
Returns
Type | Description |
---|---|
System.Boolean |
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 |
---|---|---|
System.Uri | baseUri | Base URI. |
Returns
Type | Description |
---|---|
System.Boolean |
HandleNamespace(string, Uri)
Handles Namespace declarations.
Declaration
public bool HandleNamespace(string prefix, Uri namespaceUri)
Parameters
Type | Name | Description |
---|---|---|
string | prefix | Prefix. |
System.Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
System.Boolean |
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. |
System.Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |
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()