Overview | Package | Class | Tree | Index | Help NetCharts Pro (Applets) 7.0
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

netcharts.util
Class NFDataBean

java.lang.Object
  |
  +--netcharts.util.NFDataBean

public class NFDataBean
implements
This class is used to define a generic data object that can be processed by any chart. The class supports the parsing and loading of parameters and the loading of data.


Field Summary
NFContext ctxt
          The context in which this DataBean is operating.
java.lang.String desc
           
java.lang.String exprParam
          The parameter associated with this DataBean.
java.lang.String keyword
           
static int LOAD_LATER
           
static int LOAD_NONE
           
static int LOAD_NOW
           
java.lang.String name
           
java.lang.String prefix
           
 
Method Summary
java.lang.Object clone()
          Clone this DataBean.
void close()
          Close any open connections and release all system resources associated with this data source.
void debug(java.lang.String msg)
          Prints the given debug message if the current debugMode has been selected.
void defineParams(NFParam p)
          Define the parameters for this DataBean.
NFContext getContext()
          Returns the context in which this databean is operating.
java.lang.String getDesc()
          Returns a description for this data bean type.
java.lang.String getExprParam()
          Returns the parameter associated with the keyword expression being processed by this data bean.
java.lang.String getKeyword()
          Returns the keyword used for all expressions for this data bean type.
java.lang.String getName()
          Returns the name used to refer to this data bean type.
java.lang.StringBuffer getParam(java.lang.String param, java.lang.StringBuffer sb)
          This method is called to append the parameter definition for the given parameter name, based on the current data bean properties, to the given string buffer and returns a pointer to that buffer.
java.util.Vector getParams(java.util.Vector v)
          This method is called to return parameter definitions for all of the parameters associated with the current data bean.
java.lang.String getPrefix()
          Returns the prefix used for all parameters for this data bean type.
boolean inDebugMode()
          Returns true if the current debugMode specified for the databean has been selected.
boolean loadData(NFDataBeanObserver observer, java.lang.Object info)
          This method is called in order to load the data associated with the current data bean.
void loadParams(NFParam p)
          Load the parameters for this DataBean.
boolean reloadNeeded(java.util.Date timestamp)
          This method is called to determine if the current databean needs to be reloaded based on the given timestamp.
void setContext(NFContext ctxt)
          This method is used to set the context in which the databean is performing its processing.
void setExprParam(java.lang.String exprParam)
          Sets the parameter associated with the keyword expression being processed by this data bean.
void start()
          This method is called in order to restart a databean that may have been stopped because the graph was stopped.
void statusMsg(java.lang.String title, java.lang.String msg)
          Writes the message to the debug object.
void stop()
          This method is called whenever the graph has been stopped.
java.lang.String toString()
          Returns a string representation of the databean
void toString(java.lang.StringBuffer sb)
          Appends a string representation of the databean to the buffer
 

Field Detail

LOAD_NONE

public static final int LOAD_NONE

LOAD_NOW

public static final int LOAD_NOW

LOAD_LATER

public static final int LOAD_LATER

name

protected java.lang.String name

desc

protected java.lang.String desc

prefix

protected java.lang.String prefix

keyword

protected java.lang.String keyword

exprParam

protected java.lang.String exprParam
The parameter associated with this DataBean.

ctxt

protected NFContext ctxt
The context in which this DataBean is operating.
Method Detail

inDebugMode

protected boolean inDebugMode()
Returns true if the current debugMode specified for the databean has been selected.
Returns:
true if the current debugMode selected, false otherwise.

debug

protected void debug(java.lang.String msg)
Prints the given debug message if the current debugMode has been selected. The message is prefixed by the name of the databean.
Parameters:
msg - The debug message.

statusMsg

protected void statusMsg(java.lang.String title,
                         java.lang.String msg)
Writes the message to the debug object.
Parameters:
title - The title of the status window.
msg - The status message.

getName

public java.lang.String getName()
Returns the name used to refer to this data bean type.
Returns:
The name of this DataBean.

getDesc

public java.lang.String getDesc()
Returns a description for this data bean type. Usually this description is displayed in some user interaction display.
Returns:
The description.

getPrefix

public java.lang.String getPrefix()
Returns the prefix used for all parameters for this data bean type.
Returns:
The prefix.

getKeyword

public java.lang.String getKeyword()
Returns the keyword used for all expressions for this data bean type.
Returns:
The keyword.

defineParams

public void defineParams(NFParam p)
                 throws java.lang.Exception
Define the parameters for this DataBean.
Parameters:
The - parameter object to define the parameters in.
Throws:
java.lang.Exception - If there was an error in defining the parameters.

loadParams

public void loadParams(NFParam p)
               throws java.lang.Exception
Load the parameters for this DataBean.
Parameters:
The - parameter object to load the parameters from.
Throws:
java.lang.Exception - If there was an error in loading the parameters.

getExprParam

public java.lang.String getExprParam()
Returns the parameter associated with the keyword expression being processed by this data bean.
Returns:
The parameter name associated with this DataBean.

setExprParam

public void setExprParam(java.lang.String exprParam)
Sets the parameter associated with the keyword expression being processed by this data bean.
Parameters:
exprParam - The parameter name to be associated with this DataBean.

getParam

public java.lang.StringBuffer getParam(java.lang.String param,
                             java.lang.StringBuffer sb)
This method is called to append the parameter definition for the given parameter name, based on the current data bean properties, to the given string buffer and returns a pointer to that buffer. The parameter definition returned by this method should be in the same form as the parameter definition processed by the parseParam() or parseExpr() methods. NOTE: The param name given may match any of the parameters associated with this databean including the expression parameter returned by getExprParam().

If the given parameter name is invalid, null is returned.

If the string buffer pointer is null on input, a private string buffer will be returned, which will only be valid until the next call to this method for this data bean.

Parameters:
param - The name of the parameter to retrieve.
sb - The buffer to append the parameter definition to.
Returns:
The buffer with the definition appended.

getParams

public java.util.Vector getParams(java.util.Vector v)
This method is called to return parameter definitions for all of the parameters associated with the current data bean. If the given vector is null, then a new vector will be allocated and returned, otherwise the parameters will be appended to the given vector.

The vector should contain NFKeyValue objects, in which the key field points to a String parameter name and the value field points to a StringBuffer parameter definition.

This method is called by NFCdf when generating a parameter script that contains data bean expressions.

Parameters:
v - The Vector to append the parameter definitions to.
Returns:
The Vector with parameter definitions append to it.

setContext

public void setContext(NFContext ctxt)
This method is used to set the context in which the databean is performing its processing. If the topLevel attribute is non-null, it will be used as the parent for all interative displays. If the applet attribute is non-null, then the databean will assume that is being executed within a browser environment, otherwise it will assume that it is running in a standalone environment. If the getDocumentBase attribute is non-null, it will be used as the default directory when accessing the file system when running as a standalone application. (NOTE: When running in a browser, all file accesses are interpretted relative to the document base.)
Parameters:
ctxt - The new context to set.

getContext

public NFContext getContext()
Returns the context in which this databean is operating.
Returns:
The context.

loadData

public boolean loadData(NFDataBeanObserver observer,
                        java.lang.Object info)
                throws java.lang.Exception
This method is called in order to load the data associated with the current data bean. Throughout the loading process, the NFDataBeanObserver methods are called to allow the observer to monitor and control the loading processing, and to process the data rows accordingly. The INFO parameter is not used directly by the databean, it is simply passed through to the observer when one of it's methods is invoked.

If the data bean needs to get additional user input before the data can be loaded (eg. a password) then it will display an appropriate dialog window and will return true, indicating that the caller should suspend current processing and wait until the user has input the information.

Once the user has successfully entered the information, the data will be loaded and the observer's dataBeanUserInput() method will be called to signify that the interactive processing is over, at which time the caller can resume its processing.

Parameters:
observer - The observer loading the data.
info - The argument.

close

public void close()
Close any open connections and release all system resources associated with this data source.

reloadNeeded

public boolean reloadNeeded(java.util.Date timestamp)
This method is called to determine if the current databean needs to be reloaded based on the given timestamp. Usually, a "null" timestamp will be passed, which means that the databean should make the determination based on its own internal state.

This method always returns true and should be overridden by each databean.

Parameters:
timestamp - The date to compare against.
Returns:
true if a reload is needed, false otherwise.

toString

public java.lang.String toString()
Returns a string representation of the databean
Returns:
The String representation of this DataBean.
Overrides:
toString in class java.lang.Object

toString

public void toString(java.lang.StringBuffer sb)
Appends a string representation of the databean to the buffer
Parameters:
sb - The buffer to append to.

start

public void start()
This method is called in order to restart a databean that may have been stopped because the graph was stopped.

stop

public void stop()
This method is called whenever the graph has been stopped. It should be used to release any server connections and shutdown background threads.

clone

public java.lang.Object clone()
Clone this DataBean.
Overrides:
clone in class java.lang.Object

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


Visual Mining, Inc.
2099 Gaither Grove Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

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

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

Last Modified: Jun 29, 2010