Class ContributeMeta

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

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

    • ContributeMeta

      public ContributeMeta(SourceValuePair<RoleMeta> role, List<String> entities, Date date)
      Constructs an instance of the ContributeMeta class with the specified role, entities, and date. This constructor is used to initialize the contribution metadata with known values.
      Parameters:
      role - a SourceValuePair<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 - a List<String> containing the entities associated with the contribution metadata, typically representing individuals or organizations contributing to the resource
      date - a Date object 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

      public SourceValuePair<RoleMeta> 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

      public void setRole(SourceValuePair<RoleMeta> role)
      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 - a SourceValuePair<RoleMeta> object representing
    • getEntities

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

      public void setEntities(List<String> entities)
      Sets the list of entities associated with the contribution metadata. The entities typically represent individuals or organizations contributing to the resource.
      Parameters:
      entities - a List<String> containing the entities to associate with the contribution metadata
    • getDate

      public Date getDate()
      Retrieves the date associated with the contribution metadata. The date may represent the time of contribution or other relevant temporal information.
      Returns:
      a Date object representing the associated contribution date
    • setDate

      public void setDate(Date date)
      Sets the date associated with the contribution metadata. The date may represent the time of contribution or other relevant temporal information.
      Parameters:
      date - a Date object representing the contribution date
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object