Package org.cip4.lib.xjdf.type
Class Duration
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
-
- org.cip4.lib.xjdf.type.AbstractXJdfType<java.lang.String,Duration>
-
- org.cip4.lib.xjdf.type.Duration
-
public class Duration extends AbstractXJdfType<java.lang.String,Duration>
Durations are a component of time intervals and define the amount of intervening time in a time interval. Durations are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S
-
-
Constructor Summary
Constructors Constructor Description Duration()Default constructor.Duration(int day)Custom constructor.Duration(int day, int hour)Custom constructor.Duration(int year, int month, int day, int hour, int minute, int second)Custom constructor.Duration(java.lang.String expression)Custom constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDay()Getter for day attribute.intgetHour()Getter for hour attribute.intgetMinute()Getter for minute attribute.intgetMonth()Getter for month attribute.intgetSecond()Getter for second attribute.intgetYear()Getter for year attribute.java.lang.Stringmarshal(Duration duration)java.lang.StringtoString()Durationunmarshal(java.lang.String v)-
Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType
equals, hashCode
-
-
-
-
Constructor Detail
-
Duration
public Duration()
Default constructor.
-
Duration
public Duration(int day)
Custom constructor. Accepting a value for day.
-
Duration
public Duration(int day, int hour)Custom constructor. Accepting values for day and hour.
-
Duration
public Duration(java.lang.String expression)
Custom constructor. Accepting accepting a String expression for initializing..
-
Duration
public Duration(int year, int month, int day, int hour, int minute, int second)Custom constructor. Accepting values for all attributes.
-
-
Method Detail
-
getYear
public int getYear()
Getter for year attribute.- Returns:
- the year
-
getMonth
public int getMonth()
Getter for month attribute.- Returns:
- the month
-
getDay
public int getDay()
Getter for day attribute.- Returns:
- the day
-
getHour
public int getHour()
Getter for hour attribute.- Returns:
- the hour
-
getMinute
public int getMinute()
Getter for minute attribute.- Returns:
- the minute
-
getSecond
public int getSecond()
Getter for second attribute.- Returns:
- the second
-
unmarshal
public Duration unmarshal(java.lang.String v)
- Specified by:
unmarshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Duration>- See Also:
XmlAdapter.unmarshal(java.lang.Object)
-
marshal
public java.lang.String marshal(Duration duration)
- Specified by:
marshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Duration>- See Also:
XmlAdapter.marshal(java.lang.Object)
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAbstractXJdfType<java.lang.String,Duration>- See Also:
Object.toString()
-
-