org.edg.data.util.naming
Class GUIDGenerator

java.lang.Object
  |
  +--org.edg.data.util.naming.GUIDGenerator

public final class GUIDGenerator
extends java.lang.Object

This class implements the NameGenerator interface to create Grid Unique Identifiers. GUIDs are based on the UUID standard and have the form guid:79ccc961-27ef-11d7-a8f9-b74543dd1452 We use the doomdark.org JUG package to implement this generator.

Version:
$Id $
Author:
Peter Kunszt

Constructor Summary
GUIDGenerator()
          create a new configured generator
 
Method Summary
 boolean checkName(java.net.URI guid)
          Check whether the given string conforms to the naming rules for GUIDs.
 java.net.URI generate()
          Generates a valid GUID based on the UUID standard.
 java.net.URI generate(java.lang.String macAddress)
          This creates a guid URI takes into account the MAC address of the host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIDGenerator

public GUIDGenerator()
create a new configured generator

Method Detail

checkName

public boolean checkName(java.net.URI guid)
Check whether the given string conforms to the naming rules for GUIDs.

Parameters:
guid -
Returns:
true or false depending whether the GUID rules are followed or not.

generate

public java.net.URI generate()
Generates a valid GUID based on the UUID standard. This will be a URI, with the guid scheme identifier, and the scheme specific path being a guid generated according to the UUID standard.


generate

public java.net.URI generate(java.lang.String macAddress)
This creates a guid URI takes into account the MAC address of the host. It should be given as a string as six colon separated two digit hex numbers, e.g. "00:07:E9:DB:9A:1B". It returns null if the mac address string was invalid (i.e. not of the valid form ) or null