org.pentaho.chart
Class ChartDocumentContext

java.lang.Object
  extended by org.pentaho.chart.ChartDocumentContext
All Implemented Interfaces:
org.pentaho.reporting.libraries.css.dom.DocumentContext

public class ChartDocumentContext
extends Object
implements org.pentaho.reporting.libraries.css.dom.DocumentContext

The DocumentContext for the Charting systen.

Author:
David Kincade

Constructor Summary
ChartDocumentContext(ChartDocument chart)
          Constructs a chart document context based on a chart document
 
Method Summary
 ChartDocument getChartDocument()
          Returns the ChartDocument
 org.pentaho.reporting.libraries.resourceloader.ResourceKey getContextKey()
          Returns the context key provides the base-key for resolving relative URLs.
 ChartSeriesDataLinkInfo getDataLinkInfo()
           
 org.pentaho.reporting.libraries.css.namespace.NamespaceCollection getNamespaces()
          Returns information about the known namespaces.
 org.pentaho.reporting.libraries.css.dom.LayoutOutputMetaData getOutputMetaData()
           
 org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
          Returns the resource manager that is used to load externally referenced resources.
 org.pentaho.reporting.libraries.css.model.StyleKeyRegistry getStyleKeyRegistry()
          Returns the style-key registry that holds all known stylekeys that might be encountered during the parsing.
 org.pentaho.reporting.libraries.css.dom.StyleReference[] getStyleReferences()
          Returns the style references for the chart.
 Class[] getSupportedResourceTypes()
          Returns the list of supported resource types that can be loaded as external resources.
 void setDataLinkInfo(ChartSeriesDataLinkInfo dataLinkInfo)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartDocumentContext

public ChartDocumentContext(ChartDocument chart)
                     throws org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException
Constructs a chart document context based on a chart document

Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException
Method Detail

getChartDocument

public ChartDocument getChartDocument()
Returns the ChartDocument


getStyleReferences

public org.pentaho.reporting.libraries.css.dom.StyleReference[] getStyleReferences()
Returns the style references for the chart.

Specified by:
getStyleReferences in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
an array of StyleReferences which contain the style information extracted from the chart definition. The objects are in the same order as they are encountered in the chart definition file.

getResourceManager

public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
Returns the resource manager that is used to load externally referenced resources. Such resources can be either images, drawable or other stylesheets. In some cases, this might even reference whole documents.

The implementation should indicate which document types can be loaded using the getSupportedResourceTypes() method.

Specified by:
getResourceManager in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
the resource manager.
See Also:
getSupportedResourceTypes()

getContextKey

public org.pentaho.reporting.libraries.resourceloader.ResourceKey getContextKey()
Returns the context key provides the base-key for resolving relative URLs. Usually it is the key that was used to parse the document. Without this key, it would be impossible to resolve non-absolute URLs/paths into a usable URL or path.

Specified by:
getContextKey in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
the context key
See Also:
ResourceManager.deriveKey(ResourceKey, String)

getSupportedResourceTypes

public Class[] getSupportedResourceTypes()
Returns the list of supported resource types that can be loaded as external resources.

Specified by:
getSupportedResourceTypes in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
the supported resource types.
See Also:
ResourceManager.create(ResourceKey, ResourceKey, Class[])

getNamespaces

public org.pentaho.reporting.libraries.css.namespace.NamespaceCollection getNamespaces()
Returns information about the known namespaces. This allows the system to recognize 'class' and 'style' attributes for each defined namespace.

Specified by:
getNamespaces in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
the defines namespaces.
See Also:
NamespaceDefinition, NamespaceCollection.getDefinition(String)

getStyleKeyRegistry

public org.pentaho.reporting.libraries.css.model.StyleKeyRegistry getStyleKeyRegistry()
Returns the style-key registry that holds all known stylekeys that might be encountered during the parsing.

Specified by:
getStyleKeyRegistry in interface org.pentaho.reporting.libraries.css.dom.DocumentContext
Returns:
the stylekey registry to use.

getOutputMetaData

public org.pentaho.reporting.libraries.css.dom.LayoutOutputMetaData getOutputMetaData()
Specified by:
getOutputMetaData in interface org.pentaho.reporting.libraries.css.dom.DocumentContext

getDataLinkInfo

public ChartSeriesDataLinkInfo getDataLinkInfo()

setDataLinkInfo

public void setDataLinkInfo(ChartSeriesDataLinkInfo dataLinkInfo)