|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.modules.parser.base.ReportParserUtil
public final class ReportParserUtil
A helper class to make parsing the xml files a lot easier.
Field Summary | |
---|---|
static String |
HELPER_OBJ_REPORT_NAME
|
static String |
INCLUDE_PARSING_KEY
|
static Object |
INCLUDE_PARSING_VALUE
|
Method Summary | |
---|---|
static boolean |
isIncluded(org.pentaho.reporting.libraries.xmlns.parser.RootXmlReadHandler rootXmlReadHandler)
Checks whether this report is a included report and not the main report definition. |
static Boolean |
parseBoolean(String value,
Locator locator)
|
static Color |
parseColor(String color)
Parses a color entry. |
static Color |
parseColor(String color,
Color defaultValue)
Parses a color entry. |
static Float |
parseFloat(String value,
Locator locator)
Reads an attribute as float and returns def if that fails. |
static ElementAlignment |
parseHorizontalElementAlignment(String value,
Locator locator)
Parses a horizontal alignment value. |
static Integer |
parseInteger(String value,
Locator locator)
Reads an attribute as float and returns def if that fails. |
static float |
parseRelativeFloat(String value,
String exceptionMessage,
Locator locator)
Parses a position of an element. |
static Stroke |
parseStroke(String strokeStyle,
float weight)
|
static int |
parseVersion(String s)
|
static ElementAlignment |
parseVerticalElementAlignment(String value,
Locator locator)
Parses a vertical alignment value. |
static VerticalTextAlign |
parseVerticalTextElementAlignment(String value,
Locator locator)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INCLUDE_PARSING_KEY
public static final Object INCLUDE_PARSING_VALUE
public static final String HELPER_OBJ_REPORT_NAME
Method Detail |
---|
public static boolean isIncluded(org.pentaho.reporting.libraries.xmlns.parser.RootXmlReadHandler rootXmlReadHandler)
rootXmlReadHandler
- the root handler that provides access to the properties.
public static ElementAlignment parseVerticalElementAlignment(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
value
- the text to parse.locator
- the locator provides the current parse position for meaningful error messages.
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- if the alignment value is not recognised.public static ElementAlignment parseHorizontalElementAlignment(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
value
- the text to parse.locator
- the locator provides the current parse position for meaningful error messages.
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- if a parse error occured.public static Float parseFloat(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
def
if that fails.
value
- the attribute value.locator
- the locator provides the current parse position for meaningful error messages.
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- if an parse error occured.public static Boolean parseBoolean(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
org.pentaho.reporting.libraries.xmlns.parser.ParseException
public static Integer parseInteger(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
def
if that fails.
value
- the attribute value.locator
- the locator provides the current parse position for meaningful error messages.
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- if an parse error occured.public static Color parseColor(String color)
color
- the color (as a string).
public static Color parseColor(String color, Color defaultValue)
color
- the color (as a string).defaultValue
- the default value (returned if no color can be parsed).
public static float parseRelativeFloat(String value, String exceptionMessage, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
value
- the value.exceptionMessage
- the exception message.locator
- the locator provides the current parse position for meaningful error messages.
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- if there is a problem parsing the string.public static Stroke parseStroke(String strokeStyle, float weight)
public static VerticalTextAlign parseVerticalTextElementAlignment(String value, Locator locator) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
org.pentaho.reporting.libraries.xmlns.parser.ParseException
public static int parseVersion(String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |