org.rosuda.JGR.robjects
Class RObject

java.lang.Object
  extended by org.rosuda.JGR.robjects.RObject

public class RObject
extends java.lang.Object

RModel - This is a simple java-representation of an object from R providing some information about it.

Author:
Markus Helbig RoSuDa 2003 - 2005

Constructor Summary
RObject(java.lang.String name, java.lang.String type, boolean b)
          Create a new RObject
RObject(java.lang.String name, java.lang.String type, RObject parent, boolean b)
          Create a new RObject
 
Method Summary
 java.lang.String getInfo()
          Get provided information about this object.
 java.lang.String getName()
          Get name of object
 RObject getParent()
          Get parent object.
 java.lang.String getRName()
          Get real R-name of this object, e.g.: Cars[["displacement"]].
 java.lang.String getType()
          Get type of object: numeric, character ....
 boolean isAtomar()
          Check wether the object is atomar or not, atomar objects are: function, integer, numeric, character, logical, factor, environment (because they are not supported).
 boolean isEditable()
          Check if editing this object is supported, types which are supported are: numeric, integer, factor, character, data.frame, matrix, list.
 void setInfo(java.lang.String s)
          Set information about object, depends on object: data.frame -> dimension, function -> arguments, factor -> levels, ....
 void setName(java.lang.String name)
          Set name of object.
 void setParent(RObject p)
          Set parent object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RObject

public RObject(java.lang.String name,
               java.lang.String type,
               RObject parent,
               boolean b)
Create a new RObject

Parameters:
name - name of object
type - type of object
parent - parent object, e.g. if it's an inner vector of a data.frame
b - is there are real R-name or should we set a number instead

RObject

public RObject(java.lang.String name,
               java.lang.String type,
               boolean b)
Create a new RObject

Parameters:
name - name of object
type - type of object
b - is there are real R-name or should we set a number instead
Method Detail

setName

public void setName(java.lang.String name)
Set name of object.

Parameters:
name - name of object

getName

public java.lang.String getName()
Get name of object

Returns:
name of object

getType

public java.lang.String getType()
Get type of object: numeric, character ....

Returns:
type of object

setParent

public void setParent(RObject p)
Set parent object.

Parameters:
p - parent object

getParent

public RObject getParent()
Get parent object.

Returns:
parent object

isAtomar

public boolean isAtomar()
Check wether the object is atomar or not, atomar objects are: function, integer, numeric, character, logical, factor, environment (because they are not supported).

Returns:
true if it's atomar, false if it is not

isEditable

public boolean isEditable()
Check if editing this object is supported, types which are supported are: numeric, integer, factor, character, data.frame, matrix, list.

Returns:
true if editing is allowed, false if not

getRName

public java.lang.String getRName()
Get real R-name of this object, e.g.: Cars[["displacement"]].

Returns:
R-name

setInfo

public void setInfo(java.lang.String s)
Set information about object, depends on object: data.frame -> dimension, function -> arguments, factor -> levels, ....

Parameters:
s - information depending on object

getInfo

public java.lang.String getInfo()
Get provided information about this object.

Returns:
information

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object