Class SourceValuePair<T extends Serializable>

java.lang.Object
dev.jcputney.elearning.parser.input.lom.types.SourceValuePair<T>
Type Parameters:
T - the type of the value, which can be an enumeration or a string
All Implemented Interfaces:
Serializable

public final class SourceValuePair<T extends Serializable> extends Object implements Serializable
Represents a source-value pair, commonly used in the LOM schema to describe a value and its associated source. This structure is used for elements such as structure, aggregation level, and other vocabulary-based fields.

Schema snippet:


 <xs:complexType name="sourceValuePair">
   <xs:sequence>
     <xs:element name="source" type="CharacterString"/>
     <xs:element name="value" type="CharacterString"/>
   </xs:sequence>
   <xs:attributeGroup ref="ag:sourceValuePair"/>
 </xs:complexType>
 
See Also:
  • Constructor Details

    • SourceValuePair

      public SourceValuePair()
      Default constructor for the SourceValuePair class.

      Initializes a new instance of the SourceValuePair class. This constructor performs no operations and exists to allow object creation without setting any initial state or parameters.

  • Method Details

    • getSource

      public String getSource()
      Retrieves the source associated with this instance. The source typically refers to a controlled vocabulary or schema that defines the context or meaning of the value.
      Returns:
      the source as a String
    • setSource

      public void setSource(String source)
      Sets the source for this instance. The source typically refers to a controlled vocabulary or schema that defines the context or meaning of the associated value.
      Parameters:
      source - the source to set, represented as a String
    • getValue

      public T getValue()
      Retrieves the value associated with this instance. The value represents the specific term or definition associated with the source in a source-value pair.
      Returns:
      the value associated with this instance, of type T
    • setValue

      public void setValue(T value)
      Sets the value associated with this instance. The value represents the specific term or definition associated with the source in a source-value pair.
      Parameters:
      value - the value to set, of type T
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object