Class BlankNodeGenerator
Default implementation of the IBlankNodeGenerator interface.
Implements
Inherited Members
Namespace: VDS.RDF.JsonLd.Processors
Assembly: dotNetRdf.dll
Syntax
public class BlankNodeGenerator : IBlankNodeGenerator
Constructors
| Edit this page View SourceBlankNodeGenerator(string)
Create a new generator instance.
Declaration
public BlankNodeGenerator(string counterPrefix = "b")
Parameters
Type | Name | Description |
---|---|---|
string | counterPrefix | The value to insert before the counter part of the generated blank node identifier. Must be a non-empty string. |
Methods
| Edit this page View SourceClone()
Returns a copy of the object.
Declaration
public IBlankNodeGenerator Clone()
Returns
Type | Description |
---|---|
IBlankNodeGenerator |
GenerateBlankNodeIdentifier(string)
Generates a unique blank node identifier for the specified input identifier.
Declaration
public string GenerateBlankNodeIdentifier(string identifier)
Parameters
Type | Name | Description |
---|---|---|
string | identifier |
Returns
Type | Description |
---|---|
string |
Remarks
Blank node identifiers are of the form _:{counterPrefix}{count} where {counterPrefix} is the string provided in the constructor of this class and {count} is a monotonically increasing integer value.
GetDictionary()
Returns the mapping dictionary. Only useful for unit tests.
Declaration
public IDictionary<string, string> GetDictionary()
Returns
Type | Description |
---|---|
IDictionary<string, string> |
GetMappedIdentifier(string)
Returns the mapped identifier for the specified input identifier, or null if no mapping exists.
Declaration
public string GetMappedIdentifier(string identifier)
Parameters
Type | Name | Description |
---|---|---|
string | identifier |
Returns
Type | Description |
---|---|
string |
GetMappedIdentifiers()
Returns all input identifiers mapped by this issuer.
Declaration
public IEnumerable<string> GetMappedIdentifiers()
Returns
Type | Description |
---|---|
IEnumerable<string> |