Class LomDuration
java.lang.Object
dev.jcputney.elearning.parser.input.lom.types.LomDuration
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionDefault constructor for theLomDurationclass.LomDuration(Duration duration) Constructs a new instance of theLomDurationclass with the specified duration. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the description associated with this instance.Retrieves the duration of the resource.inthashCode()voidsetDescription(SingleLangString description) Sets the description associated with this instance.voidsetDuration(Duration duration) Sets the duration of the resource.
-
Constructor Details
-
LomDuration
public LomDuration()Default constructor for theLomDurationclass.Initializes a new instance of the
LomDurationclass with no parameters. This constructor performs no operations and primarily exists to allow the creation of an emptyLomDurationinstance. -
LomDuration
Constructs a new instance of theLomDurationclass with the specified duration.- Parameters:
duration- the duration of the resource, represented as aDurationobject
-
-
Method Details
-
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
Durationobject
-
setDuration
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 aDurationobject
-
getDescription
Retrieves the description associated with this instance.- Returns:
- the description as a SingleLangString
-
setDescription
Sets the description associated with this instance. The description is typically a language-specific string represented as aSingleLangString.- Parameters:
description- the description to set, represented as aSingleLangStringobject
-
equals
-
hashCode
public int hashCode()
-