sk.uniba.euromath.document
Class DocumentView

java.lang.Object
  extended by sk.uniba.euromath.document.DocumentView

public final class DocumentView
extends Object

Represents one presentation of document.

Author:
Martin Vysny

Constructor Summary
DocumentView(XMLAccess doc, RendererSelector selector, EditorSite site)
          Constructs the instance of object.
 
Method Summary
 void addTransformers(sk.baka.xml.gene.exportgraph.TransformGraph graph)
          Registers new transformers, ignoring transformers already registered.
protected  void finalize()
           
 sk.baka.xml.gene.CoordinatorInfo getCoordinatorInfo()
          The editor data provider coordinator info.
 sk.baka.xml.gene.exportgraph.ExportGraph getEditGraph()
          Returns the current exporter graph.
 sk.baka.xml.gene.exportgraph.ExportGraph getGraphFor(Collection<? extends String> namespaces)
          Constructs graph for given set of namespaces.
 void initialize(sk.baka.xml.gene.exportgraph.TransformGraph graph)
          Initializes the view, performing the transformation.
 boolean isClosed()
          Returns true if this view is closed.
 boolean isInitialized()
          Checks if this view is initialized.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentView

public DocumentView(XMLAccess doc,
                    RendererSelector selector,
                    EditorSite site)
Constructs the instance of object.

Parameters:
doc - document to view
selector - selects preferred renderers. May be null - in such case no renderers are preferred.
site - the transformed data receiver.
Method Detail

initialize

public void initialize(sk.baka.xml.gene.exportgraph.TransformGraph graph)
                throws sk.baka.xml.gene.ExportException,
                       IOException
Initializes the view, performing the transformation. If an exception is thrown during export, view is automatically closed and it must not be further used.

Parameters:
graph - transform graph.
Throws:
sk.baka.xml.gene.ExportException - if error occurs during the transformation.
IOException - if i/o error occurs during the transformation.

getGraphFor

public sk.baka.xml.gene.exportgraph.ExportGraph getGraphFor(Collection<? extends String> namespaces)
Constructs graph for given set of namespaces.

Parameters:
namespaces - namespaces
Returns:
graph containing export nodes for all namespaces.

getEditGraph

public sk.baka.xml.gene.exportgraph.ExportGraph getEditGraph()
Returns the current exporter graph. The graph must not be modified!

Returns:
the exporter graph.

addTransformers

public void addTransformers(sk.baka.xml.gene.exportgraph.TransformGraph graph)
Registers new transformers, ignoring transformers already registered.

Parameters:
graph - graph to register.

isInitialized

public boolean isInitialized()
Checks if this view is initialized. Unintialized views are not subjects for GENE transformation.

Returns:
true if this view is initialized, false otherwise.

getCoordinatorInfo

public sk.baka.xml.gene.CoordinatorInfo getCoordinatorInfo()
The editor data provider coordinator info.

Returns:
info.

isClosed

public boolean isClosed()
Returns true if this view is closed. If the view is closed, it becomes invalid and must not be used.

Returns:
true if this view is closed

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2003-2006 null. All Rights Reserved.