NetCharts Server

chartworks.es.plugin
Class NDSPlugInAdapter

java.lang.Object
  |
  +--chartworks.es.plugin.NDSPlugIn
        |
        +--chartworks.es.plugin.NDSPlugInAdapter
All Implemented Interfaces:
NDSDataInterface
Direct Known Subclasses:
CachePlugIn, CsvPlugIn, JdbcPlugIn, OracleJdbcPlugIn, XMLPlugIn

public abstract class NDSPlugInAdapter
extends NDSPlugIn
implements NDSDataInterface

Superclass for NDS data plugins supplied by Visual Mining. This class may be extended to take advantage of various optimizations. The following are parameters used by all plugins extending the NDSPlugInAdapter

 cacheKey  		Name to use to identify a cache entry.
 cacheLifeSpan  	The time in seconds a cache is to last.  If set to -1
 					or not passed in, the cache entry is permanent.
 cacheRefresh  	The cache entry will be cleared whenever this parameter is passed.
 rowFilter		Identifies a row filter either by specific row numbers or ranges.
 colFilter		Identifieds a column filter either by specific column numbers or ranges.
 columnSort		The number of a specific column the data should be sorted on.

 Filter Range examples:
	0,2,3,6			Returns rows 0,2,3, and 6
  3,4-9			Return row 3 and 4 thru 9
  0,3*			Return row 0 and all rows after and including row 3
 
Debug information for this class and subclasses is written out using the "REMOTE" debug keyword.


Constructor Summary
NDSPlugInAdapter(java.lang.String name)
          Constructor
 
Method Summary
 java.lang.String getContentType(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          Return the Content-Type of this NDSPlugIn.
 byte[] getData(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          Returns formatted data.
 java.lang.Object[][] loadData(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          NDSDataInterface method to get the unformatted data.
 java.lang.Object[][] pivotData(java.lang.Object[][] data)
          Rotates the data so that X values become Y and vice versa.
 java.lang.Object[][] processData(java.lang.Object[][] data, java.util.Hashtable params)
          Provides data processing utilities
abstract  java.lang.Object[][] retrieveData(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          Abstract method that does the actual data retrieval and stores into a two dimensional object array.
 
Methods inherited from class chartworks.es.plugin.NDSPlugIn
addListingEntry, addObserver, createPlugIn, getPlugIn, hasNewData, removeObserver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDSPlugInAdapter

public NDSPlugInAdapter(java.lang.String name)
Constructor
Method Detail

retrieveData

public abstract java.lang.Object[][] retrieveData(java.net.URL fileBase,
                                                  java.util.Hashtable serverParams,
                                                  java.util.Hashtable clientParams)
Abstract method that does the actual data retrieval and stores into a two dimensional object array.
Parameters:
fileBase - URL representing directory where the NDS parameter file is located.
serverParams - A hashtable of properties from the parameter file.
clientParams - A hashtable of properties passed on the query string - If this is a ".ndx" clientParams will be the same as serverParams.

loadData

public java.lang.Object[][] loadData(java.net.URL fileBase,
                                     java.util.Hashtable serverParams,
                                     java.util.Hashtable clientParams)
NDSDataInterface method to get the unformatted data. It will check the cache for the raw data and then perform filters, sorts, and aggregate functions.
Specified by:
loadData in interface NDSDataInterface
Parameters:
fileBase - URL representing directory where the NDS parameter file is located.
serverParams - A hashtable of properties from the parameter file.
clientParams - A hashtable of properties passed on the query string - If this is a ".ndx" clientParams will be the same as serverParams.

processData

public java.lang.Object[][] processData(java.lang.Object[][] data,
                                        java.util.Hashtable params)
Provides data processing utilities
Parameters:
data - The input data.
param - The NDS parameter hash
Returns:
outputData The processed data

pivotData

public java.lang.Object[][] pivotData(java.lang.Object[][] data)
Rotates the data so that X values become Y and vice versa.
Parameters:
fileBase - URL representing directory where the NDS parameter file is located.
data - The input data.
Returns:
outputData The rotated data

getData

public byte[] getData(java.net.URL fileBase,
                      java.util.Hashtable serverParams,
                      java.util.Hashtable clientParams)
Returns formatted data. This method calls loadData first and then formats the data for the given chart type and parameter.
Overrides:
getData in class NDSPlugIn
Parameters:
fileBase - URL representing directory where the NDS parameter file is located.
serverParams - A hashtable of properties from the parameter file.
clientParams - A hashtable of properties passed on the query string - If this is a ".ndx" clientParams will be the same as serverParams.

getContentType

public java.lang.String getContentType(java.net.URL fileBase,
                                       java.util.Hashtable serverParams,
                                       java.util.Hashtable clientParams)
Return the Content-Type of this NDSPlugIn.
Overrides:
getContentType in class NDSPlugIn
Parameters:
fileBase - The directory from which the .nds file was loaded.
serverParams - Hashtable of key/value pairs.
clientParams - Hashtable of key/value pairs.

NetCharts Server


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2006
All Rights Reserved.

NetCharts Server TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Nov 26, 2006