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

public final class Contribute extends Object implements 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 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

      public SourceValuePair<Role> 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 the Role enumeration, such as "author", "editor", "publisher", etc.
    • setRole

      public void setRole(SourceValuePair<Role> role)
      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 the Role enumeration, such as "author", "editor", "publisher", etc.
    • getEntities

      public List<String> 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

      public void setEntities(List<String> entities)
      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

      public List<ContributeEntity> 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

      public void setCEntities(List<ContributeEntity> cEntities)
      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

      public Date 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

      public void setDate(Date date)
      Sets the date associated with the current contribution.
      Parameters:
      date - the Date object 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

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

      public int hashCode()
      Overrides:
      hashCode in class Object