public class UnitFileReader extends Object
| Constructor and Description |
|---|
UnitFileReader()
Empty constructor; need to call load() separately.
|
UnitFileReader(String fileName)
Create a unit file reader from the given unit file
|
| Modifier and Type | Method and Description |
|---|---|
Unit |
getNextUnit(Unit u)
Return the unit following the given unit in the original database.
|
int |
getNumberOfUnits()
Get the number of units in the file.
|
Unit |
getPreviousUnit(Unit u)
Return the unit preceding the given unit in the original database.
|
int |
getSampleRate()
Get the sample rate of the file.
|
Unit |
getUnit(int i)
Return the unit number i.
|
Unit[] |
getUnit(int[] i)
Return an array of units from their indexes.
|
boolean |
isEdgeUnit(int i)
Determine whether the unit number i is an "edge" unit, i.e.
|
void |
load(String fileName)
Load the given unit file
|
public UnitFileReader()
load(String)public UnitFileReader(String fileName) throws IOException, MaryConfigurationException
fileName - the unit file to readIOException - if a problem occurs while readingMaryConfigurationException - MaryConfigurationExceptionpublic void load(String fileName) throws IOException, MaryConfigurationException
fileName - the unit file to readIOException - if a problem occurs while readingMaryConfigurationException - MaryConfigurationExceptionpublic int getNumberOfUnits()
public int getSampleRate()
public Unit getUnit(int i)
i - The index of the considered unit.public Unit[] getUnit(int[] i)
i - The indexes of the considered units.public Unit getNextUnit(Unit u)
u - a unitpublic Unit getPreviousUnit(Unit u)
u - a unitpublic boolean isEdgeUnit(int i)
i - The index of the considered unit.Copyright © 2000–2016 DFKI GmbH. All rights reserved.