Class BlankNodeId

java.lang.Object
org.apache.jena.graph.BlankNodeId

public class BlankNodeId extends Object
System identifier for a blank node. Blank nodes have identity (you can .equals them apart) but no external stable identifier like a URI.

Databases need a persistent identifier for blank nodes - BlankNodeId.

The equivalent concept for the API is AnonId. Historically, that has been in the org.apache.jena.rdf.model package.

This id is guaranteed to be globally unique.

See Also:
  • Constructor Details

    • BlankNodeId

      public BlankNodeId(String id)
      Create a new BlankNodeId from the string argument supplied.
      Parameters:
      id - A string representation of the id to be created.
  • Method Details

    • create

      public static BlankNodeId create()
      Creates new BlankNodeId with a fresh internal id
    • create

      public static BlankNodeId create(String id)
      Creates new BlankNodeId with the given id
    • hashCode1

      public int hashCode1()
    • hashCode

      public int hashCode()
      return a hashcode for this id
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals(Object other)
      Test whether two id's are the same
      Overrides:
      equals in class Object
      Parameters:
      other - the object to be compared
      Returns:
      true if and only if the two id's are the same
    • equals1

      public boolean equals1(Object obj)
    • toString

      public String toString()
      return a string representation of the id
      Overrides:
      toString in class Object
      Returns:
      a string representation of the id
    • getLabelString

      public String getLabelString()
      Answer the label string of this BlankNodeId. To be used in preference to toString