Package io.github.webbasedwodt.ontology
Class BlankNode
java.lang.Object
io.github.webbasedwodt.ontology.BlankNode
It models the concept of RDF Blank Node in the context of Digital Twin Knowledge Graph.
A Blank Node could have an associated list of predicates.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.BlankNode
(List<org.apache.commons.lang3.tuple.Pair<RdfProperty, Node>> predicates) Constructor that allows you to configure the Blank Node with existing predicates. -
Method Summary
Modifier and TypeMethodDescriptionaddPredicate
(org.apache.commons.lang3.tuple.Pair<RdfProperty, Node> predicate) Add a predicate to the BlankNode.List<org.apache.commons.lang3.tuple.Pair<RdfProperty,
Node>> Get the predicates inside the Blank node.getUri()
Get the URI of the Resource.
-
Constructor Details
-
BlankNode
public BlankNode()Default constructor. It creates a Blank Node without any predicates. -
BlankNode
Constructor that allows you to configure the Blank Node with existing predicates.- Parameters:
predicates
- the predicates to add
-
-
Method Details
-
addPredicate
Add a predicate to the BlankNode. Note that this is an immutable data structure, so it returns a new [BlankNode].- Parameters:
predicate
- the predicate to add- Returns:
- the modified version of the Blank Node
-
getPredicates
Get the predicates inside the Blank node.- Returns:
- the list of predicates
-
getUri
Description copied from interface:Resource
Get the URI of the Resource.
-