com.hp.hpl.jena.rdf.model
Class AnonId

java.lang.Object
  extended by com.hp.hpl.jena.rdf.model.AnonId

public class AnonId
extends Object

Create a new id for an anonymous node.

This id is guaranteed to be unique on this machine.

Version:
$Name: not supported by cvs2svn $ $Revision: 1.3 $ $Date: 2010-01-06 11:52:32 $
Author:
bwm

Constructor Summary
AnonId()
          Creates new AnonId.
AnonId(String id)
          Create a new AnonId from the string argument supplied
 
Method Summary
static AnonId create()
           
static AnonId create(String id)
           
 boolean equals(Object o)
          Test whether two id's are the same
 String getLabelString()
          Answer the label string of this AnonId.
 int hashCode()
          return a hashcode for this id
 String toString()
          return a string representation of the id
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnonId

public AnonId()
Creates new AnonId. Normally this id is guaranteed to be unique on this machine: it is time-dependant. However, sometimes [incorrect] code is sensitive to bnode ordering and produces bizarre bugs (both Dave and Chris have been bitten by this, as have some users, I think). Hence the disableBNodeUIDGeneration flag, which allows bnode IDs to be predictable.


AnonId

public AnonId(String id)
Create a new AnonId from the string argument supplied

Parameters:
id - A string representation of the id to be created.
Method Detail

create

public static AnonId create()

create

public static AnonId create(String id)

equals

public boolean equals(Object o)
Test whether two id's are the same

Overrides:
equals in class Object
Parameters:
o - the object to be compared
Returns:
true if and only if the two id's are the same

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 AnonId. To be used in preference to toString().


hashCode

public int hashCode()
return a hashcode for this id

Overrides:
hashCode in class Object
Returns:
the hash code


Licenced under the Apache License, Version 2.0