The base class of SemWeb.Entity, SemWeb.BNode, SemWeb.Literal, and SemWeb.Variable, the nodes in an RDF graph.
|
There are two types of resources in the RDF world: entities and literals. Entities are nodes in the graph. They can be either named (i.e. they have a URI) or unnamed (i.e. they are anonymous, or "blank"). All of these things are represented by the SemWeb.Entity class, which is a subclass of SemWeb.Resource. However, unnamed "blank" nodes are represented by a special subclass of Entity, the SemWeb.BNode class. So, when you want to create a named node, use new Entity(uri), but when you want to create a new blank node, use new BNode(). Never say new Entity(null).
Literals, which are textual strings, are represented by the SemWeb.Literal class. In RDF, literals can only be the objects of statements. Use the Value property of a literal to get back its string value.
There is a special type of blank node in this library for variables used in queries and inferencing. These are represented by the SemWeb.Variable class, which inherits from the SemWeb.BNode class. The SemWeb.N3Reader will read ?variable resources as SemWeb.Variables. The name of the variable will be put in its SemWeb.BNode.LocalName property.
The == and != operators have been overloaded for Resources. Two resources are equal if they are both SemWeb.Entity objects and the SemWeb.Entity overloaded == operator returns true, or if they are both SemWeb.Literal objects with equal values for Value, Language, and DataType.
See Also: Inherited members from object.
CompareTo
(Resource) Compares two resources. |
|
GetResourceKey
(object) To be added. |
|
SetResourceKey
(object, object) To be added. |
The URI of this resource.
Tests two Resources for equality.
Tests two Resources for inequality.
Compares two resources.
To be added.
To be added.