|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.bean.loader.AbstractFormatterLoader
public abstract class AbstractFormatterLoader
Class dedicated to load a formatter Formatter
from an XML element
conformed to XML schema FormatterType specification. Each concret class shall
have the responsibility to load a concrete Formatter class.
Class based on Chain of responsability pattern and used to chain concret Formatter Loaders.
Nested Class Summary | |
---|---|
private static class |
AbstractFormatterLoader.CustomFormatterLoader
Class responsible of CustomFormatter loading. |
private static class |
AbstractFormatterLoader.DateFormatterLoader
Class responsible of DateFormatter loading. |
Field Summary | |
---|---|
private static AbstractFormatterLoader |
instance
Singleton instance to use to load Formatter. |
protected AbstractFormatterLoader |
successor
FormatterLoader successor as describe in Chain of responsability pattern. |
protected String |
xPathExpression
This Xpath expression allows to identify xml node which describe the corresponding concret formatter under formatterType node. |
Constructor Summary | |
---|---|
protected |
AbstractFormatterLoader(String xPathExpression,
AbstractFormatterLoader successor)
|
Method Summary | |
---|---|
protected abstract Formatter<?> |
getConcreteFormatter(Element node)
Returns a concret formatter. |
Formatter<?> |
getFormatter(Element element)
Returns a concret formatter identified from the given XML element. |
static AbstractFormatterLoader |
getInstance()
Returns singleton responsible of formatters loading. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static AbstractFormatterLoader instance
protected AbstractFormatterLoader successor
protected String xPathExpression
Constructor Detail |
---|
protected AbstractFormatterLoader(String xPathExpression, AbstractFormatterLoader successor)
xPathExpression
- XPath expression that allows to identify the concret formatter
under the XML FormatterType nodesuccessor
- following concret loader in the chain of responsabilityMethod Detail |
---|
public static AbstractFormatterLoader getInstance()
public final Formatter<?> getFormatter(Element element) throws XPathExpressionException, LoadException
element
- XML node corresponding to correspondant to XML FormatterType
as described in our XML schema.
null
if the given element
doesn't match the concret formatter type this loader has
responsability and doesn't match any successor
XPathExpressionException
- on invalid XPathExpression
LoadException
- on Error occurs during loadingprotected abstract Formatter<?> getConcreteFormatter(Element node) throws XPathExpressionException, LoadException
node
- XML Element corresponding to the XPath expression. From this
element a concret formatter this loader should return will be
extracted
null
if the given node doesn't match the type this
loader should return
XPathExpressionException
- on invalid XPathExpression
LoadException
- on Error occurs during loadingxPathExpression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |