wt.query.template
Class GraphHelper

java.lang.Object
  extended bywt.query.template.GraphHelper

public class GraphHelper
extends Object

This class converts data into a graph and serves as an XSLT extension function implementation.

Note that although an attempt was made to implement this in an XML/XSLT library implementation independent manner (except for known necessary workarounds when we believe the XSLT library in question to be Saxons), currently this class does not work with Xalan 2.1.0. This can almost certainly be fixed, but we have not taken the time to investigate this issue. Thus this is one of the few pieces of Windchill code that does not work just equally fine with either Xalan or Saxon being used for XSLT processing.


Field Summary
static String CHARTABLE
           
 
Constructor Summary
GraphHelper()
           
 
Method Summary
static Map buildParameterMap(NodeList a_parameters)
           
static Document createReport(GraphHelper gh, String chartable, NodeList nodeList, double width, double height, String options)
          At one time Xalan had a bug wherein calls to static extension functions would be made with an extra 1st argument via reflection is such a way that the first argument must be the extension function class, though a null is always passed.
static Document createReport(String chartable, NodeList nodeList, double width, double height, String options)
           
static Document createReport(String chartable, NodeList nodeList, double width, double height, String options, NodeList parameters, NodeList a_locale)
          This method turns nodeList into a bar chart in SVG DOM tree format.
private static Object getInstance(String a_className)
           
private static Document getSVGDocument(SVGGenerator svgGenerator, Component component, boolean useCSS)
          Get SVG as a DOM document of the necessary implementation to interoperate with the given (assumed) current XSLT processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARTABLE

public static final String CHARTABLE
See Also:
Constant Field Values
Constructor Detail

GraphHelper

public GraphHelper()
Method Detail

createReport

public static Document createReport(String chartable,
                                    NodeList nodeList,
                                    double width,
                                    double height,
                                    String options)
                             throws Exception
Throws:
Exception

createReport

public static Document createReport(String chartable,
                                    NodeList nodeList,
                                    double width,
                                    double height,
                                    String options,
                                    NodeList parameters,
                                    NodeList a_locale)
                             throws Exception
This method turns nodeList into a bar chart in SVG DOM tree format.

Returns:
The SVG Document that is created.
Throws:
Throws - ClassNotFoundException if the the class given in chartable can not be found or instantiated.
Throw - WTException if the data is bad.
Exception

getSVGDocument

private static Document getSVGDocument(SVGGenerator svgGenerator,
                                       Component component,
                                       boolean useCSS)
                                throws Exception
Get SVG as a DOM document of the necessary implementation to interoperate with the given (assumed) current XSLT processor.

Throws:
Exception

createReport

public static Document createReport(GraphHelper gh,
                                    String chartable,
                                    NodeList nodeList,
                                    double width,
                                    double height,
                                    String options)
                             throws Exception
At one time Xalan had a bug wherein calls to static extension functions would be made with an extra 1st argument via reflection is such a way that the first argument must be the extension function class, though a null is always passed. This variation of createReport() exists solely as a workaround to this bug.

Throws:
Exception

buildParameterMap

public static Map buildParameterMap(NodeList a_parameters)

getInstance

private static Object getInstance(String a_className)
                           throws Exception
Throws:
Exception