sk.uniba.euromath.editor
Class EditorInfo

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

public class EditorInfo
extends Object

Contains information about single editor. Returned by the editor 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 (id and factory properties must be immutable).

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<sk.baka.ikslibs.SourceEnum> sourceTypes
          Set of all types of sources that are supported by this editor.
 
Constructor Summary
EditorInfo(String id, IEditorFactory factory, EnumSet<sk.baka.ikslibs.SourceEnum> sourceTypes, String sourceNamespace)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
protected  IEditorFactory getFactory()
           
protected  String getId()
           
 int hashCode()
           
 IEditor newEditor()
          Produces new instance of this editor.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceTypes

public final EnumSet<sk.baka.ikslibs.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

EditorInfo

public EditorInfo(String id,
                  IEditorFactory factory,
                  EnumSet<sk.baka.ikslibs.SourceEnum> sourceTypes,
                  String sourceNamespace)
Constructor.

Parameters:
id - Unique identifier of this editor. Unique in context of a factory instance.
factory - The factory that is able to produce this editor.
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

getFactory

protected IEditorFactory getFactory()
Returns:
Returns the factory.

newEditor

public final IEditor newEditor()
                        throws sk.baka.xml.gene.ExportException
Produces new instance of this editor.

Returns:
new instance of this editor.
Throws:
sk.baka.xml.gene.ExportException - if editor construction fails.

getId

protected String getId()
Returns:
Returns the id.


Copyright © 2003-2006 null. All Rights Reserved.