Class NodeFactory
A default implementation of a Node Factory which generates Nodes unrelated to Graphs (wherever possible we suggest using a Graph based implementation instead).
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRDF.dll
Syntax
public class NodeFactory : INodeFactory
Constructors
| Improve this Doc View SourceNodeFactory()
Creates a new Node Factory.
Declaration
public NodeFactory()
Methods
| Improve this Doc View SourceCreateBlankNode()
Creates a Blank Node with a new automatically generated ID.
Declaration
public IBlankNode CreateBlankNode()
Returns
Type | Description |
---|---|
IBlankNode |
CreateBlankNode(String)
Creates a Blank Node with the given Node ID.
Declaration
public IBlankNode CreateBlankNode(string nodeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeId | Node ID. |
Returns
Type | Description |
---|---|
IBlankNode |
CreateGraphLiteralNode()
Creates a Graph Literal Node which represents the empty Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode()
Returns
Type | Description |
---|---|
IGraphLiteralNode |
CreateGraphLiteralNode(IGraph)
Creates a Graph Literal Node which represents the given Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode(IGraph subgraph)
Parameters
Type | Name | Description |
---|---|---|
IGraph | subgraph | Subgraph. |
Returns
Type | Description |
---|---|
IGraphLiteralNode |
CreateLiteralNode(String)
Creates a Literal Node with the given Value.
Declaration
public ILiteralNode CreateLiteralNode(string literal)
Parameters
Type | Name | Description |
---|---|---|
System.String | literal | Value of the Literal. |
Returns
Type | Description |
---|---|
ILiteralNode |
CreateLiteralNode(String, String)
Creates a Literal Node with the given Value and Language.
Declaration
public ILiteralNode CreateLiteralNode(string literal, string langspec)
Parameters
Type | Name | Description |
---|---|---|
System.String | literal | Value of the Literal. |
System.String | langspec | Language Specifier for the Literal. |
Returns
Type | Description |
---|---|
ILiteralNode |
CreateLiteralNode(String, Uri)
Creates a Literal Node with the given Value and Data Type.
Declaration
public ILiteralNode CreateLiteralNode(string literal, Uri datatype)
Parameters
Type | Name | Description |
---|---|---|
System.String | literal | Value of the Literal. |
System.Uri | datatype | Data Type URI of the Literal. |
Returns
Type | Description |
---|---|
ILiteralNode |
CreateUriNode(Uri)
Creates a URI Node for the given URI.
Declaration
public IUriNode CreateUriNode(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | URI. |
Returns
Type | Description |
---|---|
IUriNode |
CreateVariableNode(String)
Creates a Variable Node for the given Variable Name.
Declaration
public IVariableNode CreateVariableNode(string varname)
Parameters
Type | Name | Description |
---|---|---|
System.String | varname |
Returns
Type | Description |
---|---|
IVariableNode |
GetNextBlankNodeID()
Creates a new unused Blank Node ID and returns it.
Declaration
public string GetNextBlankNodeID()
Returns
Type | Description |
---|---|
System.String |