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(TransformGraph graph)
          Registers new transformers, ignoring transformers already registered.
protected  void finalize()
           
 CoordinatorInfo getCoordinatorInfo()
          The editor data provider coordinator info.
 ExportGraph getEditGraph()
          Returns the current exporter graph.
 ExportGraph getGraphFor(Collection<? extends String> namespaces)
          Constructs graph for given set of namespaces.
 void initialize(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(TransformGraph graph)
                throws 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:
ExportException - if error occurs during the transformation.
IOException - if i/o error occurs during the transformation.

getGraphFor

public 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 ExportGraph getEditGraph()
Returns the current exporter graph. The graph must not be modified!

Returns:
the exporter graph.

addTransformers

public void addTransformers(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 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.