Class SimpleLangString
java.lang.Object
dev.jcputney.elearning.parser.input.xapi.types.SimpleLangString
- All Implemented Interfaces:
Serializable
Represents a simple langstring element as defined in the TinCan XSD schema.
According to the official TinCan XSD schema, langstring elements have:
- Text content directly in the element
- An optional
langattribute for language specification
Example XML:
<name lang="en-US">Course Title</name>
<description lang="en-US">Course description</description>
<launch lang="en-US">index.html</launch>
This differs from the complex TextType which uses nested
langstring child elements.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault no-argument constructor.SimpleLangString(String value, String lang) Constructor with value and language. -
Method Summary
-
Constructor Details
-
SimpleLangString
public SimpleLangString()Default no-argument constructor. -
SimpleLangString
Constructor with value and language.- Parameters:
value- the text valuelang- the language code (may be null)
-
-
Method Details
-
getValue
Gets the text value.- Returns:
- the text value
-
setValue
Sets the text value.- Parameters:
value- the text value
-
getLang
Gets the language code.- Returns:
- the language code, or null if not specified
-
setLang
Sets the language code.- Parameters:
lang- the language code
-
equals
-
hashCode
public int hashCode()
-