org.activemath.content.items
Class Metadata
java.lang.Object
org.activemath.content.items.Metadata
public class Metadata
- extends Object
Object holding the metadata for an Item.
- Currently only holds a subset of available metadata. Add more if needed.
- Currently does not do metadata inheritance (ie. collect md from parents)
- Metadata values currently are untyped (Strings only),
could be changed into typesafe enum pattern classes.
log
protected static Logger log
itemId
protected String itemId
description
protected String description
descriptions
protected Map<String,String> descriptions
rights
protected List<String> rights
creators
protected List<Person> creators
contributors
protected List<Person> contributors
authors
protected List<Person> authors
editors
protected List<Person> editors
translators
protected List<Person> translators
authorsAndEditors
protected Set<Person> authorsAndEditors
dates
protected List<ActionDate> dates
fieldList
protected List<Field> fieldList
learningContextList
protected List<LearningContext> learningContextList
competencyList
protected List<Competency> competencyList
cognitiveProcessesList
protected List<CognitiveProcess> cognitiveProcessesList
difficultyMap
protected Map<String,Difficulty> difficultyMap
abstractnessMap
protected Map<String,Abstractness> abstractnessMap
tltMap
protected Map<String,LearningTime> tltMap
DEFAULT_KEY
public static final String DEFAULT_KEY
- key used for default value in maps (Abstractness, Difficulty, TypicalLearningTime)
- See Also:
- Constant Field Values
competencyLevel
protected CompetencyLevel competencyLevel
competencySystem
protected CompetencySystem competencySystem
representation
protected Representation representation
abstractness
protected Abstractness abstractness
exerciseType
protected ExerciseType exerciseType
interactivityType
protected String interactivityType
interactivityLevel
protected String interactivityLevel
Metadata
public Metadata()
Metadata
public Metadata(String itemId,
OJElement metadataElem)
getDifficultyString
public String getDifficultyString()
- Deprecated. use getDifficulty() or getDifficulty(LearningContext)
getDifficulty
public Difficulty getDifficulty()
- Returns:
- default
Difficulty if set, or null.
getDifficulty
public Difficulty getDifficulty(LearningContext context)
- Returns:
- Difficulty corresponding to
context, or default from getDifficulty().
getDifficulties
public Map<String,Difficulty> getDifficulties()
- Returns:
- Map "learning context name" (String) -> Difficulty
getAbstractness
public Abstractness getAbstractness()
- Returns:
- default
Abstractness if set, or null.
getAbstractness
public Abstractness getAbstractness(LearningContext context)
- Returns:
- Abstractness corresponding to
context, or default from getAbstractness().
getAbstractnessess
public Map<String,Abstractness> getAbstractnessess()
- Returns:
- Map "learning context name" (String) -> Abstractness
getTypicalLearningTime
public LearningTime getTypicalLearningTime()
- Returns:
- default
TypicalLearningTime if set, or null.
getTypicalLearningTime
public LearningTime getTypicalLearningTime(LearningContext context)
- Returns:
- TypicalLearningTime corresponding to
context, or default from getTypicalLearningTime().
getTypicalLearningTimes
public Map<String,LearningTime> getTypicalLearningTimes()
- Returns:
- Map "learning context name" (String) -> LearningTime
getCompetencyLevelString
public String getCompetencyLevelString()
- Deprecated. use getCompetencyLevel() or getCompetencyLevel(LearningContext)
getCompetencyLevel
public CompetencyLevel getCompetencyLevel()
getRepresentation
public Representation getRepresentation()
getExerciseType
public ExerciseType getExerciseType()
getInteractivityType
public String getInteractivityType()
getInteractivityLevel
public String getInteractivityLevel()
getLearningContexts
public List<LearningContext> getLearningContexts()
- Returns:
- List of
LearningContext, or empty list.
getFields
public List<Field> getFields()
- Returns:
- List of
Field, or empty list.
getCompetencies
public List<Competency> getCompetencies()
- Returns:
- List of
Competency, or empty list.
getCompetency
public String getCompetency()
- Deprecated. use getCompetencies() which gives you the whole list and Competency types.
getCompetencySystem
public CompetencySystem getCompetencySystem()
- Returns:
- The competency system
getCognitiveProcesses
public List<CognitiveProcess> getCognitiveProcesses()
- Returns:
- A list of cognitive processes.
getCreators
public List<Person> getCreators()
- Returns:
- List of Person
getContributors
public List<Person> getContributors()
- Returns:
- List of Person
getAuthors
public List<Person> getAuthors()
- Returns:
- List of Person with role="aut"
getEditors
public List<Person> getEditors()
- Returns:
- List of Person with role="edt"
getTranslators
public List<Person> getTranslators()
- Returns:
- List of Person with role="trl"
getAuthorsAndEditors
public Set<Person> getAuthorsAndEditors()
- Returns:
- merged set of authors and editors
getDates
public List<ActionDate> getDates()
- Returns:
- List of ActionDate in chronological order
getDescription
public String getDescription()
- Returns:
- simple description, eg. for user books, or
"".
setDescription
public void setDescription(String value)
setDescription
public void setDescription(String lang,
String value)
getDescriptions
public Map<String,String> getDescriptions()
- Returns:
- Map: "lang" -> "descr"
setDescriptions
public void setDescriptions(Map<String,String> newMap)
getDescription
public String getDescription(String lang)
- Parameters:
lang -
- Returns:
- item description in language
lang, or getDescription().
toString
public String toString()
- Overrides:
toString in class Object
getRights
public List<String> getRights()