Show / Hide Table of Contents

Class BlankNodeGenerator

Default implementation of the IBlankNodeGenerator interface.

Inheritance
object
BlankNodeGenerator
Implements
IBlankNodeGenerator
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.JsonLd.Processors
Assembly: dotNetRdf.dll
Syntax
public class BlankNodeGenerator : IBlankNodeGenerator

Constructors

| Edit this page View Source

BlankNodeGenerator(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 Source

Clone()

Returns a copy of the object.

Declaration
public IBlankNodeGenerator Clone()
Returns
Type Description
IBlankNodeGenerator
| Edit this page View Source

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.

| Edit this page View Source

GetDictionary()

Returns the mapping dictionary. Only useful for unit tests.

Declaration
public IDictionary<string, string> GetDictionary()
Returns
Type Description
IDictionary<string, string>
| Edit this page View Source

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
| Edit this page View Source

GetMappedIdentifiers()

Returns all input identifiers mapped by this issuer.

Declaration
public IEnumerable<string> GetMappedIdentifiers()
Returns
Type Description
IEnumerable<string>

Implements

IBlankNodeGenerator

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • BlankNodeGenerator(string)
  • Methods
    • Clone()
    • GenerateBlankNodeIdentifier(string)
    • GetDictionary()
    • GetMappedIdentifier(string)
    • GetMappedIdentifiers()
  • Implements
  • Extension Methods
Back to top Generated by DocFX