Class BlankNode

java.lang.Object
io.github.webbasedwodt.ontology.BlankNode
All Implemented Interfaces:
Node, Resource

public final class BlankNode extends Object implements Resource
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 Details

    • BlankNode

      public BlankNode()
      Default constructor. It creates a Blank Node without any predicates.
    • BlankNode

      public BlankNode(List<org.apache.commons.lang3.tuple.Pair<RdfProperty,Node>> predicates)
      Constructor that allows you to configure the Blank Node with existing predicates.
      Parameters:
      predicates - the predicates to add
  • Method Details

    • addPredicate

      public BlankNode addPredicate(org.apache.commons.lang3.tuple.Pair<RdfProperty,Node> predicate)
      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

      public List<org.apache.commons.lang3.tuple.Pair<RdfProperty,Node>> getPredicates()
      Get the predicates inside the Blank node.
      Returns:
      the list of predicates
    • getUri

      public Optional<String> getUri()
      Description copied from interface: Resource
      Get the URI of the Resource.
      Specified by:
      getUri in interface Resource
      Returns:
      the uri, as an Optional String, of the resource