01: /*
02: * Created on 11-Feb-2006
03: */
04: package uk.org.ponder.conversion;
05:
06: /** This slightly peculiar class makes it easy to represent DateParsers
07: * in an XML object tree.
08: * @author Antranig Basman (amb26@ponder.org.uk)
09: *
10: */
11:
12: public class DateParserParser implements LeafObjectParser {
13:
14: public Object parse(String toparse) {
15: return new DateParser(toparse);
16: }
17:
18: public String render(Object torendero) {
19: DateParser torender = (DateParser) torendero;
20: return torender.toString();
21: }
22:
23: public Object copy(Object tocopyo) {
24: DateParser tocopy = (DateParser) tocopyo;
25: return new DateParser(tocopy.toString());
26: }
27:
28: }
|