Package org.apache.jena.graph
Class BlankNodeId
- java.lang.Object
-
- org.apache.jena.graph.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 idstatic BlankNodeId
create(java.lang.String id)
Creates new BlankNodeId with the given idboolean
equals(java.lang.Object other)
Test whether two id's are the sameboolean
equals1(java.lang.Object obj)
java.lang.String
getLabelString()
Answer the label string of this BlankNodeId.int
hashCode()
return a hashcode for this idint
hashCode1()
java.lang.String
toString()
return a string representation of the id
-
-
-
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 classjava.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 classjava.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 classjava.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 totoString
-
-