|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.input.AbstractSOMInputReader
at.tuwien.ifs.somtoolbox.input.SOMLibFormatInputReader
public class SOMLibFormatInputReader
Provides the functionality to read a saved network model in SOMLib format.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.input.AbstractSOMInputReader |
---|
AbstractSOMInputReader.UnitInformation |
Field Summary | |
---|---|
private String |
mapDescriptionFileName
|
static String |
mapFileNameSuffix
The suffix of the map description files |
private String |
unitDescriptionFileName
|
static String |
unitFileNameSuffix
The suffix of the unit description files |
static String |
weightFileNameSuffix
The suffix of the weight vector files |
private String |
weightVectorFileName
|
Fields inherited from class at.tuwien.ifs.somtoolbox.input.AbstractSOMInputReader |
---|
allVectorNames, commonLabelPrefix, dim, gridLayout, gridTopology, labelled, metricName, unitInfo, xSize, ySize, zSize |
Fields inherited from interface at.tuwien.ifs.somtoolbox.input.SOMInputReader |
---|
MAP_FILE, UNIT_FILE, WEIGHT_VECTOR |
Constructor Summary | |
---|---|
SOMLibFormatInputReader(String weightVectorFileName,
String unitDescriptionFileName,
String mapDescriptionFileName)
Sole constructor taking the name of the weight vector file, the unit description file and the map description file as arguments. |
Method Summary | |
---|---|
String |
getFilePath()
Returns the name of the path where the files are located. |
static String |
getFormatName()
|
String |
getMapDescriptionFileName()
Returns the name of the map description file, or null if not loaded. |
String |
getUnitDescriptionFileName()
Returns the name of the unit description file, or null if not loaded. |
String |
getWeightVectorFileName()
Returns the name of the weight vector file, or null if not loaded. |
protected void |
processUnitElement(String line,
int k,
int j,
int i)
|
protected void |
readMapDescriptionFile(String fileName)
Reads a SOMLib map description file with the given name. |
protected void |
readUnitDescriptionFile(String fileName)
Reads a SOMLib unit description file with the given name. |
private void |
readWeightVectorFile(String fileName)
Reads a SOMLib weight vector file with the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String mapFileNameSuffix
public static final String weightFileNameSuffix
public static final String unitFileNameSuffix
private String mapDescriptionFileName
private String unitDescriptionFileName
private String weightVectorFileName
Constructor Detail |
---|
public SOMLibFormatInputReader(String weightVectorFileName, String unitDescriptionFileName, String mapDescriptionFileName) throws FileNotFoundException, SOMLibFileFormatException
weightVectorFileName
- the name of the weight vector file.unitDescriptionFileName
- the name of the unit description file.mapDescriptionFileName
- the name of the map description file.
FileNotFoundException
- if one of the files with the given name is not found.
SOMLibFileFormatException
- if the format of one of the file is corrupt.Method Detail |
---|
public String getFilePath()
SOMInputReader
SOMInputReader.getFilePath()
public String getMapDescriptionFileName()
SOMInputReader
public String getUnitDescriptionFileName()
SOMInputReader
null
if not loaded.
null
if not loaded.public String getWeightVectorFileName()
SOMInputReader
null
if not loaded.
null
if not loaded.protected void readMapDescriptionFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.
FileNotFoundException
SOMLibFileFormatException
protected void readUnitDescriptionFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.
FileNotFoundException
SOMLibFileFormatException
private void readWeightVectorFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.
FileNotFoundException
SOMLibFileFormatException
protected void processUnitElement(String line, int k, int j, int i)
public static String getFormatName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |