|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<ResultEnum>
sk.baka.ikslibs.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. |
|
STAX
STAX 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 void |
checkWritable(Result result)
Checks if given result is writable. |
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. |
static boolean |
isWritable(Result result)
Checks if given result is writable: STAX/Stream result must contain at least a writer (or output stream in case of stream), SAX result must contain valid handler. |
protected abstract boolean |
isWritableIntern(Result result)
Checks if given result is writable: STAX/Stream result must contain at least a writer (or output stream in case of stream), SAX result must contain valid handler. |
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
public static final ResultEnum STAX
| 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.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 final Class<? extends Result> getResultClass()
public final 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 final 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.protected abstract boolean isWritableIntern(Result result)
result - the result to check
true if result instance contains means (paths) to
write the result onto, false otherwise.public static boolean isWritable(Result result)
result - the result to check
true if result instance contains means (paths) to
write the result onto, false otherwise.public static void checkWritable(Result result)
writable. If not,
IllegalArgumentException is thrown.
result - result to check.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||