com.sas.sasserver
Class SASProcedureTemplate

com.sas.sasserver.SASProcedureTemplate
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.collection.ContentsChangedListener, com.sas.ComponentInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.ViewDefaultModelInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

public class SASProcedureTemplate
implements com.sas.ViewDefaultModelInterface


  The SASProcedureTemplate class extends Template and is used for creating SAS PROC statements.
  The SASProcedureTemplate class creates the following template:
  

PROC %PROC %DATASET(DATA=%DATASET, ) %OUTPUT( OUT=%OUTPUT, ); %BY(BY %BY;) %PROCPRINT(,PROC PRINT;) RUN;

In addition, the SASProcedureTemplate class creates a dictionary with entries for the PROC, DATASET, OUTPUT, and BY properties. Users of the class simply set the property values without having to supply a dictionary.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_TEMPLATE
          The default template to use in the default constructor.
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.util.Template
dlist, hasInitialized
 
Constructor Summary
SASProcedureTemplate()
          Construct a SASProcedureTemplate object with the default template.
SASProcedureTemplate(java.lang.String templ)
          Construct a SASProcedureTemplate object with the specified template
 
Method Summary
 java.lang.Object clone()
          Creates a copy of the current model
 java.lang.String getBy()
          Returns the value of the by property
 java.lang.String getDataSet()
          Returns the value of the dataSet property
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns the ExtendedBeanInfo for this class.
 java.lang.String getOption(java.lang.String opt)
          Returns the value of an option(variable) or null if the option does not exist in the dictionary
 java.lang.String getOutput()
          Returns the value of the output property
 java.lang.String getProc()
          Returns the value of the proc property
 boolean isDefaultModelAttached()
          Returns whether the default model is attached.
 boolean isProcPrint()
          Returns the value of the procprint property
 void removeOption(java.lang.String option)
          Remove user-defined options
 void setBy(java.lang.String s)
          Sets the by property
 void setDataSet(java.lang.String s)
          Sets the dataSet property
 void setDefaultValues()
          This method sets the initial values to the default values.
 void setOption(java.lang.String option, java.lang.String s)
          Sets user-defined options(variables) in the dictionary
 void setOutput(java.lang.String s)
          Sets the output property
 void setProc(java.lang.String s)
          Sets the proc property
 void setProcPrint(boolean b)
          Sets the procprint property
 
Methods inherited from class com.sas.util.Template
attachModel, contentsChanged, detachModel, getClose, getMarker, getOpen, getRequiredInterfaces, getTemplate, getText, initialize, refresh, refresh, setClose, setMarker, setOpen, setTemplate, setText
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

DEFAULT_TEMPLATE

public static final java.lang.String DEFAULT_TEMPLATE
The default template to use in the default constructor. This is the string "PROC %PROC %DATASET(DATA=%DATASET, ) %OUTPUT( OUT=%OUTPUT, ); %BY(BY %BY;) %PROCPRINT(PROC PRINT;, ) RUN;"

See Also:
Constant Field Values
Constructor Detail

SASProcedureTemplate

public SASProcedureTemplate()
Construct a SASProcedureTemplate object with the default template.


SASProcedureTemplate

public SASProcedureTemplate(java.lang.String templ)
Construct a SASProcedureTemplate object with the specified template

Parameters:
templ - specified template
Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class.

Returns:
ExtendedBeanInfo for this class

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a copy of the current model

Overrides:
clone in class Template
Returns:
a clone of this object
Throws:
java.lang.CloneNotSupportedException - if the object cannot be cloned

getBy

public java.lang.String getBy()
Returns the value of the by property

Returns:
value of the by property

getDataSet

public java.lang.String getDataSet()
Returns the value of the dataSet property

Returns:
value of the dataSet property

getOption

public java.lang.String getOption(java.lang.String opt)
Returns the value of an option(variable) or null if the option does not exist in the dictionary

Returns:
value of the option

getOutput

public java.lang.String getOutput()
Returns the value of the output property

Returns:
value of the output property

getProc

public java.lang.String getProc()
Returns the value of the proc property

Returns:
value of the proc property

isProcPrint

public boolean isProcPrint()
Returns the value of the procprint property

Returns:
procprint value

removeOption

public void removeOption(java.lang.String option)
Remove user-defined options

Parameters:
option - name of option to remove

setBy

public void setBy(java.lang.String s)
Sets the by property

Parameters:
s - by property value

setDataSet

public void setDataSet(java.lang.String s)
Sets the dataSet property

Parameters:
s - dataSet property value

setDefaultValues

public void setDefaultValues()
This method sets the initial values to the default values. This method is called by the Component constructors. The setDefaultValues method of each class is responsible for setting its own initial values.

Specified by:
setDefaultValues in interface com.sas.ComponentInterface
Overrides:
setDefaultValues in class Template
See Also:
ComponentInterface.setDefaultValues()

setOption

public void setOption(java.lang.String option,
                      java.lang.String s)
Sets user-defined options(variables) in the dictionary

Parameters:
option - option name
s - option value

setOutput

public void setOutput(java.lang.String s)
Sets the output property

Parameters:
s - output property value

setProc

public void setProc(java.lang.String s)
Sets the proc property

Parameters:
s - proc property value

setProcPrint

public void setProcPrint(boolean b)
Sets the procprint property

Parameters:
s - procprint property value

isDefaultModelAttached

public boolean isDefaultModelAttached()
Returns whether the default model is attached.

Specified by:
isDefaultModelAttached in interface com.sas.ViewDefaultModelInterface
Returns:
whether the default model is attached.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.