***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.storedprocess.metadata
Class GenericStream

com.sas.services.storedprocess.metadata.GenericStream
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XMLStream

public class GenericStream
implements java.io.Serializable

Describes a design time GenericStream data source or target object.

Since:
9.2
See Also:
Serialized Form

Constructor Summary
GenericStream()
          Constructs and empty Generic Stream Data Source or Data Target object.
 
Method Summary
 boolean allowsRewinds()
          Describes whether the stream should allows rewinds.
 java.lang.String getExpectedContentType()
          Returns the expected content type.
 java.lang.String getFileref()
          Returns the SAS fileref name.
 void setAllowRewinds(boolean allowRewinds)
          Sets whether rewinding is supported.
 void setExpectedContentType(java.lang.String expectedContentType)
          Sets the expected content type.
 void setFileref(java.lang.String fileref)
          Sets the SAS fileref name.
 void validate()
          Validates the GenericStream.
 

Constructor Detail

GenericStream

public GenericStream()
Constructs and empty Generic Stream Data Source or Data Target object. By default a data source is returned and the expected content type set to "application/unknown"; a data Target can be constructed by calling DataSourceOrTarget.setSource(boolean). Rewinding is only supported for data sources and can be specified via the setAllowRewinds(boolean) method.

Method Detail

getFileref

public java.lang.String getFileref()
Returns the SAS fileref name.

Returns:
the SAS fileref name

getExpectedContentType

public java.lang.String getExpectedContentType()
Returns the expected content type.

Returns:
the expected content type

allowsRewinds

public boolean allowsRewinds()
                      throws java.lang.IllegalStateException
Describes whether the stream should allows rewinds. If true, it does; if false, it does not. This setting is only valid for data sources.

Returns:
whether the stream allows rewinds
Throws:
java.lang.IllegalStateException - if called on a data target

setFileref

public void setFileref(java.lang.String fileref)
Sets the SAS fileref name.


setExpectedContentType

public void setExpectedContentType(java.lang.String expectedContentType)
Sets the expected content type.


setAllowRewinds

public void setAllowRewinds(boolean allowRewinds)
Sets whether rewinding is supported. This setting is only valid for data sources.


validate

public void validate()
              throws ServiceException
Validates the GenericStream. There is no requirement for consumer code to call this method. The fileref is validated. The fileref should be non-empty and satisfy the requirements of Names.validateSASFilerefName(). The type should be one of the types listed in #setType(String).

Specified by:
validate in class com.sas.services.storedprocess.metadata.DataSourceOrTarget
Throws:
ServiceException - if validation fails

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.