Class RdfBlankNode
java.lang.Object
io.github.webbasedwodt.model.ontology.rdf.RdfBlankNode
- All Implemented Interfaces:
RdfNode
,RdfResource
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
ConstructorDescriptionRdfBlankNode
(String blankNodeId) Default constructor.RdfBlankNode
(String blankNodeId, List<RdfUnSubjectedTriple> tripleList) Constructor that allows you to configure the Blank Node with existing triples. -
Method Summary
Modifier and TypeMethodDescriptionaddPredicate
(RdfUnSubjectedTriple triple) Add a triple to the BlankNode.Get the blank node id.Get the triples inside the Blank node.getUri()
Get the URI of the Resource.
-
Constructor Details
-
RdfBlankNode
Default constructor. It creates a Blank Node without any triples.- Parameters:
blankNodeId
- the blank node id, used to safely update data.
-
RdfBlankNode
Constructor that allows you to configure the Blank Node with existing triples.- Parameters:
blankNodeId
- the blank node id, used to safely update data.tripleList
- the unsubjected triples to add
-
-
Method Details
-
addPredicate
Add a triple to the BlankNode. Note that this is an immutable data structure, so it returns a newRdfBlankNode
.- Parameters:
triple
- the triple to add- Returns:
- the modified version of the Blank Node
-
getBlankNodeId
Get the blank node id.- Returns:
- the blank node id
-
getPredicates
Get the triples inside the Blank node.- Returns:
- the list of triples
-
getUri
Description copied from interface:RdfResource
Get the URI of the Resource.- Specified by:
getUri
in interfaceRdfResource
- Returns:
- the uri, if present (e.g., in Blank Nodes is not present) of the resource
-