public class IdConvertor extends Object
TimetableXMLSaver
to anonymise benchmark data sets. Conversion file
can be provided by IdConvertor.File system property (e.g.
-DIdConvertor.File=.\idconf.xml). Constructor and Description |
---|
IdConvertor(String file)
Constructor -- use
getInstance() to get an instance of
this class. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear id conversion table.
|
String |
convert(String type,
String id)
Convert id of given type.
|
static IdConvertor |
getInstance()
Get an instance of IdConvertor class.
|
void |
load()
Load id conversion file.
|
void |
load(File file)
Load id conversion file.
|
void |
save()
Save id conversion file.
|
void |
save(File file)
Save id conversion file.
|
public IdConvertor(String file)
getInstance()
to get an instance of
this class.file
- file to load / savepublic static IdConvertor getInstance()
public String convert(String type, String id)
type
- object typeid
- unique idpublic void clear()
public void save()
public void load()