sk.uniba.euromath.editor
Class RendererInfo

java.lang.Object
  extended by sk.uniba.euromath.editor.RendererInfo

public class RendererInfo
extends Object

Contains information about single renderer. Returned by the renderer factory. If the factory instance wants to store additional properties into this object (for example editor class instance, etc) it may derive from this class. Derived class should preserve immutability.

Object is equal to other editor info object if and only if a) their factories are equal, b) their ids are equal.

Author:
Martin Vysny

Field Summary
 String sourceNamespace
          The namespace this editor can process.
 EnumSet<SourceEnum> sourceTypes
          Set of all types of sources that are supported by this editor.
 
Constructor Summary
RendererInfo(String id, IRendererFactory factory, EnumSet<SourceEnum> sourceTypes, String sourceNamespace)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
 IRendererFactory getFactory()
           
 String getId()
           
 int hashCode()
           
 IRenderer newRenderer()
          Produces new instance of this renderer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceTypes

public final EnumSet<SourceEnum> sourceTypes
Set of all types of sources that are supported by this editor. Editor is not required to support all kinds of results - export engine can automatically convert between some result kinds. However, the editor should support all kinds of results for which it is optimized.


sourceNamespace

public final String sourceNamespace
The namespace this editor can process.

Constructor Detail

RendererInfo

public RendererInfo(String id,
                    IRendererFactory factory,
                    EnumSet<SourceEnum> sourceTypes,
                    String sourceNamespace)
Constructor.

Parameters:
id - Unique identifier of this renderer. Unique in context of a factory instance.
factory - The factory that is able to produce this renderer.
sourceTypes - type of Source object that this exporter processes.
sourceNamespace - the namespace of the source document.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

newRenderer

public final IRenderer newRenderer()
                            throws EditorException
Produces new instance of this renderer.

Returns:
new instance of this renderer.
Throws:
EditorException - if renderer construction fails.

getId

public String getId()
Returns:
Returns the id.

getFactory

public IRendererFactory getFactory()
Returns:
Returns the factory.


Copyright © 2003-2006 null. All Rights Reserved.