sk.baka.xml.gene.xhtml
Class XHTMLCoordinator

java.lang.Object
  extended by sk.baka.xml.gene.xhtml.XHTMLCoordinator
All Implemented Interfaces:
sk.baka.xml.gene.ICoordinator

public class XHTMLCoordinator
extends Object
implements sk.baka.xml.gene.ICoordinator

Implements the XHTML (http://www.w3.org/1999/xhtml) output class functionality.

Default result object

Namespace Name Input kind
http://www.w3.org/1999/xhtml XHTML SAXSource
http://www.w3.org/2000/svg SVG vector graphics SAXSource
http://www.w3.org/1998/Math/MathML MathML SAXSource
http://www.uniba.sk/euromath/holder/png Binary image StreamSource

Specialities

This coordinator processes emp:mark itself - it may be 1:1 copied by the exporter from the source document fragment. If xhtml:img and xhtml:a references local resources then these resources are copied to the export directory and these elements are modified to hold these new (relative) references.

Worker behaviour

If exporter result of some nametree is an image then it is saved into the export directory and the emp:mark element is replaced by the xhtml:img element.

Author:
Martin Vysny

Constructor Summary
XHTMLCoordinator(sk.baka.xml.gene.CoordinatorInfo info)
          Constructs the instance of the coordinator.
 
Method Summary
 void alterContext(sk.baka.xml.gene.IExporter exporter, sk.baka.xml.gene.ExportContext context, sk.baka.xml.gene.controller.NamespacePath path)
           
 void dispose()
           
 void finishExport()
           
 sk.baka.xml.gene.IConfigurator getConfigurator()
           
 sk.baka.xml.gene.exportgraph.ExportGraphBuilder getGraphBuilder()
           
 sk.baka.xml.gene.CoordinatorInfo getInfo()
           
(package private) static Map<String,EnumSet<SourceEnum>> getNamespaces()
          Returns namespaces accepted.
 sk.baka.xml.gene.exportgraph.TransformGraph getTransformationGraph()
           
 Object offerObject(String namespace)
           
 Source partialResultEvent(DocumentFragment processed, sk.baka.xml.gene.controller.NamespacePath path, Source source, String sourceNamespace, sk.baka.xml.gene.CoordinatorInputKey key)
           
 StreamResult requestResult(String fileName)
           
 Result startExport(File systemId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLCoordinator

public XHTMLCoordinator(sk.baka.xml.gene.CoordinatorInfo info)
Constructs the instance of the coordinator.

Parameters:
info - info
Method Detail

getInfo

public sk.baka.xml.gene.CoordinatorInfo getInfo()
Specified by:
getInfo in interface sk.baka.xml.gene.ICoordinator

getConfigurator

public sk.baka.xml.gene.IConfigurator getConfigurator()
Specified by:
getConfigurator in interface sk.baka.xml.gene.ICoordinator

dispose

public void dispose()
Specified by:
dispose in interface sk.baka.xml.gene.ICoordinator

getGraphBuilder

public sk.baka.xml.gene.exportgraph.ExportGraphBuilder getGraphBuilder()
Specified by:
getGraphBuilder in interface sk.baka.xml.gene.ICoordinator

getTransformationGraph

public sk.baka.xml.gene.exportgraph.TransformGraph getTransformationGraph()
Specified by:
getTransformationGraph in interface sk.baka.xml.gene.ICoordinator

partialResultEvent

public Source partialResultEvent(DocumentFragment processed,
                                 sk.baka.xml.gene.controller.NamespacePath path,
                                 Source source,
                                 String sourceNamespace,
                                 sk.baka.xml.gene.CoordinatorInputKey key)
                          throws sk.baka.xml.gene.ExportException,
                                 IOException
Specified by:
partialResultEvent in interface sk.baka.xml.gene.ICoordinator
Throws:
sk.baka.xml.gene.ExportException
IOException

requestResult

public StreamResult requestResult(String fileName)
                           throws IOException
Specified by:
requestResult in interface sk.baka.xml.gene.ICoordinator
Throws:
IOException

startExport

public Result startExport(File systemId)
                   throws sk.baka.xml.gene.ExportException,
                          IOException
Specified by:
startExport in interface sk.baka.xml.gene.ICoordinator
Throws:
sk.baka.xml.gene.ExportException
IOException

finishExport

public void finishExport()
                  throws sk.baka.xml.gene.ExportException,
                         IOException
Specified by:
finishExport in interface sk.baka.xml.gene.ICoordinator
Throws:
sk.baka.xml.gene.ExportException
IOException

getNamespaces

static Map<String,EnumSet<SourceEnum>> getNamespaces()
Returns namespaces accepted.

Returns:
namespaces accepted.

offerObject

public Object offerObject(String namespace)
Specified by:
offerObject in interface sk.baka.xml.gene.ICoordinator

alterContext

public void alterContext(sk.baka.xml.gene.IExporter exporter,
                         sk.baka.xml.gene.ExportContext context,
                         sk.baka.xml.gene.controller.NamespacePath path)
Specified by:
alterContext in interface sk.baka.xml.gene.ICoordinator


Copyright © 2006 Martin Vysny - baka. All Rights Reserved.