Class UniqueBlankNodesHandler
A decorator for handlers which ensures that all blank nodes get unique IDs even if a blank node identifier is reused.
Inherited Members
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRdf.dll
Syntax
public class UniqueBlankNodesHandler : BaseRdfHandler, ICommentRdfHandler, IWrappingRdfHandler, IRdfHandler, INodeFactory
Remarks
In most parsing scenarios this handler is not suitable for usage as it may unintentionally modify the RDF data being parsed, in non-parsing scenarios where this handler is instead being used as a means to generate RDF data from some non-RDF source it may prove very useful.
This handler essentially works by redirecting all calls to the argument taking form of CreateBlankNode() with the non-argument form which should always generate a new blank node thus guaranteeing the uniqueness of nodes.
Constructors
| Edit this page View SourceUniqueBlankNodesHandler(IRdfHandler)
Creates a new Unique Blank Nodes handler.
Declaration
public UniqueBlankNodesHandler(IRdfHandler handler)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler |
Properties
| Edit this page View SourceAcceptsAll
Gets whether the inner handler accepts all.
Declaration
public override bool AcceptsAll { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceInnerHandlers
Gets the inner handler.
Declaration
public IEnumerable<IRdfHandler> InnerHandlers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IRdfHandler> |
Methods
| Edit this page View SourceCreateBlankNode(string)
Creates a Blank Node.
Declaration
public override IBlankNode CreateBlankNode(string nodeId)
Parameters
Type | Name | Description |
---|---|---|
string | nodeId | Node ID which will be ignored by this Handler. |
Returns
Type | Description |
---|---|
IBlankNode |
Overrides
| Edit this page View SourceEndRdfInternal(bool)
Ends handling RDF.
Declaration
protected override void EndRdfInternal(bool ok)
Parameters
Type | Name | Description |
---|---|---|
bool | ok | Whether parsing completed OK. |
Overrides
| Edit this page View SourceHandleBaseUriInternal(Uri)
Handles a Base URI declaration.
Declaration
protected override bool HandleBaseUriInternal(Uri baseUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | baseUri | Base URI. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceHandleNamespaceInternal(string, Uri)
Handles a Namespace declaration.
Declaration
protected override bool HandleNamespaceInternal(string prefix, Uri namespaceUri)
Parameters
Type | Name | Description |
---|---|---|
string | prefix | Prefix. |
Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceHandleQuadInternal(Triple, IRefNode)
Handles a quad.
Declaration
protected override bool HandleQuadInternal(Triple t, IRefNode graph)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
IRefNode | graph | The name of the graph containing the triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceHandleTripleInternal(Triple)
Handles a Triple.
Declaration
protected override bool HandleTripleInternal(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceStartRdfInternal()
Starts handling RDF.
Declaration
protected override void StartRdfInternal()