sk.uniba.euromath.gene
Class GeneDataProvider

java.lang.Object
  extended by sk.uniba.euromath.gene.GeneDataProvider

public final class GeneDataProvider
extends Object

Acts as a GENE coordinator. Collects GENE output, instantiates and initializes renderers, and fires events on document change.

Implementation of GENE output handler

The object produces a special tree (using the Coordinator#partialResultEvent(DocumentFragment, NamespacePath, Source, String, CoordinatorInputKey) function), that is processed by the object itself on Coordinator#finishExport() function. This tree is intended to capture the tree structure of nametrees in output document (and renderers, rendering these nametrees).

Each Coordinator#partialResultEvent(DocumentFragment, NamespacePath, Source, String, CoordinatorInputKey) constructs (or updates) a renderer, associates it with the key and produces some elements. These elements must be able to provide:

These elements are produced:

ref element will receive same namespace as the input of the renderer it references. All child child-renderer elements will have same namespace as their parent ref. This will allow GENE to provide correct namespace paths.

Following this algorithm (when GENE resolves all emp:mark elements) we receive this document in the finishExport() method: root element is keyref identifying root renderer. Each keyref contains zero or more child-renderer elements, containing ids of children renderers. Each child-renderer contains one keyref element, identifying this renderer, etc.

Author:
Martin Vysny

Nested Class Summary
 class GeneDataProvider.RendererSite
          Represents the renderer with its environment.
 
Constructor Summary
GeneDataProvider(RendererSelector selector, XMLAccess xmlAccess, IEditorDataReceiver edr)
          Constructor.
 
Method Summary
 sk.baka.xml.gene.ICoordinator getCoordinator()
          Returns the coordinator instance - this object receives GENE output.
 sk.baka.xml.gene.CoordinatorInfo getCoordinatorInfo()
          Returns the coordinator information instance for the GENE coordinator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneDataProvider

public GeneDataProvider(RendererSelector selector,
                        XMLAccess xmlAccess,
                        IEditorDataReceiver edr)
Constructor.

Parameters:
selector - the renderer selector.
xmlAccess - the transformed document.
edr - the data receiver.
Method Detail

getCoordinator

public sk.baka.xml.gene.ICoordinator getCoordinator()
Returns the coordinator instance - this object receives GENE output.

Returns:
GENE's coordinator instance.

getCoordinatorInfo

public sk.baka.xml.gene.CoordinatorInfo getCoordinatorInfo()
Returns the coordinator information instance for the GENE coordinator.

Returns:
coordinator info for this coordinator.


Copyright © 2003-2006 null. All Rights Reserved.