Java Code Examples for javax.xml.datatype.Duration#toString()
The following examples show how to use
javax.xml.datatype.Duration#toString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DurationConverter.java From jdmn with Apache License 2.0 | 5 votes |
@Override public String toString(Duration o) { try { return o.toString(); } catch (Exception e) { throw new DMNRuntimeException(e); } }
Example 2
Source File: Utils.java From yawl with GNU Lesser General Public License v3.0 | 5 votes |
/** * converts minute string x to lexical representation of duration * * @param minutes * @return */ public static String stringMinutes2stringXMLDuration(String minutes) throws DatatypeConfigurationException { Long millis = Long.parseLong(minutes) * 60 * 1000; DatatypeFactory df = DatatypeFactory.newInstance(); Duration d = df.newDuration(millis); return d.toString(); }
Example 3
Source File: DurationAsString.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 5 votes |
@Override public String unmarshal(Duration duration) throws Exception { if (duration == null) { return null; } else { return duration.toString(); } }
Example 4
Source File: RuntimeBuiltinLeafInfoImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 5
Source File: RuntimeBuiltinLeafInfoImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 6
Source File: RuntimeBuiltinLeafInfoImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 7
Source File: RuntimeBuiltinLeafInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 8
Source File: RuntimeBuiltinLeafInfoImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 9
Source File: RuntimeBuiltinLeafInfoImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 10
Source File: RuntimeBuiltinLeafInfoImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 11
Source File: RuntimeBuiltinLeafInfoImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public String print(Duration duration) { return duration.toString(); }
Example 12
Source File: XMLHelper.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Converts a duration in milliseconds to a lexical duration, as defined by XML Schema 1.0. * * @param duration the duration * * @return the lexical representation */ public static String longToDuration(long duration) { Duration xmlDuration = getDataTypeFactory().newDuration(duration); return xmlDuration.toString(); }