public class UFFFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.HashMap |
CLASSMAP |
protected static UFFFactory |
instance |
Modifier | Constructor and Description |
---|---|
protected |
UFFFactory() |
Modifier and Type | Method and Description |
---|---|
DatasetIF |
createDataset(int id)
Create a Dataset by id.
|
UFFIF |
createUFF(java.io.BufferedReader reader)
Create the UFF object
|
UFFIF |
createUFF(java.io.InputStream is)
Create the UFF object
|
UFFIF |
createUFF(java.io.Reader reader)
Create the UFF object
|
protected java.lang.Class |
getClassForId(int id)
Get the class for the specified id.
|
static UFFFactory |
getInstance()
Get the instance of the factory.
|
static void |
main(java.lang.String[] args)
The testing routine.
|
protected static UFFFactory instance
protected static java.util.HashMap CLASSMAP
public static UFFFactory getInstance()
public UFFIF createUFF(java.io.InputStream is) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
is
- the input stream from which the object will be read.java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public UFFIF createUFF(java.io.Reader reader) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
is
- the input stream from which the object will be read.java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public UFFIF createUFF(java.io.BufferedReader reader) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
is
- the input stream from which the object will be read.java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public DatasetIF createDataset(int id) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
id
- The UFF dataset id.java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
protected java.lang.Class getClassForId(int id) throws java.lang.ClassNotFoundException
id
- the idjava.lang.ClassNotFoundException
- if class is not available or not class is defined for id.public static void main(java.lang.String[] args)
args
-