com.ibm.etools.pd.widget.viewer
Interface IGraphicDocumentGenerator

All Known Implementing Classes:
GraphicDocumentGenerator

public interface IGraphicDocumentGenerator

The IGraphicDocumentGenerator interface provides users with access to objects which generate graphic visualizations of (potentially) dynamic input data. These objects encapsulate the state data needed for generating the various visualizations supported by the implementation.


Method Summary
 boolean addGraphicColourPalette(java.lang.String paletteName, java.lang.String[] palette)
          Adds the specified colour palette to the set of colour palettes which are available for the graphic generated by this object.
 java.lang.String generateAndSerialize()
          Generates a graphic Document object based on the input data and returns it XML-serialized to a String.
 boolean generateAndSerializeTo(java.lang.String filename)
          Generates a graphic Document object by based on the input data and then XML-serializes it to the specified filename on the local machine where this object is executing.
 org.w3c.dom.Document generateGraphicDocument()
          Generates and returns a graphic Document object based on input data
 org.w3c.dom.Document getConfigDocument()
          Returns the Document object which provides the configuration data for the graphic generated by this object or null if none has been set.
 org.w3c.dom.Document getDataDocument()
          Returns the Document object which provides the content data for the graphic generated by this object or null if none has been set.
 org.w3c.dom.Document getGeneratedDocument()
          Returns the Document object generated by this object or null if none has been generated.
 java.lang.String[] getGraphicColourPalette()
          Returns the set of colours belonging to the default colour palette used by the graphic generated by this object.
 java.lang.String getGraphicColourPaletteName()
          Returns the name of the default colour palette used by the graphic generated by this object.
 java.lang.String getGraphicFont()
          Returns the font used by the graphic generated by this object.
 java.lang.String getGraphicHeight()
          Returns the height of the graphic generated by this object.
 java.lang.String getGraphicLegendTitle()
          Returns the legend title of the graphic generated by this object or null if the graphic does not support a legend or no title has been specified.
 java.lang.String getGraphicTimestampPrefix()
          Returns the timestamp prefix of the graphic generated by this object or null if none has been specified.
 java.lang.String getGraphicTitle()
          Returns the title of the graphic generated by this object or null if none has been specified.
 java.lang.String getGraphicType()
          Returns the type indicator for the graphic generated by this object.
 java.lang.String getGraphicWidth()
          Returns the width of the graphic generated by this object.
 java.lang.String getPreferencesPage()
          Returns the user preferences page name associated with the generated graphic or null if none has been specified.
 java.lang.String getPreferencesPageHeight()
          Returns the height of the window which displays the user preferences page associated with the generated graphic.
 java.lang.String getPreferencesPageWidth()
          Returns the width of the window which displays the user preferences page associated with the generated graphic.
 java.lang.String getResourcesFolder()
          Returns the folder location for any resources needed by the generated graphic or null if none has been specified .
 boolean isLegendSuppressed()
          Returns the legend suppression indicator for the graphic generated by this object.
 boolean serializeGeneratedDocumentToFile(java.lang.String filename)
          XML-serializes the generated Document object to the specified location on the physical machine where this object is executing.
 byte[] serializeGeneratedDocumentToStream()
          XML-serializes and returns the generated Document object as a byte array.
 java.lang.String serializeGeneratedDocumentToString()
          XML-serializes and returns the generated Document object as a String.
 void setConfigDocument(org.w3c.dom.Document newConfigDocument)
          Specifies the XML document which is to provide the configuration data for the graphic generated by this object.
 void setDataDocument(org.w3c.dom.Document newDataDocument)
          Specifies the XML document which is to provide the content data for the graphic generated by this object.
 boolean setGraphicColourPaletteName(java.lang.String newGraphicColourPaletteName)
          Specifies the name of the default colour palette to be used by the graphic generated by this object.
 void setGraphicFont(java.lang.String newGraphicFont)
          Specifies the font to be used by the graphic generated by this object.
 void setGraphicHeight(java.lang.String newGraphicHeight)
          Specifies the height of the graphic generated by this object.
 void setGraphicLegendTitle(java.lang.String newGraphicLegendTitle)
          Specifies the legend title of the graphic generated by this object.
 void setGraphicTimestampPrefix(java.lang.String newGraphicTimestampPrefix)
          Specifies the prefix for the timestamp of the graphic generated by this object.
 void setGraphicTitle(java.lang.String newGraphicTitle)
          Specifies the title of the graphic generated by this object.
 void setGraphicWidth(java.lang.String newGraphicWidth)
          Specifies the width of the graphic generated by this object.
 void setPreferencesPage(java.lang.String newPreferencesPage)
          Specifies the user preferences page to be used.
 void setPreferencesPageHeight(java.lang.String newPreferencesPageHeight)
          Specifies the height for the window which displays the user preferences page.
 void setPreferencesPageWidth(java.lang.String newPreferencesPageWidth)
          Specifies the width for the window which displays the user preferences page.
 void setResourcesFolder(java.lang.String newResourcesFolder)
          Specifies the folder URL on the local machine where this object is executing in which any resources needing to be accessed by the generated graphic are located.
 void setSuppressLegend(java.lang.String newSuppressLegend)
          Specifies whether the legend should be suppressed in the graphic generated by this object.
 

Method Detail

getGraphicType

public java.lang.String getGraphicType()
Returns the type indicator for the graphic generated by this object.

Returns:
String a type indicator

getGeneratedDocument

public org.w3c.dom.Document getGeneratedDocument()
Returns the Document object generated by this object or null if none has been generated.

Returns:
Document an object, which implements org.w3c.dom.Document

getConfigDocument

public org.w3c.dom.Document getConfigDocument()
Returns the Document object which provides the configuration data for the graphic generated by this object or null if none has been set.

Returns:
Document an object, which implements org.w3c.dom.Document and conforms to the configuration schema for the generator.

getDataDocument

public org.w3c.dom.Document getDataDocument()
Returns the Document object which provides the content data for the graphic generated by this object or null if none has been set.

Returns:
Document an object, which implements org.w3c.dom.Document and conforms to the data schema for the generator.

getGraphicHeight

public java.lang.String getGraphicHeight()
Returns the height of the graphic generated by this object.

Returns:
String the pixel height

getGraphicWidth

public java.lang.String getGraphicWidth()
Returns the width of the graphic generated by this object.

Returns:
String the pixel width

getGraphicFont

public java.lang.String getGraphicFont()
Returns the font used by the graphic generated by this object.

Returns:
String the font family name

getGraphicColourPaletteName

public java.lang.String getGraphicColourPaletteName()
Returns the name of the default colour palette used by the graphic generated by this object.

Returns:
String the name of the default colour palette
See Also:
IGraphicDocumentStyle

getGraphicColourPalette

public java.lang.String[] getGraphicColourPalette()
Returns the set of colours belonging to the default colour palette used by the graphic generated by this object.

Returns:
String [] the String array of hexadecimal colours
See Also:
IGraphicDocumentStyle

getGraphicTitle

public java.lang.String getGraphicTitle()
Returns the title of the graphic generated by this object or null if none has been specified.

Returns:
String the display title of the graphic

getGraphicTimestampPrefix

public java.lang.String getGraphicTimestampPrefix()
Returns the timestamp prefix of the graphic generated by this object or null if none has been specified.

Returns:
String the prefix which is prepended to the timestamp

isLegendSuppressed

public boolean isLegendSuppressed()
Returns the legend suppression indicator for the graphic generated by this object.

Returns:
boolean false, if legend is to be displayed or is not supported by the graphic type.

getGraphicLegendTitle

public java.lang.String getGraphicLegendTitle()
Returns the legend title of the graphic generated by this object or null if the graphic does not support a legend or no title has been specified.

Returns:
String the legend title

getResourcesFolder

public java.lang.String getResourcesFolder()
Returns the folder location for any resources needed by the generated graphic or null if none has been specified .

Returns:
String the folder location on the local machine

getPreferencesPage

public java.lang.String getPreferencesPage()
Returns the user preferences page name associated with the generated graphic or null if none has been specified.

Returns:
String the name of the user preferences page

getPreferencesPageWidth

public java.lang.String getPreferencesPageWidth()
Returns the width of the window which displays the user preferences page associated with the generated graphic.

Returns:
String the pixel width

getPreferencesPageHeight

public java.lang.String getPreferencesPageHeight()
Returns the height of the window which displays the user preferences page associated with the generated graphic.

Returns:
String the pixel height

setConfigDocument

public void setConfigDocument(org.w3c.dom.Document newConfigDocument)
                       throws DataInputProcessingException
Specifies the XML document which is to provide the configuration data for the graphic generated by this object. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newConfigDocument - an object, which implements org.w3c.dom.Document and conforms to the configuration schema for the generator.
DataInputProcessingException

setDataDocument

public void setDataDocument(org.w3c.dom.Document newDataDocument)
                     throws DataInputProcessingException
Specifies the XML document which is to provide the content data for the graphic generated by this object. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newDataDocument - an object, which implements org.w3c.dom.Document and conforms to the content data schema for the generator.
DataInputProcessingException

setGraphicHeight

public void setGraphicHeight(java.lang.String newGraphicHeight)
Specifies the height of the graphic generated by this object. If the value cannot be resolved to an int zero will be substituted. Extending classes should override this behaviour and provide a default value in this case. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicHeight - the pixel height of the generated graphic

setGraphicWidth

public void setGraphicWidth(java.lang.String newGraphicWidth)
Specifies the width of the graphic generated by this object. If the value cannot be resolved to an int zero will be substituted. Extending classes should override this behaviour and provide a default value in this case. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicWidth - the pixel width of the generated graphic

setGraphicFont

public void setGraphicFont(java.lang.String newGraphicFont)
Specifies the font to be used by the graphic generated by this object. If the value is not a supported font, the resulting behaviour is dictated by the browser (plugin) in which the graphic is being rendered. Extending classes should override this behaviour and provide a default value in this case. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicFont - the font family name

setGraphicColourPaletteName

public boolean setGraphicColourPaletteName(java.lang.String newGraphicColourPaletteName)
Specifies the name of the default colour palette to be used by the graphic generated by this object. If the name is not recognized, it is not used. Extending classes should provide a set of documented, named, default palettes from which to choose. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicColourPaletteName - one of the documented or user-supplied names
Returns:
boolean true, if the supplied name is recognized

setGraphicTitle

public void setGraphicTitle(java.lang.String newGraphicTitle)
Specifies the title of the graphic generated by this object. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicTitle - the title, which will be trimmed.

setGraphicTimestampPrefix

public void setGraphicTimestampPrefix(java.lang.String newGraphicTimestampPrefix)
Specifies the prefix for the timestamp of the graphic generated by this object. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicTimestampPrefix - the prefix, which will be trimmed and prepended to the timestamp.

setSuppressLegend

public void setSuppressLegend(java.lang.String newSuppressLegend)
Specifies whether the legend should be suppressed in the graphic generated by this object. If the value passed is invalid, false will be substituted. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newSuppressLegend - must be one of {"true", "false", "1", "0"}.

setGraphicLegendTitle

public void setGraphicLegendTitle(java.lang.String newGraphicLegendTitle)
Specifies the legend title of the graphic generated by this object. Will be ignored if a legend is not supported for the graphic. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newGraphicLegendTitle - the title, which will be trimmed and displayed over the legend

setResourcesFolder

public void setResourcesFolder(java.lang.String newResourcesFolder)
Specifies the folder URL on the local machine where this object is executing in which any resources needing to be accessed by the generated graphic are located. If the full URL is not being specified, then the folder location must be relative to the location of the page which is to draw in the graphic. Note that this information is generated into the graphic, so this method must be called before generating the graphic.

Parameters:
newResourcesFolder - the folder URL location of the resources, which will be trimmed.

setPreferencesPage

public void setPreferencesPage(java.lang.String newPreferencesPage)
Specifies the user preferences page to be used. The page is expected to be located in the resources folder; that is, the page name is appended to any non-null value passed using "setResourcesFolder" before being generated into the graphic. Note that the if the composed location of the preferences page is not full-path, then it should be relative to the location of the page which draws in the generated graphic. Note also that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newPreferencesPage - the folder location of the page which is to replace the existing preferences page. This value will be trimmed.

setPreferencesPageWidth

public void setPreferencesPageWidth(java.lang.String newPreferencesPageWidth)
Specifies the width for the window which displays the user preferences page. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newPreferencesPageWidth - the pixel width

setPreferencesPageHeight

public void setPreferencesPageHeight(java.lang.String newPreferencesPageHeight)
Specifies the height for the window which displays the user preferences page. Note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
newPreferencesPageHeight - the pixel heights

addGraphicColourPalette

public boolean addGraphicColourPalette(java.lang.String paletteName,
                                       java.lang.String[] palette)
                                throws java.lang.NullPointerException
Adds the specified colour palette to the set of colour palettes which are available for the graphic generated by this object. If the palette name already exists, the palette is not added. No checking is done to ensure the palette is valid or that the specified colours are supported in the target environment. Note that adding a palette does not select that palette as the default palette. Also note that since this information is generated into the graphic, this method must be called before generating the graphic.

Parameters:
paletteName - the name of the palette
palette - the colours (hexadecimal codes)
Returns:
boolean true, if the operation is successful
java.lang.NullPointerException

generateGraphicDocument

public org.w3c.dom.Document generateGraphicDocument()
                                             throws DataInputProcessingException
Generates and returns a graphic Document object based on input data

Returns:
Document the generated graphic object
DataInputProcessingException

generateAndSerialize

public java.lang.String generateAndSerialize()
                                      throws DataInputProcessingException,
                                             java.io.IOException
Generates a graphic Document object based on the input data and returns it XML-serialized to a String.

Returns:
String the XML-serialized form of the generated object
DataInputProcessingException
java.io.IOException

generateAndSerializeTo

public boolean generateAndSerializeTo(java.lang.String filename)
                               throws DataInputProcessingException,
                                      java.io.IOException
Generates a graphic Document object by based on the input data and then XML-serializes it to the specified filename on the local machine where this object is executing.

Parameters:
filename - the location to where the generated object is to be XML-serialized.
Returns:
boolean true, if the operation is successful
DataInputProcessingException
java.io.IOException

serializeGeneratedDocumentToFile

public boolean serializeGeneratedDocumentToFile(java.lang.String filename)
                                         throws java.io.IOException
XML-serializes the generated Document object to the specified location on the physical machine where this object is executing.

Parameters:
filename - The location to which the object is serialized.
Returns:
boolean true, if the operation is successful.
java.io.IOException

serializeGeneratedDocumentToString

public java.lang.String serializeGeneratedDocumentToString()
                                                    throws java.io.IOException
XML-serializes and returns the generated Document object as a String.

Returns:
String the XML-serialized form of the Document
java.io.IOException

serializeGeneratedDocumentToStream

public byte[] serializeGeneratedDocumentToStream()
XML-serializes and returns the generated Document object as a byte array.

Returns:
byte[] The XML-serialized form of the Document