sk.uniba.euromath.gene
Class ExporterInfo

java.lang.Object
  extended by sk.uniba.euromath.gene.ExporterInfo

public class ExporterInfo
extends Object

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

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

Author:
Martin Vysny

Field Summary
 String displayableName
          The name of the exporter that can be displayed on a screen.
 IExporterFactory factory
          The factory that is able to produce this exporter.
 String id
          Unique identifier of this exporter.
 int priority
          A number between 0 and 100.
 EnumSet<ResultEnum> resultTypes
          Set of all types of results that are supported by this exporter.
 String sourceNamespaceURI
          The namespace of the source document.
 EnumSet<SourceEnum> sourceTypes
          Set of all types of results that are supported by this exporter.
 Set<String> targets
          Set of all namespaces that this exporter may ever produce.
 
Constructor Summary
ExporterInfo(String id, String displayableName, EnumSet<SourceEnum> sourceTypes, String sourceNamespaceURI, EnumSet<ResultEnum> resultTypes, Set<String> targets, int priority, IExporterFactory factory)
          Contains information about single exporter.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 IExporter newExporter(ExportHelper helper)
          Produces new instance of this exporter.
 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 results that are supported by this exporter. Exporter is not required to support all kinds of results - export engine can automatically convert between some result kinds. However, the Exporter should support all kinds of results for which it is optimized.


sourceNamespaceURI

public final String sourceNamespaceURI
The namespace of the source document.


resultTypes

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


targets

public final Set<String> targets
Set of all namespaces that this exporter may ever produce. It must not be empty.


id

public final String id
Unique identifier of this exporter. Unique in context of a factory instance.


displayableName

public final String displayableName
The name of the exporter that can be displayed on a screen.


priority

public final int priority
A number between 0 and 100. Generally, exporter with higher priority is preferred. Priority is stated by the exporter factory and cannot be changed by user.


factory

public final IExporterFactory factory
The factory that is able to produce this exporter.

Constructor Detail

ExporterInfo

public ExporterInfo(String id,
                    String displayableName,
                    EnumSet<SourceEnum> sourceTypes,
                    String sourceNamespaceURI,
                    EnumSet<ResultEnum> resultTypes,
                    Set<String> targets,
                    int priority,
                    IExporterFactory factory)
Contains information about single exporter.

Parameters:
id - unique identifier of this exporter. Unique in context of a factory instance.
sourceTypes - type of Source object that this exporter processes.
sourceNamespaceURI - the namespace of the source document.
resultTypes - type of Target object that the exporter produces. Produced exporter must be able to transform any combination of source and result types.
targets - set of all namespaces that this exporter may ever produce. It must not be empty. It must be able to produce DOM or SAX result type if this set contains more than one item.
displayableName - the name of the exporter that can be displayed on a screen.
priority - a number between 0 and 100. Generally, exporter with higher priority is preferred. 0 is a 'normal' priority.
factory - the factory that is able to produce this exporter.
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

newExporter

public final IExporter newExporter(ExportHelper helper)
                            throws ExportException
Produces new instance of this exporter.

Parameters:
helper - the helper for the exporter.
Returns:
new instance of this exporter.
Throws:
ExportException - if exporter construction fails.


Copyright 2003-2003-2006 null. All Rights Reserved.