Class Relation

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

public final class Relation extends Object implements Serializable
Represents the relationship information about a learning object in a Learning Object Metadata (LOM) document. Relations describe connections between the current learning object and other resources.

Schema snippet:


 <complexType name="relation">
   <choice minOccurs="0" maxOccurs="unbounded">
     <group ref="kind"/>
     <group ref="resource"/>
     <group ref="ex:customElements"/>
   </choice>
   <attributeGroup ref="ag:relation"/>
 </complexType>
 
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for the Relation class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Retrieves the kind of relationship represented as a source-value pair, which specifies the type of connection between the current learning object and another resource.
    Retrieves the list of related resources associated with the relationship.
    int
     
    void
    Sets the kind of relationship, represented as a source-value pair, that specifies the type of connection between the current learning object and another resource.
    void
    Sets the list of related resources associated with the relationship.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Relation

      public Relation()
      Default constructor for the Relation class. Initializes a new instance of the Relation object with no specific properties or behaviors. This constructor is primarily provided for object creation without parameter initialization.
  • Method Details

    • getKind

      public SourceValuePair<Kind> getKind()
      Retrieves the kind of relationship represented as a source-value pair, which specifies the type of connection between the current learning object and another resource.
      Returns:
      a SourceValuePair<Kind> object representing the kind of relationship.
    • setKind

      public void setKind(SourceValuePair<Kind> kind)
      Sets the kind of relationship, represented as a source-value pair, that specifies the type of connection between the current learning object and another resource.
      Parameters:
      kind - a SourceValuePair<Kind> object representing the type of relationship between the learning object and the related resource.
    • getResource

      public List<Resource> getResource()
      Retrieves the list of related resources associated with the relationship.
      Returns:
      a List<Resource> containing the related resources.
    • setResource

      public void setResource(List<Resource> resource)
      Sets the list of related resources associated with the relationship.
      Parameters:
      resource - a List<Resource> representing the related resources to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object