|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiListener
stella.sensor.DailyDumpRepository
public class DailyDumpRepository
This class dumps all incomming data from the sensors to data files. To avoid
massive data-build up in a single file, the data is split up into daily
peaces. Note that the KEY_LIST property and the
KEY_ASCIIFILE property should point to a comma-separated list of
equal dimension.
| Nested Class Summary | |
|---|---|
private static class |
DailyDumpRepository.Parser
A command line parser class to allow direct parameter hand-over. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static String |
DEFBAD
The default good-weather indicator. |
private static String |
DEFEXTENSION
The default dump file name. |
private static String |
DEFGOOD
The default good-weather indicator. |
private static double |
DEFNAN
The default nan replacement. |
static String |
KEY_ASCIIFILE
The key linked to the dump files. |
static String |
KEY_BAD
The key pointing to the string added for good weather. |
static String |
KEY_GOOD
The key pointing to the string added for good weather. |
static String |
KEY_LIST
The key linked to the sensor binds. |
static String |
KEY_NAN
The key pointing to the replacement of NaN's. |
static String |
KEY_PATH
The key pointing to the output dir. |
private Map |
lastmap
The hash map used for linking sensor names to last data receives. |
private Map |
namemap
The hash map used for linking sensor names to sensor files. |
private List |
sensorbind
The list of sensor bind names. |
private List |
sensordump
The list of sensor dump files. |
private Map |
streammap
The hash map used for linking sensor names to file streams. |
| Fields inherited from class util.rmi.AbstractRmiListener |
|---|
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAY |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
DailyDumpRepository(Map prop)
Constructs a new short-average repository. |
|
| Method Summary | |
|---|---|
protected boolean |
deregisterAtCaster(RmiCaster rmi,
Class single)
Registers at the given caster. |
private String |
getFileHeader(String name)
Some header information. |
protected void |
initDailyDumpRepository()
Initializes the short average repository. |
static void |
main(String[] arg)
Starts the daily dump. |
private String |
openStream(String sensor,
int mjd)
Opens the file as a stream for writing. |
protected boolean |
registerAtCaster(RmiCaster rmi,
Class single)
Registers at the given caster. |
void |
rmiDataAvailable(DataEvent de)
The data receiving edge of the repository. |
| Methods inherited from class util.rmi.AbstractRmiListener |
|---|
allBound, blockBinding, blockBinding, disconnect, exit, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBinding |
| Methods inherited from class util.rmi.RmiPropertyContainer |
|---|
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.rmi.RmiEventListener |
|---|
getListenerName |
| Methods inherited from interface util.rmi.RmiListener |
|---|
disconnect, isConnected |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Methods inherited from interface util.Initializable |
|---|
init |
| Field Detail |
|---|
public static final String KEY_LIST
public static final String KEY_PATH
public static final String KEY_ASCIIFILE
public static final String KEY_NAN
public static final String KEY_GOOD
public static final String KEY_BAD
private static final double DEFNAN
private static final String DEFGOOD
private static final String DEFBAD
private static final String DEFEXTENSION
private Map lastmap
private Map streammap
private Map namemap
private List sensorbind
private List sensordump
| Constructor Detail |
|---|
public DailyDumpRepository(Map prop)
throws RemoteException
KEY_NAN, the KEY_BAD, and the KEY_GOOD
are assigned
with their default values, if not present in the properties.
RemoteException| Method Detail |
|---|
protected void initDailyDumpRepository()
public void rmiDataAvailable(DataEvent de)
throws RemoteException
rmiDataAvailable in interface RmiDataListenerRemoteException
protected boolean registerAtCaster(RmiCaster rmi,
Class single)
RmiDataCaster, the repository registers at it.
registerAtCaster in class AbstractRmiListener
protected boolean deregisterAtCaster(RmiCaster rmi,
Class single)
RmiDataCaster, the repository registers at it.
deregisterAtCaster in class AbstractRmiListener
private String openStream(String sensor,
int mjd)
throws IOException
getFileHeader(java.lang.String) is called and writtn as a file header.To ensure proper closing of the file, a shutdown-hook is added to the system.
IOExceptionprivate String getFileHeader(String name)
public static void main(String[] arg)
throws ParseException,
RemoteException
ParseException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||