Class Contribute
java.lang.Object
dev.jcputney.elearning.parser.input.lom.types.Contribute
- All Implemented Interfaces:
Serializable
Represents a contribution to the lifecycle of the learning object in the Learning Object Metadata
(LOM). This class is part of the lifecycle element and provides detailed information about the
contributors, their roles, and the dates associated with their contributions.
The following schema snippet defines the structure of this element:
<xs:complexType name="contribute">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="role"/>
<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>publisher</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">The date when the content was published.</string>
</description>
</date>
</contribute>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the list of ContributeEntity objects associated with the current contribution.getDate()Retrieves the date associated with the current contribution.Retrieves the list of entities associated with the current contribution.getRole()Retrieves the role associated with the current contribution.inthashCode()voidsetCEntities(List<ContributeEntity> cEntities) Sets the list of ContributeEntity objects associated with the current contribution.voidSets the date associated with the current contribution.voidsetEntities(List<String> entities) Sets the list of entities associated with the current contribution.voidsetRole(SourceValuePair<Role> role) Sets the role associated with the current contribution.
-
Constructor Details
-
Contribute
public Contribute()Default constructor for the Contribute class.This constructor initializes an instance of the Contribute class with no initial configuration. It performs no operations and leaves the instance fields in their default state.
-
-
Method Details
-
getRole
Retrieves the role associated with the current contribution.- Returns:
- a
SourceValuePair<Role>representing the role of the entity contributing to the resource. The role is defined as one of the predefined values in theRoleenumeration, such as "author", "editor", "publisher", etc.
-
setRole
Sets the role associated with the current contribution.- Parameters:
role- the source-value pair representing the role of the entity contributing to the resource. The value should be one of the predefined roles in theRoleenumeration, such as "author", "editor", "publisher", etc.
-
getEntities
Retrieves the list of entities associated with the current contribution.- Returns:
- a list of strings representing the names or identifiers of the entities.
-
setEntities
Sets the list of entities associated with the current contribution.- Parameters:
entities- a list of strings representing the names or identifiers of the entities to be associated with the current contribution
-
getCEntities
Retrieves the list of ContributeEntity objects associated with the current contribution.- Returns:
- a list of ContributeEntity objects representing entities such as individuals, organizations, or systems that contribute to the lifecycle of the resource.
-
setCEntities
Sets the list of ContributeEntity objects associated with the current contribution.- Parameters:
cEntities- a list of ContributeEntity objects representing entities such as individuals, organizations, or systems that contribute to the lifecycle of the resource
-
getDate
Retrieves the date associated with the current contribution.- Returns:
- the date object representing the associated date. This may include the actual date-time value and an optional description.
-
setDate
Sets the date associated with the current contribution.- Parameters:
date- theDateobject representing the specific date associated with the contribution. It may include a date-time value and an optional description providing additional context about the date.
-
equals
-
hashCode
public int hashCode()
-