Package org.dlese.dpc.schemedit.config
Class IDGenerator
java.lang.Object
org.dlese.dpc.schemedit.config.IDGenerator
Class repsonsible for generating unique IDs for a particular collection.
IDGenerator instances are stashed in the
.invalid reference
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
ConstructorsConstructorDescriptionConstructor for the IDGenerator objectIDGenerator(String idFileName, String idPrefix) IDGenerator(String idFilename, String idPrefix, Collection idList) Constructor for the IDGenerator object -
Method Summary
Modifier and TypeMethodDescriptionGets the exampleID attribute of the IDGenerator objectGets the firstID attribute of the IDGenerator objectGets the idPrefix attribute of the IDGenerator objectReturns the last ID Generatedvoidinit(Collection IDs) Sets the count attribute of the IDGenerator object.static voidThe main program for the IDGenerator classnextID()Gets next available number as string and updates id filevoidreport()voidsetIdPrefix(String prefix)
-
Constructor Details
-
IDGenerator
public IDGenerator()Constructor for the IDGenerator object -
IDGenerator
-
IDGenerator
Constructor for the IDGenerator object- Parameters:
idFilename- NOT YET DOCUMENTEDidPrefix- NOT YET DOCUMENTEDidList- NOT YET DOCUMENTED
-
-
Method Details
-
init
Sets the count attribute of the IDGenerator object.- Parameters:
IDs- The new count value
-
getIdPrefix
Gets the idPrefix attribute of the IDGenerator object- Returns:
- The idPrefix value
-
setIdPrefix
-
getExampleID
Gets the exampleID attribute of the IDGenerator object- Returns:
- The exampleID value
-
getFirstID
Gets the firstID attribute of the IDGenerator object- Returns:
- The firstID value
-
nextID
Gets next available number as string and updates id file- Returns:
- Description of the Return Value
-
getLastID
Returns the last ID Generated- Returns:
- The lastID value
-
main
The main program for the IDGenerator class- Parameters:
args- The command line arguments
-
report
public void report()
-