UniVista.support
Class Code

java.lang.Object
  |
  +--UniVista.support.Code
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Code
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class holds information about a Code, desribing the variables and groupings of a modeling code. Note that the StudyHash is a transient object and must be created from the Study tables.

See Also:
Serialized Form

Constructor Summary
Code()
           
 
Method Summary
 java.lang.Object clone()
          clone the Code
 void duplicate(Code newVal)
          duplicate another code's settings
 boolean equals(java.lang.Object obj)
          compare two Code objects for equality except for NameLists
 java.lang.String getCodeName()
           
 java.lang.String getDescription()
          get and set the description
 java.lang.String getDocumentationURL()
          get and set the documentation URL
 GroupNode getGroupNodeForVariable(Variable theVar)
          Returns the GroupNode for a given variable
 java.lang.String getNameList()
          get and set the code name used internally by UniVista and the database
 StudyHash getStudies()
          get and set the study hash
 int getStudyIterator()
          get and set the study iterator...really shouldn't be done but it's here for a quick hack to dupicate a code
 java.lang.String getUniqueStudyName()
          Get a unique study name for this code
 GroupNode getVariableGrouping()
          get and set the variable groupings
 VariableHash getVariables()
          get and set the variable hash
 java.lang.String getVisibleCodeName()
          get and set the code name used in lists that are presented to the user
static java.lang.String mapName(java.lang.String in)
          Maps a string to an internal code name.
 void setCodeName(java.lang.String code)
           
 void setDescription(java.lang.String descr)
           
 void setDocumentationURL(java.lang.String doc)
           
 void setNameList(java.lang.String tempNameList)
           
 void setStudies(StudyHash newStudies)
           
 void setStudyIterator(int newIter)
           
 void setVariableGroup(GroupNode newGroup)
           
 void setVariables(VariableHash theVars)
           
 void setVisibleCodeName(java.lang.String code)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Code

public Code()
Method Detail

clone

public java.lang.Object clone()
clone the Code
Overrides:
clone in class java.lang.Object

duplicate

public void duplicate(Code newVal)
duplicate another code's settings
Parameters:
newVal - the Code to duplicate from

equals

public boolean equals(java.lang.Object obj)
compare two Code objects for equality except for NameLists
Overrides:
equals in class java.lang.Object

getNameList

public java.lang.String getNameList()
get and set the code name used internally by UniVista and the database

setNameList

public void setNameList(java.lang.String tempNameList)

getCodeName

public java.lang.String getCodeName()

getDescription

public java.lang.String getDescription()
get and set the description

getDocumentationURL

public java.lang.String getDocumentationURL()
get and set the documentation URL

getGroupNodeForVariable

public GroupNode getGroupNodeForVariable(Variable theVar)
Returns the GroupNode for a given variable

getStudies

public StudyHash getStudies()
get and set the study hash

getStudyIterator

public int getStudyIterator()
get and set the study iterator...really shouldn't be done but it's here for a quick hack to dupicate a code

getUniqueStudyName

public java.lang.String getUniqueStudyName()
Get a unique study name for this code

getVariableGrouping

public GroupNode getVariableGrouping()
get and set the variable groupings

getVariables

public VariableHash getVariables()
get and set the variable hash

getVisibleCodeName

public java.lang.String getVisibleCodeName()
get and set the code name used in lists that are presented to the user

mapName

public static java.lang.String mapName(java.lang.String in)
Maps a string to an internal code name. It strips out everything except letters and numbers.

setCodeName

public void setCodeName(java.lang.String code)

setDescription

public void setDescription(java.lang.String descr)

setDocumentationURL

public void setDocumentationURL(java.lang.String doc)

setStudies

public void setStudies(StudyHash newStudies)

setStudyIterator

public void setStudyIterator(int newIter)

setVariableGroup

public void setVariableGroup(GroupNode newGroup)

setVariables

public void setVariables(VariableHash theVars)

setVisibleCodeName

public void setVisibleCodeName(java.lang.String code)