DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.config
Class IDGenerator

java.lang.Object
  extended by org.dlese.dpc.schemedit.config.IDGenerator

public class IDGenerator
extends Object

Class repsonsible for generating unique IDs for a particular collection.

IDGenerator instances are stashed in the org.dlese.dpc.schemedit.ids.IDManager.

Version:
$Id: IDGenerator.java,v 1.4 2009/03/20 23:33:56 jweather Exp $
Author:
ostwald

$Id: IDGenerator.java,v 1.4 2009/03/20 23:33:56 jweather Exp $


Constructor Summary
IDGenerator()
          Constructor for the IDGenerator object
IDGenerator(String idFileName, String idPrefix)
           
IDGenerator(String idFilename, String idPrefix, Collection idList)
          Constructor for the IDGenerator object
 
Method Summary
 String getExampleID()
          Gets the exampleID attribute of the IDGenerator object
 String getFirstID()
          Gets the firstID attribute of the IDGenerator object
 String getIdPrefix()
          Gets the idPrefix attribute of the IDGenerator object
 String getLastID()
          Returns the last ID Generated
 void init(Collection IDs)
          Sets the count attribute of the IDGenerator object.
static void main(String[] args)
          The main program for the IDGenerator class
 String nextID()
          Gets next available number as string and updates id file
 void report()
           
 void setIdPrefix(String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDGenerator

public IDGenerator()
Constructor for the IDGenerator object


IDGenerator

public IDGenerator(String idFileName,
                   String idPrefix)

IDGenerator

public IDGenerator(String idFilename,
                   String idPrefix,
                   Collection idList)
Constructor for the IDGenerator object

Parameters:
idFilename - NOT YET DOCUMENTED
idPrefix - NOT YET DOCUMENTED
idList - NOT YET DOCUMENTED
Method Detail

init

public void init(Collection IDs)
Sets the count attribute of the IDGenerator object.

Parameters:
IDs - The new count value

getIdPrefix

public String getIdPrefix()
Gets the idPrefix attribute of the IDGenerator object

Returns:
The idPrefix value

setIdPrefix

public void setIdPrefix(String prefix)

getExampleID

public String getExampleID()
Gets the exampleID attribute of the IDGenerator object

Returns:
The exampleID value

getFirstID

public String getFirstID()
Gets the firstID attribute of the IDGenerator object

Returns:
The firstID value

nextID

public String nextID()
Gets next available number as string and updates id file

Returns:
Description of the Return Value

getLastID

public String getLastID()
Returns the last ID Generated

Returns:
The lastID value

main

public static void main(String[] args)
The main program for the IDGenerator class

Parameters:
args - The command line arguments

report

public void report()

DLESE Tools
v1.6.0