at.tuwien.ifs.somtoolbox.data
Class InputDataFactory

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.data.InputDataFactory

public class InputDataFactory
extends Object

A factory class that knows how to build a InputData object from a given file name

Version:
$Id: InputDataFactory.java 3868 2010-10-21 15:52:31Z mayer $
Author:
Rudolf Mayer

Field Summary
static String[] INPUT_FILE_FORMAT_TYPES
          Supported Input File Format Types
private static HashMap<String,Class<? extends AbstractSOMLibSparseInputData>> inputClasses
           
private static HashMap<String,String> knownExtensions
           
 
Constructor Summary
InputDataFactory()
           
 
Method Summary
static String detectInputFormatFromExtension(String inputFileName, String type)
           
static InputData open(String inputVectorFileName)
           
static InputData open(String formatName, String inputFileName)
           
static InputData open(String vectorFileName, String templateFileName, boolean sparse, boolean norm, int numCacheBlocks, long seed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputClasses

private static final HashMap<String,Class<? extends AbstractSOMLibSparseInputData>> inputClasses

INPUT_FILE_FORMAT_TYPES

public static final String[] INPUT_FILE_FORMAT_TYPES
Supported Input File Format Types


knownExtensions

private static final HashMap<String,String> knownExtensions
Constructor Detail

InputDataFactory

public InputDataFactory()
Method Detail

open

public static InputData open(String vectorFileName,
                             String templateFileName,
                             boolean sparse,
                             boolean norm,
                             int numCacheBlocks,
                             long seed)

open

public static InputData open(String inputVectorFileName)

open

public static InputData open(String formatName,
                             String inputFileName)
                      throws SOMToolboxException
Throws:
SOMToolboxException

detectInputFormatFromExtension

public static String detectInputFormatFromExtension(String inputFileName,
                                                    String type)
                                             throws SOMToolboxException
Throws:
SOMToolboxException