org.activemath.content.items
Class ExerciseItem

java.lang.Object
  extended by org.activemath.content.items.Item
      extended by org.activemath.content.items.ExerciseItem
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExerciseItemMathdox

public class ExerciseItem
extends Item

Representation of an Exercise.

See Also:
Serialized Form

Field Summary
protected static Category log
           
 
Fields inherited from class org.activemath.content.items.Item
copyrights, dependsOn, factory, flavorSet, forId, forIds, id, mbaseId, metadata, omdocTag, omdocType, relatedTo, relationsIn, relationsOut, shouldUseTitleFromID, theoryId, title, titles
 
Constructor Summary
ExerciseItem(String id)
           
 
Method Summary
 ExerciseType getExerciseType()
           
 OJElement getFullDOM()
          Provide the full DOM tree for this item, wrapped in a theory element.
 OJElement getTextualDOM()
          Construct the XML DOM tree for the textual content of an exercise.
 String getVersion()
           
 boolean isInteractive()
           
 boolean isStartable()
           
 void setVersion(String version)
           
 String toString()
           
 
Methods inherited from class org.activemath.content.items.Item
equals, getCopyrightData, getCopyrightElement, getDependsOn, getDifficulty, getFlavorSet, getForId, getForIds, getId, getIncomingRelations, getMBaseId, getMetadata, getMetadataElement, getNumWords, getOmdocTag, getOmdocType, getOutgoingRelations, getRelatedTo, getSystemId, getTheoryId, getTitle, getTitle, getTitle, getTitles, hasFlavors, hashCode, setUseTitleFromID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static Category log
Constructor Detail

ExerciseItem

public ExerciseItem(String id)
Method Detail

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getExerciseType

public ExerciseType getExerciseType()

getFullDOM

public OJElement getFullDOM()
Description copied from class: Item
Provide the full DOM tree for this item, wrapped in a theory element.

This code is very similar to getTextualDOM() but fetches everything in one go instead of first getting the metadata element and then only the CMP.

Overrides:
getFullDOM in class Item
Returns:
theory element with item content inside, or null if there is an error.

getTextualDOM

public OJElement getTextualDOM()
Construct the XML DOM tree for the textual content of an exercise.
This method can handle various content formats for exercises.

Overrides:
getTextualDOM in class Item
Returns:
this item in its DOM representation (only metadata and first CMP child) wrapped in a theory element, or null if there is a problem.

isStartable

public boolean isStartable()

isInteractive

public boolean isInteractive()

toString

public String toString()
Overrides:
toString in class Item