|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ResultEnum> sk.uniba.euromath.gene.ResultEnum
public enum ResultEnum
Enumerates all possible target types that exporter can accept as an output.
Enum Constant Summary | |
---|---|
DOM
The DOM Document instance. |
|
OBJECT
Java object result. |
|
SAX
SAX XMLReader result. |
|
STREAM
OutputStream result. |
Field Summary | |
---|---|
static List<ResultEnum> |
priorityList
List describing priorities for target-to-source conversion. |
Method Summary | |
---|---|
abstract boolean |
canBeRedirectedTo(SourceEnum source)
Checks if output from this kind of result can be redirected to given kind of source. |
static ResultEnum |
getBestResultSourcePair(EnumSet<ResultEnum> result,
EnumSet<SourceEnum> source)
Determines the best way of redirecting result to source. |
SourceEnum |
getBestSource(EnumSet<SourceEnum> sourceTypes)
Returns the best source for this result. |
abstract SourceEnum |
getPair()
Returns source type that has the same type as this result. |
static EnumSet<SourceEnum> |
getPairSet(EnumSet<ResultEnum> targetTypes)
Returns set consisting of pairs for all items in given set. |
Class<? extends Result> |
getResultClass()
Returns the class of Result object that is represented by the enum item. |
boolean |
represents(Class<? extends Result> resultClass)
Returns true if this enum constant represents Source object of required instance. |
static ResultEnum |
valueOf(Class<? extends Result> sourceClass)
Finds appropriate enum item for the result instance. |
static ResultEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ResultEnum[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ResultEnum DOM
public static final ResultEnum SAX
public static final ResultEnum STREAM
public static final ResultEnum OBJECT
Field Detail |
---|
public static final List<ResultEnum> priorityList
List describing priorities for target-to-source conversion. First item has the highest priority. Items priorities are as follows:
SourceEnum.OBJECT
- native data exchangeSourceEnum.DOM
SourceEnum.SAX
- lowest memory consumption,SourceEnum.STREAM
SourceEnum.SAX
should be before DOM however current
version of exporter does not support direct SAX-SAX connection - SAX
result is connected to SAX source using intermediate DOM document.
Method Detail |
---|
public static final ResultEnum[] values()
for(ResultEnum c : ResultEnum.values()) System.out.println(c);
public static ResultEnum valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic Class<? extends Result> getResultClass()
public boolean represents(Class<? extends Result> resultClass)
resultClass
- the class of result object.
true
if this enum constant represents this class,
false
otherwise.public abstract boolean canBeRedirectedTo(SourceEnum source)
source
- source type to check.
true
if data flow from this result can be
redirected to given source, false
otherwise.public static ResultEnum valueOf(Class<? extends Result> sourceClass)
sourceClass
- class of Result object instance.
public abstract SourceEnum getPair()
public static EnumSet<SourceEnum> getPairSet(EnumSet<ResultEnum> targetTypes)
targetTypes
- the target types.
public SourceEnum getBestSource(EnumSet<SourceEnum> sourceTypes)
sourceTypes
- allowed source types.
null
if no source type fits.public static ResultEnum getBestResultSourcePair(EnumSet<ResultEnum> result, EnumSet<SourceEnum> source)
getBestSource()
method.
result
- set of possible target types.source
- set of possible source types.
null
if no pair can be made.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |