|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.xml.gene.ExporterInfo
public class ExporterInfo
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 extend this class. Derived class should preserve immutability.
Object is equal to other exporter info object if and only if a) their factory classes are equal, b) their ids are equal.
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. |
String |
sourceNamespaceURI
The namespace of the source document. |
Constructor Summary | |
---|---|
ExporterInfo(String id,
String displayableName,
EnumSet<SourceEnum> sourceTypes,
String sourceNamespaceURI,
Map<String,EnumSet<SourceEnum>> targets,
int priority,
IExporterFactory factory)
Contains information about single exporter. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Set<String> |
getNamespaces()
Set containing all namespaces that this acceptor accepts. |
INamespaceAcceptor |
getProducts()
Set of all namespaces that this exporter may ever produce. |
EnumSet<SourceEnum> |
getSource(String namespace)
Returns kinds of sources for this namespace. |
EnumSet<SourceEnum> |
getSourceTypes()
Set of all types of sources that are readable by this exporter. |
int |
hashCode()
|
ExporterInfo |
modifySourceNamespace(String sourceNamespaceURI,
int priority)
Returns a copy of this exporter info with modified source namespace and priority. |
IExporter |
newExporter()
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 |
---|
public final String sourceNamespaceURI
null
.
public final String id
public final String displayableName
public final int priority
public final IExporterFactory factory
Constructor Detail |
---|
public ExporterInfo(String id, String displayableName, EnumSet<SourceEnum> sourceTypes, String sourceNamespaceURI, Map<String,EnumSet<SourceEnum>> targets, int priority, IExporterFactory factory)
id
- unique identifier of this exporter, in the context of given
factory instance. It should provide short and accurate description of the
exporter.sourceTypes
- type of Source object that this exporter processes.sourceNamespaceURI
- the namespace of the source document. Ignored
when denoting wildcard exporter, may be null
.targets
- set of all namespaces that this exporter may ever produce.
It must not be empty. It should 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 |
---|
public ExporterInfo modifySourceNamespace(String sourceNamespaceURI, int priority)
sourceNamespaceURI
- the source namespace identifier. Cannot be
changed if current sourceNamespaceURI
is not null
(current info does not denote a wildcard exporter).priority
- the priority to set.
public final EnumSet<SourceEnum> getSourceTypes()
public final INamespaceAcceptor getProducts()
null
.public String toString()
toString
in class Object
public final boolean equals(Object obj)
equals
in class Object
public final int hashCode()
hashCode
in class Object
public final IExporter newExporter() throws ExportException, IOException
ExportException
- if exporter construction fails.
IOException
- if i/o error occurs.public EnumSet<SourceEnum> getSource(String namespace)
INamespaceAcceptor
getSource
in interface INamespaceAcceptor
namespace
- the namespace URI
null
if namespace is not accepted by the
acceptor.public Set<String> getNamespaces()
INamespaceAcceptor
getNamespaces
in interface INamespaceAcceptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |