Class ComparisonHelper
Static Helper class containing standard implementations of Comparison between various Node types.
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public static class ComparisonHelper
Methods
| Edit this page View SourceCompareBlankNodes(IBlankNode, IBlankNode)
Compares two Blank Nodes.
Declaration
public static int CompareBlankNodes(IBlankNode a, IBlankNode b)
Parameters
Type | Name | Description |
---|---|---|
IBlankNode | a | First Blank Node. |
IBlankNode | b | Second Blank Node. |
Returns
Type | Description |
---|---|
int |
CompareGraphLiterals(IGraphLiteralNode, IGraphLiteralNode)
Compares two Graph Literals.
Declaration
public static int CompareGraphLiterals(IGraphLiteralNode a, IGraphLiteralNode b)
Parameters
Type | Name | Description |
---|---|---|
IGraphLiteralNode | a | First Graph Literal. |
IGraphLiteralNode | b | Second Graph Literal. |
Returns
Type | Description |
---|---|
int |
CompareLiterals(ILiteralNode, ILiteralNode, CultureInfo, CompareOptions, IUriFactory)
Compares two Literal Nodes.
Declaration
public static int CompareLiterals(ILiteralNode a, ILiteralNode b, CultureInfo culture = null, CompareOptions comparisonOptions = CompareOptions.Ordinal, IUriFactory uriFactory = null)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | a | First Literal Node. |
ILiteralNode | b | Second Literal Node. |
CultureInfo | culture | Culture to use for lexical string comparisons where more natural comparisons are not possible/applicable. If not specified (or specified as null), defaults to InvariantCulture. |
CompareOptions | comparisonOptions | String Comparison options used for lexical string comparisons where more natural comparisons are not possible/applicable. Defaults to Ordinal if not specified. |
IUriFactory | uriFactory | Factory to use when creating temporary URIs for comparison purposes. If not specified, Root will be used. |
Returns
Type | Description |
---|---|
int |
CompareUris(Uri, Uri)
Compares two URIs.
Declaration
public static int CompareUris(Uri a, Uri b)
Parameters
Type | Name | Description |
---|---|---|
Uri | a | First URI. |
Uri | b | Second URI. |
Returns
Type | Description |
---|---|
int |
CompareUris(IUriNode, IUriNode)
Compares two URI Nodes.
Declaration
public static int CompareUris(IUriNode a, IUriNode b)
Parameters
Type | Name | Description |
---|---|---|
IUriNode | a | First URI Node. |
IUriNode | b | Second URI Node. |
Returns
Type | Description |
---|---|
int |
CompareVariables(IVariableNode, IVariableNode)
Compares two Variable Nodes.
Declaration
public static int CompareVariables(IVariableNode a, IVariableNode b)
Parameters
Type | Name | Description |
---|---|---|
IVariableNode | a | First Variable Node. |
IVariableNode | b | Second Variable Node. |
Returns
Type | Description |
---|---|
int |