Package adams.core
Class RProjectHelper
- java.lang.Object
-
- adams.core.RProjectHelper
-
public class RProjectHelper extends Object
Helper class for the R project setup.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILENAMEthe props file.protected booleanm_Modifiedwhether the settings got modified.protected adams.core.Propertiesm_Propertiesthe properties.protected static RProjectHelperm_Singletonthe singleton.static StringR_EXECUTABLEthe R executable.static StringRSERVE_HOSTthe Rserve host to connect to.static StringRSERVE_PORTthe Rserve port to connect on.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FilegetRExecutable()Returns the R executable.StringgetRserveHost()Returns the Rserve host.intgetRservePort()Returns the Rserve port.static RProjectHelpergetSingleton()Returns the singleton.booleanisModified()Whether the settings got modified.voidreload()Reloads the properties file.booleansave()Saves the settings in the user's home directory.voidsetRExecutable(File value)Updates the R executable.voidsetRserveHost(String value)Updates the Rserve host.voidsetRservePort(int value)Updates the Rserve port.
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the props file.- See Also:
- Constant Field Values
-
R_EXECUTABLE
public static final String R_EXECUTABLE
the R executable.- See Also:
- Constant Field Values
-
RSERVE_HOST
public static final String RSERVE_HOST
the Rserve host to connect to.- See Also:
- Constant Field Values
-
RSERVE_PORT
public static final String RSERVE_PORT
the Rserve port to connect on.- See Also:
- Constant Field Values
-
m_Singleton
protected static RProjectHelper m_Singleton
the singleton.
-
m_Properties
protected adams.core.Properties m_Properties
the properties.
-
m_Modified
protected boolean m_Modified
whether the settings got modified.
-
-
Method Detail
-
isModified
public boolean isModified()
Whether the settings got modified.- Returns:
- true if modified
-
getRExecutable
public File getRExecutable()
Returns the R executable.- Returns:
- the executable
-
setRExecutable
public void setRExecutable(File value)
Updates the R executable.- Parameters:
value- the executable
-
getRserveHost
public String getRserveHost()
Returns the Rserve host.- Returns:
- the host
-
setRserveHost
public void setRserveHost(String value)
Updates the Rserve host.- Parameters:
value- the host
-
getRservePort
public int getRservePort()
Returns the Rserve port.- Returns:
- the port
-
setRservePort
public void setRservePort(int value)
Updates the Rserve port.- Parameters:
value- the port
-
reload
public void reload()
Reloads the properties file. Discards any unsaved settings.
-
save
public boolean save()
Saves the settings in the user's home directory.- Returns:
- true if successfully saved
-
getSingleton
public static RProjectHelper getSingleton()
Returns the singleton.- Returns:
- the singleton
-
-