java.lang.Object
dev.jcputney.elearning.parser.input.lom.types.LomDuration
All Implemented Interfaces:
Serializable

public final class LomDuration extends Object implements Serializable
Represents the duration metadata of a resource, including the duration value in ISO 8601 format and an optional description.

The following schema snippet illustrates the expected XML structure for duration:


 <xs:complexType name="duration">
   <xs:complexContent>
     <xs:extension base="Duration">
       <xs:attributeGroup ref="ag:duration"/>
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>
 

A duration value typically conforms to the ISO 8601 format (e.g., "PT10M" for 10 minutes). The description element, if present, allows for a natural language explanation of the duration.

Example XML:


 <duration>
   <duration>PT10M</duration>
   <description>
     <string language="en-us">This video is 10 minutes long.</string>
   </description>
 </duration>
 
See Also:
  • Constructor Details

    • LomDuration

      public LomDuration()
      Default constructor for the LomDuration class.

      Initializes a new instance of the LomDuration class with no parameters. This constructor performs no operations and primarily exists to allow the creation of an empty LomDuration instance.

    • LomDuration

      public LomDuration(Duration duration)
      Constructs a new instance of the LomDuration class with the specified duration.
      Parameters:
      duration - the duration of the resource, represented as a Duration object
  • Method Details

    • getDuration

      public Duration getDuration()
      Retrieves the duration of the resource. The duration is typically specified in ISO 8601 format (e.g., "PT10M" for 10 minutes).
      Returns:
      the duration of the resource as a Duration object
    • setDuration

      public void setDuration(Duration duration)
      Sets the duration of the resource. The duration is typically specified in ISO 8601 format (e.g., "PT10M" for 10 minutes).
      Parameters:
      duration - the duration of the resource as a Duration object
    • getDescription

      public SingleLangString getDescription()
      Retrieves the description associated with this instance.
      Returns:
      the description as a SingleLangString
    • setDescription

      public void setDescription(SingleLangString description)
      Sets the description associated with this instance. The description is typically a language-specific string represented as a SingleLangString.
      Parameters:
      description - the description to set, represented as a SingleLangString object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object