adams.core
Class RProjectHelper

java.lang.Object
  extended by adams.core.RProjectHelper

public class RProjectHelper
extends Object

Helper class for the R project setup.

Version:
$Revision: 6580 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Field Summary
static String FILENAME
          the props file.
protected  boolean m_Modified
          whether the settings got modified.
protected  Properties m_Properties
          the properties.
protected static RProjectHelper m_Singleton
          the singleton.
static String R_EXECUTABLE
          the R executable.
static String RSERVE_HOST
          the Rserve host to connect to.
static String RSERVE_PORT
          the Rserve port to connect on.
 
Method Summary
 File getRExecutable()
          Returns the R executable.
 String getRserveHost()
          Returns the Rserve host.
 int getRservePort()
          Returns the Rserve port.
static RProjectHelper getSingleton()
          Returns the singleton.
 boolean isModified()
          Whether the settings got modified.
 void reload()
          Reloads the properties file.
 boolean save()
          Saves the settings in the user's home directory.
 void setRExecutable(File value)
          Updates the R executable.
 void setRserveHost(String value)
          Updates the Rserve host.
 void setRservePort(int value)
          Updates the Rserve port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.