com.f1j.data.source
Interface Source

All Known Implementing Classes:
com.f1j.data.source.SourceImpl, JDBC, InputStream, File, DOM

public interface Source
extends com.f1j.util.SharedConst

this is the basic interface to all data sources.


Method Summary
 short getCodePage()
          Deprecated. As of version 9.0, use Handler.getCodePage instead.
 Handler getDataHandler()
          Deprecated.  
 int getDataHandlerType()
          Deprecated.  
 DataQueryCollection getDataQueryCollection()
          Returns the DataQueryCollection for this data source.
 DataRange[] getDataRanges()
          Returns those data ranges currently listening to this data source.
 Group getGroup()
          Returns the Group this data source belongs to.
 java.lang.String getIntermediateXmlOption(java.lang.String option)
           
 java.util.Properties getIntermediateXmlOptions()
           
 java.lang.String getName()
          Returns the defined name representing this data source.
 int getRefreshIndex()
          Returns this data source's index in the refresh order, 0-based.
 boolean isEnableBackgroundRefresh()
          Deprecated. As of 9.0, no replacement.
 boolean isEnableSourceRemovalBeforeSave()
          Returns whether this data source is set to remove itself before the file is saved.
 boolean isListening(DataRange range)
          Returns whether the specified data range is listening to this data source or any of this data source's data queries.
 boolean isParameterRequired(java.lang.String paramName)
          Returns whether this query requires the specified report parameter.
 void registerDataRangeListener(DataRange range)
          Deprecated. As of version 9.0, use DataRangeCollection.setDataQuery or DataRangeCollection.setDataSource
 void releaseConnection()
          Releases any connections that may be maintained by the Data Source.
 void setCodePage(short codePage)
          Deprecated. As of 9.0, use Handler.setCodePage instead.
 void setDataHandler(int dataType)
          Deprecated.  
 void setEnableBackgroundRefresh(boolean save)
          Deprecated. As of 9.0, no replacement.
 void setEnableSourceRemovalBeforeSave(boolean enable)
          Sets this data source to remove itself before saving this file.
 void setIntermediateXmlOption(java.lang.String option, java.lang.String value)
           
 void setName(java.lang.String sourceName)
          Sets the defined name that will represent this data source.
 void setRefreshIndex(int index)
          Sets this data source's index in the refresh order, 0-based.
 void unregisterDataRangeListener(DataRange range)
          Deprecated. As of version 9.0, use DataRangeCollection.setDataQuery or DataRangeCollection.setDataSource
 

Method Detail

getCodePage

public short getCodePage()
Deprecated. As of version 9.0, use Handler.getCodePage instead.
Returns the default code page used by this data source.
See Also:
setCodePage(short)

getDataHandler

public Handler getDataHandler()
Deprecated.  
Returns the data handler associated with this data source. if using the new com.f1j.data.query package, use the DataQuery.getDataHandler method instead.
Returns:
the Handler for this data source.
See Also:
setDataHandler(int)

getDataHandlerType

public int getDataHandlerType()
Deprecated.  
Returns the current data handler type associated with this data source. if using the new com.f1j.data.query package, use the DataQuery.getDataHandlerType method instead.
Returns:
an int indicating the type of the current data handler:

DataHandler Data Types
Type Description
com.f1j.data.handler.Handler.kJDBCResultSet JDBC result set type.
com.f1j.data.handler.Handler.kDelimitedText Character-delimited text type.
com.f1j.data.handler.Handler.kPositionalText Positionally delimited text type.
com.f1j.data.handler.Handler.kXML XML data type
com.f1j.data.handler.Handler.kInvalid indicates that an invalid data type was used

See Also:
setDataHandler(int)

getDataQueryCollection

public DataQueryCollection getDataQueryCollection()
Returns the DataQueryCollection for this data source.
Returns:
the DataQueryCollection for this data source
See Also:
DataQueryCollection

getDataRanges

public DataRange[] getDataRanges()
Returns those data ranges currently listening to this data source. if using the new com.f1j.data.query package, use the DataQuery.getDataRanges method instead.
Returns:
a string array listing of data ranges.
See Also:
DataRange, isListening(com.f1j.data.DataRange), registerDataRangeListener(com.f1j.data.DataRange), unregisterDataRangeListener(com.f1j.data.DataRange)

getGroup

public Group getGroup()
Returns the Group this data source belongs to.

getIntermediateXmlOption

public java.lang.String getIntermediateXmlOption(java.lang.String option)
See Also:
DataQuery.setIntermediateXmlOption(java.lang.String, java.lang.String)

getIntermediateXmlOptions

public java.util.Properties getIntermediateXmlOptions()
See Also:
DataQuery.setIntermediateXmlOption(java.lang.String, java.lang.String)

getName

public java.lang.String getName()
Returns the defined name representing this data source.
Returns:
a defined name as a text string.
See Also:
setName(java.lang.String)

getRefreshIndex

public int getRefreshIndex()
Returns this data source's index in the refresh order, 0-based. A setting of -1 means no refresh order preference is set.
Returns:
an integer indicating the data source's location in the refresh order.
See Also:
setRefreshIndex(int)

isEnableBackgroundRefresh

public boolean isEnableBackgroundRefresh()
Deprecated. As of 9.0, no replacement.
Returns whether this data source is set to refresh in the background.
Returns:
boolean. true = background refresh enabled.
See Also:
setEnableBackgroundRefresh(boolean)

isEnableSourceRemovalBeforeSave

public boolean isEnableSourceRemovalBeforeSave()
Returns whether this data source is set to remove itself before the file is saved. if this flag is set to true when the file is saved, this data source, and all of its data queries and listening data ranges will be removed before saving the file.
Returns:
boolean. true = remove source before save enabled.
See Also:
setEnableSourceRemovalBeforeSave(boolean)

isListening

public boolean isListening(DataRange range)
Returns whether the specified data range is listening to this data source or any of this data source's data queries.
Parameters:
range - the default or defined name of the data range.
See Also:
getDataRanges(), DataRange, registerDataRangeListener(com.f1j.data.DataRange), unregisterDataRangeListener(com.f1j.data.DataRange)

isParameterRequired

public boolean isParameterRequired(java.lang.String paramName)
Returns whether this query requires the specified report parameter.
Returns:
boolean true = collection requires the specified parameter.

registerDataRangeListener

public void registerDataRangeListener(DataRange range)
Deprecated. As of version 9.0, use DataRangeCollection.setDataQuery or DataRangeCollection.setDataSource
Connects a data range with this data source. Note: Connecting multiple ranges with the same name to a single data query will silently fail.
Parameters:
range - the default or defined name of the data range.
See Also:
getDataRanges(), DataRange, unregisterDataRangeListener(com.f1j.data.DataRange), isListening(com.f1j.data.DataRange)

releaseConnection

public void releaseConnection()
Releases any connections that may be maintained by the Data Source.

setCodePage

public void setCodePage(short codePage)
Deprecated. As of 9.0, use Handler.setCodePage instead.
Sets the default code page associated with this data source.
Parameters:
codePage - a short indicating the codePage.

setIntermediateXmlOption

public void setIntermediateXmlOption(java.lang.String option,
                                     java.lang.String value)
                              throws F1Exception
See Also:
DataQuery.setIntermediateXmlOption(java.lang.String, java.lang.String)

setName

public void setName(java.lang.String sourceName)
             throws F1Exception
Sets the defined name that will represent this data source.
Parameters:
sourceName - a defined name representing the data source.
Throws:
java.lang.UnsupportedOperationException - thrown if this source is the Data Set Cache.
F1Exception - Duplicate_Name Error is thrown when trying to set the name to an existing name.
See Also:
getName()

setDataHandler

public void setDataHandler(int dataType)
                    throws F1Exception
Deprecated.  
Changes the type of data this data source will handle. if using the new 9.x com.f1j.data.query package, use DataQuery.setDataHandlerType instead.
Parameters:
dataType - a valid data type:

DataHandler Data Types
Type Description
com.f1j.data.handler.Handler.kJDBCResultSet JDBC result set type.
com.f1j.data.handler.Handler.kDelimitedText Character-delimited text type.
com.f1j.data.handler.Handler.kPositionalText Positionally delimited text type.
com.f1j.data.handler.Handler.kXML XML data type

Throws:
F1Exception -  
See Also:
com.f1j.data.handler, getDataHandler()

setEnableBackgroundRefresh

public void setEnableBackgroundRefresh(boolean save)
Deprecated. As of 9.0, no replacement.
Turns on background refresh for this data source.
Parameters:
save - boolean: true/false
See Also:
isEnableBackgroundRefresh()

setEnableSourceRemovalBeforeSave

public void setEnableSourceRemovalBeforeSave(boolean enable)
Sets this data source to remove itself before saving this file.
Parameters:
enable - boolean. true/false.
See Also:
isEnableSourceRemovalBeforeSave()

setRefreshIndex

public void setRefreshIndex(int index)
                     throws F1Exception
Sets this data source's index in the refresh order, 0-based. Setting refresh order to -1 means no refresh order preference.
Parameters:
index - an integer indicating the data source's location in the refresh order.
Throws:
F1Exception - if parameter is invalid.
java.lang.UnsupportedOperationException - thrown if source is the Data Set Cache.
See Also:
getRefreshIndex()

unregisterDataRangeListener

public void unregisterDataRangeListener(DataRange range)
Deprecated. As of version 9.0, use DataRangeCollection.setDataQuery or DataRangeCollection.setDataSource
Disconnects a data range from this data source.
Parameters:
range - the default or defined name of the data range.
See Also:
isListening(com.f1j.data.DataRange), getDataRanges(), DataRange, registerDataRangeListener(com.f1j.data.DataRange)