21
GRAPHICAL USER INTERFACE CLASSES
Overview Spotfire Miner is structured as a client/server application. Each
component such as a Read File node has a corresponding
ActivityNodeModel object on the client, and an EngineNode object on
the server.
The
ActivityNodeModel keeps track of the node properties and reacts
to requests to check the node status, show the properties, and show
the viewer.
The
EngineNode gets the properties from the ActivityNodeModel, gets
data from the pipeline, does the actual computation, outputs data to
the pipeline, and stores any necessary view information in a standard
location that
ActivityNodeModel can access.
The
ActivityNodeModel will typically have helper classes that are
used to show a properties dialog and perhaps a custom viewer.
A key element of the architecture is that any information needed by
the engine is stored in an XML structure that can be retrieved from
the
ActivityNodeModel, and any information needed by the
ActivityNodeModel for viewing results is stored in an XML cache file
on the engine. Direct method calls between the client and server
classes can not be used as this will not work in a client/server
environment.
Activity Node
Model
Each type of node is completely described in the XML description of
the node in the Explorer or a worksheet. The application creates an
ActivityNodeModel by finding the appropriate class name from the
node’s XML description and using reflection to instantiate a new
object initialized based on the other elements in the XML
description.
Typically a new class that extends
ActivityNodeModel will be created
for each new type of node. For instance, the Read Text File node
uses a
ReadTextFileNodeModel.
The important methods that are typically overridden are the methods
to check the state of the node, show the properties dialog, and show
the viewer. Model nodes override additional methods used for
prediction, PMML generation, and/or column filter creation.
Komentáře k této Příručce