Class BlankNodeId


  • public class BlankNodeId
    extends java.lang.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:
    JenaParameters.disableBNodeUIDGeneration
    • Constructor Summary

      Constructors 
      Constructor Description
      BlankNodeId​(java.lang.String id)
      Create a new BlankNodeId from the string argument supplied.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static BlankNodeId create()
      Creates new BlankNodeId with a fresh internal id
      static BlankNodeId create​(java.lang.String id)
      Creates new BlankNodeId with the given id
      boolean equals​(java.lang.Object other)
      Test whether two id's are the same
      boolean equals1​(java.lang.Object obj)  
      java.lang.String getLabelString()
      Answer the label string of this BlankNodeId.
      int hashCode()
      return a hashcode for this id
      int hashCode1()  
      java.lang.String toString()
      return a string representation of the id
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BlankNodeId

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

      • create

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

        public static BlankNodeId create​(java.lang.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 java.lang.Object
        Returns:
        the hash code
      • equals

        public boolean equals​(java.lang.Object other)
        Test whether two id's are the same
        Overrides:
        equals in class java.lang.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​(java.lang.Object obj)
      • toString

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

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