|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--netcharts.server.api.NSToolKit
Provides API to request data, tables, and charts and to store/retrieve cache elements.
| Field Summary | |
static java.lang.String |
PARAM_NODATA_MESSAGE
|
static java.lang.String |
PROJECTS
|
static java.lang.String |
TOOLKIT_USER_AGENT
|
| Constructor Summary | |
NSToolKit()
Constructs a toolkit with no communication information and no security credentials. |
|
NSToolKit(java.lang.String projectName)
Constructs a toolkit with no security credentials. |
|
NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName)
Constructs a toolkit with communication information and no security credentials. |
|
NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword)
Constructs a toolkit with communication information and security credentials. |
|
NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword,
boolean secure)
Constructs a toolkit with communication information and security credentials. |
|
NSToolKit(java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword)
Constructs a toolkit with security credentials. |
|
| Method Summary | |
boolean |
getAccessibilityMode()
Get the Accessibility Mode. |
java.lang.String |
getAMActiveLabelTextTemplate()
Get the text template used to construct alt tags on the active regions of a drill down image (map area tags). |
java.lang.String |
getAMChartDescription()
Get the description to be used in the alt tag on chart images. |
ServerGeneratedImage |
getChart(java.lang.String chartFile,
java.util.Hashtable variables)
Retrieves a chart and returns a ServerGeneratedImage representing the chart. |
ServerGeneratedImage |
getChart(java.lang.String chartFile,
java.util.Hashtable variables,
boolean createImageMap)
Retrieves a chart and returns a ServerGeneratedImage representing the chart. |
java.lang.String |
getChartPage(java.lang.String chartFile,
java.util.Hashtable variables,
java.lang.String imageFileName,
boolean overwriteImageFile,
java.lang.String imageSource)
Retrieves a chart, saves the generated chart image to a specified file on your local hard drive and returns the generated HTML page including the <img> tag and associated HTML image map. |
java.lang.String |
getChartPage(java.lang.String chartFile,
java.util.Hashtable variables,
java.lang.String imageFileName,
boolean overwriteImageFile,
java.lang.String imageSource,
boolean createImageMap)
Retrieves a chart, saves the generated chart image to a specified file on your local hard drive and returns the generated HTML page including the <img> tag and associated HTML image map if requested. |
java.lang.Object[][] |
getDataCacheEntry(java.lang.String cacheKey,
boolean refreshCacheEntry)
Return the data cached under the given cache key. |
java.lang.String |
getDataCacheEntryAsNCXML(java.lang.String cacheKey,
boolean refreshCacheEntry)
Return the data cached under the given cache key. |
java.sql.ResultSet |
getDataCacheEntryAsResultSet(java.lang.String cacheKey,
boolean refreshCacheEntry,
boolean useFirstRowAsColumnNames)
Return the data cached under the given cache key as a ResultSet. |
java.lang.String |
getEncoding()
Deprecated. Encoding is now determined from server replies and does not need to be set on the toolkit. |
java.lang.Object[][] |
getNDSData(java.lang.String ndsFile,
java.util.Hashtable variables)
Retrieves NDS data from NetCharts Server. |
java.lang.String |
getNDSDataAsCSV(java.lang.String ndsFile,
java.util.Hashtable variables,
char delimiter)
Retrieves NDS data from NetCharts Server and puts it into a format easily imported into MS-Excel |
java.lang.String |
getNDSDataAsNCXML(java.lang.String ndsFile,
java.util.Hashtable variables)
Retrieves NDS data from NetCharts Server and puts it into the NCXML format. |
java.sql.ResultSet |
getNDSDataAsResultSet(java.lang.String ndsFile,
java.util.Hashtable variables,
boolean useFirstRowAsColumnNames)
Retrieves NDS data from NetCharts Server and puts it into a java.sql.ResultSet. |
java.util.Vector |
getNDSDataAsVector(java.lang.String ndsFile,
java.util.Hashtable variables)
Retrieves a data set from NetCharts Server and puts it into a Vector. |
byte[] |
getPDFReport(java.lang.String pglFile,
java.util.Hashtable variables)
Retrieves a PDF report based on a PGL template from NetCharts Server. |
byte[] |
getPDFTable(java.lang.String tableName,
java.util.Hashtable variables)
|
java.lang.String |
getProject()
Get the name of the project. |
static java.lang.String |
getRolloverJavaScript()
Return the JavaScript and <div> tag used for chart interactivity. |
java.lang.String |
getServer()
Get the name of server. |
ServerGeneratedTable |
getServerGeneratedTable(java.lang.String tableFile,
java.util.Hashtable variables)
Retrieves a table. |
ServerGeneratedTable |
getServerGeneratedTable(java.lang.String tableFile,
java.util.Hashtable variables,
java.lang.Object[][] tableData)
Retrieves a table. |
int |
getServerPort()
Get the port of the server. |
chartworks.es.util.ServerReply |
getServerReply(java.lang.String serverFile,
java.util.Hashtable variables)
Retrieves a response via HTTP. |
java.lang.String |
getTable(java.lang.String tableFile,
java.util.Hashtable variables)
Retrieves a table. |
java.lang.String |
getTable(java.lang.String tableFile,
java.util.Hashtable variables,
java.lang.Object[][] tableData)
Retrieves a table. |
java.lang.String |
getUserAgent()
Get the user agent type, which by default is NetChartsServer Java ToolKit (Remote) |
void |
purgeDataCache()
Clears the data cache. |
void |
putDataCacheEntry(java.lang.String cacheKey,
java.lang.Object[][] data,
int lifeSpan)
Puts data element into the cache with the given cache key. |
void |
putDataCacheEntry(java.lang.String cacheKey,
java.sql.ResultSet data,
int lifeSpan)
Puts data from a ResultSet into the cache with the given cache key. |
void |
putDataCacheEntry(java.lang.String cacheKey,
java.lang.String ncxml,
int lifeSpan)
Puts data formatted as NetCharts XML (NCXML) into the cache with the given cache key. |
void |
putDataCacheEntry(java.lang.String cacheKey,
java.lang.String xml,
java.lang.String xmlParserClassName,
int lifeSpan)
Puts data formatted as XML into the cache with the given cache key. |
void |
removeDataCacheEntry(java.lang.String cacheKey)
Removes the named data element from the data cache. |
void |
removeHeader(java.lang.String name)
|
void |
setAccessibilityMode(boolean accessibilityMode)
Enable or disable Accessibility Mode. |
void |
setAMActiveLabelTextTemplate(java.lang.String amActiveLabelTextTemplate)
Set the text template used to construct alt tags on the active regions of a drill down image (map area tags). |
void |
setAMChartDescription(java.lang.String amChartDescription)
Set the description to be used in the alt tag on chart images. |
void |
setEncoding(java.lang.String encoding)
Deprecated. Encoding is now determined from server replies and does not need to be set on the toolkit. |
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setProject(java.lang.String projectName)
Resets the project to consider the root directory of the server files. |
void |
setServerInfo(java.lang.String serverName,
int portNumber)
Resets the server communication information. |
void |
setServerName(java.lang.String serverName)
Resets the server communication information. |
void |
setServerPort(int portNumber)
Resets the server communication information. |
void |
setUserAgent(java.lang.String userAgent)
Set the user agent type, e.g. |
void |
setUserCredentials(java.lang.String userName,
java.lang.String userPassword)
Resets the security credentials of the toolkit. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String PROJECTS
public static final java.lang.String TOOLKIT_USER_AGENT
public static final java.lang.String PARAM_NODATA_MESSAGE
| Constructor Detail |
public NSToolKit()
public NSToolKit(java.lang.String projectName)
projectName - The project within NetCharts Server to access files.
public NSToolKit(java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword)
projectName - The project within NetCharts Server to access files.userName - The name of a NetCharts Server user with proper security credentials.userPassword - The password of a NetCharts Server user with proper security credentials.
public NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName)
serverName - The name of the server.portNumber - The port of the server.projectName - The project to consider the root directory of the server files.
public NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword)
serverName - The name of the server.portNumber - The port of the server.projectName - The project to consider the root directory of the server files.userName - The name of a user with proper security credentials.userPassword - The password of a user with proper security credentials.
public NSToolKit(java.lang.String serverName,
int portNumber,
java.lang.String projectName,
java.lang.String userName,
java.lang.String userPassword,
boolean secure)
serverName - The name of the server.portNumber - The port of the server.projectName - The project to consider the root directory of the server files.userName - The name of a user with proper security credentials.userPassword - The password of a user with proper security credentials.secure - Whether we are connected to a SSL based port.| Method Detail |
public void setAccessibilityMode(boolean accessibilityMode)
public boolean getAccessibilityMode()
public void setAMActiveLabelTextTemplate(java.lang.String amActiveLabelTextTemplate)
public java.lang.String getAMActiveLabelTextTemplate()
public void setAMChartDescription(java.lang.String amChartDescription)
public java.lang.String getAMChartDescription()
public static java.lang.String getRolloverJavaScript()
public void setUserCredentials(java.lang.String userName,
java.lang.String userPassword)
userName - The name of a user with proper security credentials.userPassword - The password of a user with proper security credentials.
public void setServerInfo(java.lang.String serverName,
int portNumber)
serverName - The name of the server.portNumber - The port of the server.public void setServerName(java.lang.String serverName)
serverName - The name of the server.public void setServerPort(int portNumber)
portNumber - The port of the server.public void setProject(java.lang.String projectName)
projectName - The project to consider the root directory of the server files.public void setEncoding(java.lang.String encoding)
public java.lang.String getServer()
public int getServerPort()
public java.lang.String getProject()
public java.lang.String getEncoding()
public chartworks.es.util.ServerReply getServerReply(java.lang.String serverFile,
java.util.Hashtable variables)
throws NSToolKitException
serverFile - The specified response from the server to retrieve.variables - A HashTable contain variables to add to the request.
public java.lang.String getTable(java.lang.String tableFile,
java.util.Hashtable variables)
throws NSToolKitException
tableFile - The specified response from the server to retrieve.variables - A HashTable contain variables to add to the request.
public ServerGeneratedTable getServerGeneratedTable(java.lang.String tableFile,
java.util.Hashtable variables)
throws NSToolKitException
tableFile - The specified response from the server to retrieve.variables - A HashTable contain variables to add to the request.
public java.lang.String getTable(java.lang.String tableFile,
java.util.Hashtable variables,
java.lang.Object[][] tableData)
throws NSToolKitException
tableFile - The specified response from the server to retrieve.variables - A HashTable contain variables to add to the request.
public ServerGeneratedTable getServerGeneratedTable(java.lang.String tableFile,
java.util.Hashtable variables,
java.lang.Object[][] tableData)
throws NSToolKitException
tableFile - The specified response from the server to retrieve.variables - A HashTable contain variables to add to the request.
public java.lang.String getChartPage(java.lang.String chartFile,
java.util.Hashtable variables,
java.lang.String imageFileName,
boolean overwriteImageFile,
java.lang.String imageSource)
throws NSToolKitException
chartFile - The specified chart from the server to retrieve.variables - A HashTable contain variables to add to the request.imageFileName - The file on your local file system to save the chart to.overwriteImageFile - Whether or not to overwrite the image file if it already exists.imageSource - The value to placed within the src attibute of the <img> tag of the HTML page.
public java.lang.String getChartPage(java.lang.String chartFile,
java.util.Hashtable variables,
java.lang.String imageFileName,
boolean overwriteImageFile,
java.lang.String imageSource,
boolean createImageMap)
throws java.lang.IllegalArgumentException,
NSToolKitException
chartFile - The specified chart from the server to retrieve.variables - A HashTable contain variables to add to the request.imageFileName - The file on your local file system to save the chart to.overwriteImageFile - Whether or not to overwrite the image file if it already exists.imageSource - The value to placed within the src attibute of the <img> tag of the HTML page.createImageMap - Specifies whether or not to create the image map.
public byte[] getPDFReport(java.lang.String pglFile,
java.util.Hashtable variables)
throws java.lang.IllegalArgumentException,
NSToolKitException
The following parameters are accepted when generating a PDF report. They may be passed by adding them to the Hashtable instance used when calling the getPDFReport API method.
| Parameter | Description |
|---|---|
| page-height | Specifies the height of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 8.5in |
| page-width | Specifies the width of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 11in |
| margin-top | Specifies the top margin of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 1in |
| margin-right | Specifies the right margin of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 0.5in |
| margin-bottom | Specifies the bottom margin of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 0.75in |
| margin-left | Specifies the left margin of the pages. Consists of the number value and the value type. The valid types are in and cm. Example: 0.5in |
pglFile - The PGL template within the NetCharts Server project.variables - A HashTable containing variables to add to the request.java.lang.IllegalArgumentException - NSToolKitException -
public byte[] getPDFTable(java.lang.String tableName,
java.util.Hashtable variables)
throws java.lang.IllegalArgumentException,
NSToolKitException
public ServerGeneratedImage getChart(java.lang.String chartFile,
java.util.Hashtable variables)
throws java.lang.IllegalArgumentException,
NSToolKitException
chartFile - The specified chart template to retrieve.variables - A HashTable containing variables to add to the request.
public ServerGeneratedImage getChart(java.lang.String chartFile,
java.util.Hashtable variables,
boolean createImageMap)
throws java.lang.IllegalArgumentException,
NSToolKitException
chartFile - The specified chart template to retrieve.variables - A HashTable containing variables to add to the request.createImageMap - Specifies whether or not to create the image map.
public java.lang.Object[][] getNDSData(java.lang.String ndsFile,
java.util.Hashtable variables)
throws NSToolKitException
ndsFile - The name of the NDS file representing this data setvariables - The set of key/value pairs to add to the query string.
public java.lang.String getNDSDataAsCSV(java.lang.String ndsFile,
java.util.Hashtable variables,
char delimiter)
throws NSToolKitException
ndsFile - The name of the NDS file representing this data set.variables - The set of key/value pairs to add to the query string.delimiter - The delimiter used to separate the data values.
public java.lang.String getNDSDataAsNCXML(java.lang.String ndsFile,
java.util.Hashtable variables)
throws NSToolKitException
ndsFile - The name of the NDS file representing this data setvariables - The set of key/value pairs to add to the query string.
public java.util.Vector getNDSDataAsVector(java.lang.String ndsFile,
java.util.Hashtable variables)
throws NSToolKitException
ndsFile - The name of the NDS file representing this data setvariables - The set of key/value pairs to add to the query string.
public java.sql.ResultSet getNDSDataAsResultSet(java.lang.String ndsFile,
java.util.Hashtable variables,
boolean useFirstRowAsColumnNames)
throws NSToolKitException
ndsFile - The name of the NDS file representing this data set.variables - The set of key/value pairs to add to the query string.useFirstRowAsColumnNames - Whether the first row of data should
be used as the ResultSet's list of column names.
public void putDataCacheEntry(java.lang.String cacheKey,
java.sql.ResultSet data,
int lifeSpan)
throws NSToolKitException
cacheKey - The name to assign the cache element.data - The data to store in the cache.lifeSpan - The amount of time, in seconds, that the data will live in the cache. Note, if this
call is associated with an .ndx file on disk (e.g. manual data set), make sure to first remove the
cacheLifeSpan attribute from the .ndx or it will always override this property.
public void putDataCacheEntry(java.lang.String cacheKey,
java.lang.String ncxml,
int lifeSpan)
throws NSToolKitException
cacheKey - The name to assign the cache element.ncxml - The data to store in the cache.lifeSpan - The amount of time, in seconds, that the data will live in the cache. Note, if this
call is associated with an .ndx file on disk (e.g. manual data set), make sure to first remove the
cacheLifeSpan attribute from the .ndx or it will always override this property
public void putDataCacheEntry(java.lang.String cacheKey,
java.lang.String xml,
java.lang.String xmlParserClassName,
int lifeSpan)
throws NSToolKitException
cacheKey - The name to assign the cache element.xml - The data to store in the cache.xmlParserClassName - The name of a class that implements
the chartworks.es.plugin.XMLParserInterface. This class will be
used to get at the data.lifeSpan - The amount of time, in seconds, that the data will live in the cache. Note, if this
call is associated with an .ndx file on disk (e.g. manual data set), make sure to first remove the
cacheLifeSpan attribute from the .ndx or it will always override this property
public void putDataCacheEntry(java.lang.String cacheKey,
java.lang.Object[][] data,
int lifeSpan)
throws NSToolKitException
cacheKey - The name to assign the cache element.data - The data objects to store in the cache.lifeSpan - The amount of time, in seconds, that the data will live in the cache. Note, if this
call is associated with an .ndx file on disk (e.g. manual data set), make sure to first remove the
cacheLifeSpan attribute from the .ndx or it will always override this property
public void removeDataCacheEntry(java.lang.String cacheKey)
throws NSToolKitException
cacheKey - The name to assign the cache element
public void purgeDataCache()
throws NSToolKitException
public java.lang.Object[][] getDataCacheEntry(java.lang.String cacheKey,
boolean refreshCacheEntry)
throws NSToolKitException
cacheKey - The name to assign the cache elementrefreshCacheEntry - Whether or not to null the cache entry data.
public java.lang.String getDataCacheEntryAsNCXML(java.lang.String cacheKey,
boolean refreshCacheEntry)
throws NSToolKitException
cacheKey - The name to assign the cache elementrefreshCacheEntry - Whether or not to null the cache entry data.
public java.sql.ResultSet getDataCacheEntryAsResultSet(java.lang.String cacheKey,
boolean refreshCacheEntry,
boolean useFirstRowAsColumnNames)
throws NSToolKitException
cacheKey - The name assigned to the cache elementrefreshCacheEntry - Whether or not to null the cache entry data.useFirstRowAsColumnNames - Whether the first row of data should
be used as the ResultSet's list of column names.public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
userAgent -
public void setHeader(java.lang.String name,
java.lang.String value)
public void removeHeader(java.lang.String name)
|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2007 |
Last Modified: Jun 14, 2007 |