Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BlankNode.cs
2{
7 {
11 public BlankNode()
12 : this(null)
13 {
14 }
15
20 public BlankNode(string NodeId)
21 {
22 this.NodeId = NodeId;
23 }
24
28 public override bool IsLiteral => false;
29
33 public string NodeId { get; set; }
34
38 public override object AssociatedObjectValue => this;
39
41 public override string ToString()
42 {
43 return "_:" + this.NodeId.ToString();
44 }
45
47 public override bool Equals(object obj)
48 {
49 return obj is BlankNode Typed &&
50 Typed.NodeId == this.NodeId;
51 }
52
54 public override int GetHashCode()
55 {
56 return this.NodeId.GetHashCode();
57 }
58
70 public override int CompareTo(object obj)
71 {
72 if (obj is BlankNode Typed)
73 return this.NodeId.CompareTo(Typed.NodeId);
74 else
75 return base.CompareTo(obj);
76 }
77 }
78}
Represents a blank node
Definition: BlankNode.cs:7
override int CompareTo(object obj)
Compares the current instance with another object of the same type and returns an integer that indica...
Definition: BlankNode.cs:70
override object AssociatedObjectValue
Associated object value.
Definition: BlankNode.cs:38
string NodeId
Blank node Node ID.
Definition: BlankNode.cs:33
BlankNode(string NodeId)
Represents a blank node
Definition: BlankNode.cs:20
override bool IsLiteral
If element is a literal.
Definition: BlankNode.cs:28
override bool Equals(object obj)
Definition: BlankNode.cs:47
BlankNode()
Represents a blank node
Definition: BlankNode.cs:11
Abstract base class for semantic elements.