Class ContributeMeta
java.lang.Object
dev.jcputney.elearning.parser.input.lom.types.ContributeMeta
- All Implemented Interfaces:
Serializable
Represents the metadata-specific contribution information in the Learning Object Metadata (LOM).
This class is part of the meta-metadata element, which contains details about the metadata itself
rather than the learning object.
The following schema snippet defines the structure of this element:
<xs:complexType name="contributeMeta">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="roleMeta"/>
<xs:group ref="entityUnbounded"/>
<xs:group ref="date"/>
<xs:group ref="ex:customElements"/>
</xs:choice>
<xs:attributeGroup ref="ag:contribute"/>
</xs:complexType>
Example XML representation:
<contribute>
<role>
<source>LOMv1.0</source>
<value>creator</value>
</role>
<entity><![CDATA[BEGIN:VCARD
VERSION:2.1
FN:John Doe
END:VCARD]]></entity>
<date>
<dateTime>2023-05-01</dateTime>
<description>
<string language="en">Date of metadata creation.</string>
</description>
</date>
</contribute>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the ContributeMeta class with default values.ContributeMeta(SourceValuePair<RoleMeta> role, List<String> entities, Date date) Constructs an instance of theContributeMetaclass with the specified role, entities, and date. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetDate()Retrieves the date associated with the contribution metadata.Retrieves a list of entities associated with the contribution metadata.getRole()Retrieves the role information represented as a source-value pair.inthashCode()voidSets the date associated with the contribution metadata.voidsetEntities(List<String> entities) Sets the list of entities associated with the contribution metadata.voidsetRole(SourceValuePair<RoleMeta> role) Sets the role information for the contribution, represented as a source-value pair.
-
Constructor Details
-
ContributeMeta
Constructs an instance of theContributeMetaclass with the specified role, entities, and date. This constructor is used to initialize the contribution metadata with known values.- Parameters:
role- aSourceValuePair<RoleMeta>representing the role information, where the source provides the origin of the value and the value specifies the specific role of the contribution (e.g., "creator" or "validator")entities- aList<String>containing the entities associated with the contribution metadata, typically representing individuals or organizations contributing to the resourcedate- aDateobject representing the time of the contribution or relevant temporal information
-
ContributeMeta
public ContributeMeta()Creates an instance of the ContributeMeta class with default values. This no-argument constructor can be used when no initial data is provided for the contribution metadata.
-
-
Method Details
-
getRole
Retrieves the role information represented as a source-value pair. The role specifies the contribution type of an entity to the resource, such as "creator" or "validator".- Returns:
- a
SourceValuePair<RoleMeta>object representing the role, where the source provides the origin of the value and the value specifies the detailed role of the contribution.
-
setRole
Sets the role information for the contribution, represented as a source-value pair. The role specifies the type of contribution by the entity to the resource, such as "creator" or "validator".- Parameters:
role- aSourceValuePair<RoleMeta>object representing
-
getEntities
Retrieves a list of entities associated with the contribution metadata. The entities typically represent individuals or organizations contributing to the resource.- Returns:
- a
List<String>containing the entities associated with the contribution metadata
-
setEntities
Sets the list of entities associated with the contribution metadata. The entities typically represent individuals or organizations contributing to the resource.- Parameters:
entities- aList<String>containing the entities to associate with the contribution metadata
-
getDate
Retrieves the date associated with the contribution metadata. The date may represent the time of contribution or other relevant temporal information.- Returns:
- a
Dateobject representing the associated contribution date
-
setDate
Sets the date associated with the contribution metadata. The date may represent the time of contribution or other relevant temporal information.- Parameters:
date- aDateobject representing the contribution date
-
equals
-
hashCode
public int hashCode()
-