Hello,

At the moment I use:

XmlTimestampFormat xmlTimestampFormat = new XmlTimestampFormat();
TimestampContainer tc = entity.getTimestampContainer();
String timestamp = tc.getFormattedTimestamp(xmlTimestampFormat);

to get the timestamp string out of the xml file without parsing. (be
sure enableDateParsing is not disabled)
But this leads me to a dependency to the osmosis-xml plugin, what I
don't really want.
So, it would be very nice, if we could supply a null value to
UnparsedTimestampContainer.getFormattedTimestamp(..) to get the
underlying timestampString without parsing.

Here my suggestion:

public String getFormattedTimestamp(TimestampFormat timestampFormat) {
    if (timestampString != null &&
         (timestampFormat == null ||
          managedTimestampFormat.isEquivalent(timestampFormat))) {
      return timestampString;
    }
  ...
}


Thanks in advance,
Ciao,
Rafael

_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to