java.lang.Object
dev.jcputney.elearning.parser.input.xapi.types.TextType
All Implemented Interfaces:
Serializable

public final class TextType extends Object implements Serializable
Represents a localized text element, supporting multiple languages via langstring elements.

Defined in the schema as:


 <xs:complexType name="textType">
   <xs:sequence>
     <xs:element name="langstring" maxOccurs="unbounded" minOccurs="1">
       <xs:complexType>
         <xs:simpleContent>
           <xs:extension base="xs:string">
             <xs:attribute name="lang" type="xs:language"/>
             <xs:attributeGroup ref="anyAttribute"/>
           </xs:extension>
         </xs:simpleContent>
       </xs:complexType>
     </xs:element>
     <xs:group ref="anyElement"/>
   </xs:sequence>
   <xs:attributeGroup ref="anyAttribute"/>
 </xs:complexType>
 
See Also:
  • Constructor Details

    • TextType

      public TextType(List<LangString> strings)
      Constructs a new TextType instance with a list of LangString elements.
      Parameters:
      strings - a list of LangString instances representing localized text elements, where each element includes a string value and an optional language attribute
    • TextType

      public TextType()
      Default constructor for the TextType class.

      Initializes a new instance of the TextType class with default values. This constructor does not perform any operations and is used primarily for object instantiation without initial data.

  • Method Details

    • getStrings

      public List<LangString> getStrings()
      Retrieves the list of localized strings associated with this object.
      Returns:
      a list of LangString instances, each representing a localized string with an optional language attribute
    • setStrings

      public void setStrings(List<LangString> strings)
      Sets the list of localized strings for this object.
      Parameters:
      strings - a list of LangString instances, each representing a localized string with its associated language
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object