dpvis.output
Class OutputElement
java.lang.Object
dpvis.output.OutputElement
public class OutputElement
- extends java.lang.Object
Class for storing an abstract representation of single output sections
generated by a dependency processor. Each dependency processor
generates a list of such output elements.
The description string identifies the type of output that can be used
for clever formatting when the final output is generated.
Note that in order for this to work the dynamic type of the
data property must correspond with the description.
The
following predefined descriptions are available:
- PARARAPH A simple text paragraph. toString()
representation of the data object will be used as text.
- RULE_LIST The data object is assumed to be
an object of the type Collection<Rule>.
- DEPENDENCY_PAIR_PROBLEM The data object is
assumed to be of the type DependencyPairProblem.
- UNORDERED_LIST The data object is assumed to be of the
type Collection<?>; list elements are
printed through their toString() methods.
- ORDERED_LIST The data object is assumed to be of the
type List<?>; list elements are
printed through their toString() methods.
- PRECEDENCE The data object is assumed to be of the
type List<Object>. The compare operations
are assumed to be part of the list. All elements of the list
are printed through their toString() methods.
An example for a sensible precedence list would be
["f", "<", "g"].
- TABLE The data object is assumed to be of the
type Map<Object, List<Object>> where
the key objects of the map are supposed to be the column
headers of the table (the toString() methods are used
to determine the actual column header). The lists that are
associated with the header contain the column data. Again
the toString() methods are used to print the content.
- HEADLINE1 The toString() method of
the data object is used to print a headline with level 1.
- HEADLINE2 The toString() method of
the data object is used to print a headline with level 2.
- HEADLINE3 The toString() method of
the data object is used to print a headline with level 3.
- SEPARATOR The data object is ignored. Use this description
to create a visual separation between two sections of a
processor output.
- TABLE_LIST The data object is assumed to be an object
of the type Collection<Object>. The list is printed
as a table with two columns without column headers. Use this to
represent a unordered list of objects in a compact way.
The objects are printed through their toString method.
- STYLED_PARAGRAPH The data object is assumed to
be an object of type List<Object>. The objects are
printed one after the other (separated only horizontally) through
their toString() methods (if their type
is not known to the output generator). The benefit of using
STYLED_PARAGRAPH over a plain PARAGRAPH field is that
objects of types of the DeepVis datastructures package
are layouted in a better way than by just calling toString().
- Author:
- Felix
Constructor Summary |
OutputElement(java.lang.Object data,
java.lang.String description)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAGRAPH
public static final java.lang.String PARAGRAPH
- See Also:
- Constant Field Values
RULE_LIST
public static final java.lang.String RULE_LIST
- See Also:
- Constant Field Values
DEPENDENCY_PAIR_PROBLEM
public static final java.lang.String DEPENDENCY_PAIR_PROBLEM
- See Also:
- Constant Field Values
UNORDERED_LIST
public static final java.lang.String UNORDERED_LIST
- See Also:
- Constant Field Values
ORDERED_LIST
public static final java.lang.String ORDERED_LIST
- See Also:
- Constant Field Values
PRECEDENCE
public static final java.lang.String PRECEDENCE
- See Also:
- Constant Field Values
TABLE
public static final java.lang.String TABLE
- See Also:
- Constant Field Values
HEADLINE1
public static final java.lang.String HEADLINE1
- See Also:
- Constant Field Values
HEADLINE2
public static final java.lang.String HEADLINE2
- See Also:
- Constant Field Values
HEADLINE3
public static final java.lang.String HEADLINE3
- See Also:
- Constant Field Values
SEPARATOR
public static final java.lang.String SEPARATOR
- See Also:
- Constant Field Values
TABLE_LIST
public static final java.lang.String TABLE_LIST
- See Also:
- Constant Field Values
STYLED_PARAGRAPH
public static final java.lang.String STYLED_PARAGRAPH
- See Also:
- Constant Field Values
OutputElement
public OutputElement(java.lang.Object data,
java.lang.String description)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
getData
public java.lang.Object getData()
setData
public void setData(java.lang.Object data)