Package org.entur.siri.adapter
Class DurationXmlAdapter
-
-
Constructor Summary
Constructors Constructor Description DurationXmlAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringmarshal(Duration duration)XML datatype xs:duration is only partially based on ISO-8601, and differs when it comes to negative durations.Durationunmarshal(String stringValue)
-
-
-
Method Detail
-
marshal
public String marshal(Duration duration)
XML datatype xs:duration is only partially based on ISO-8601, and differs when it comes to negative durations. While ISO-8601 allows for negative values for each part of the duration (e.g.PT-1M-30S), an xs:duration only allows the entire duration to be negative - i.e.-PT1M30SThis method rewrites the produced Duration-string to produce a valid xs:duration
-
-