Package org.yamcs.xtce
Class EmptyNodeLoader
- java.lang.Object
-
- org.yamcs.xtce.EmptyNodeLoader
-
- All Implemented Interfaces:
SpaceSystemLoader
public class EmptyNodeLoader extends Object implements SpaceSystemLoader
Database "loader" that simply creates an empty SpaceSystem with the given name
-
-
Constructor Summary
Constructors Constructor Description EmptyNodeLoader(String name)EmptyNodeLoader(YConfiguration args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConfigName()The filename used to save the database after all the loaders have loaded it, is based on a concatenation of the config names returned by the loaders.SpaceSystemload()loads the SpaceSystem database in memory.booleanneedsUpdate(RandomAccessFile consistencyDateFile)voidwriteConsistencyDate(FileWriter consistencyDateFile)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtce.SpaceSystemLoader
loadList
-
-
-
-
Constructor Detail
-
EmptyNodeLoader
public EmptyNodeLoader(YConfiguration args)
-
EmptyNodeLoader
public EmptyNodeLoader(String name)
-
-
Method Detail
-
load
public SpaceSystem load() throws ConfigurationException, DatabaseLoadException
Description copied from interface:SpaceSystemLoaderloads the SpaceSystem database in memory. Some references may be unresolved- Specified by:
loadin interfaceSpaceSystemLoader- Throws:
DatabaseLoadExceptionConfigurationException
-
needsUpdate
public boolean needsUpdate(RandomAccessFile consistencyDateFile) throws IOException, ConfigurationException
- Specified by:
needsUpdatein interfaceSpaceSystemLoader- Parameters:
consistencyDateFile- check in this file when the last database has been loaded- Returns:
- if this loader has to reload the database from its source
- Throws:
IOException- if the consistencyDateFile can not be read for some reasonConfigurationException
-
getConfigName
public String getConfigName() throws ConfigurationException
Description copied from interface:SpaceSystemLoaderThe filename used to save the database after all the loaders have loaded it, is based on a concatenation of the config names returned by the loaders. Thus if a loader can have multiple versions of the database, they should be saved in multiple files.- Specified by:
getConfigNamein interfaceSpaceSystemLoader- Returns:
- a string to be used as the filename where the serialised instance will be stored.
- Throws:
ConfigurationException- in case some of the configuration properties do not exist
-
writeConsistencyDate
public void writeConsistencyDate(FileWriter consistencyDateFile) throws IOException
- Specified by:
writeConsistencyDatein interfaceSpaceSystemLoader- Parameters:
consistencyDateFile- the file in which the consistency date should be written- Throws:
IOException- if the consistency date file can't be written for some reason
-
-