org.activemath.content.items
Class ExerciseItemMathdox

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

public class ExerciseItemMathdox
extends ExerciseItem

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.activemath.content.items.ExerciseItem
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
ExerciseItemMathdox(String id)
           
 
Method Summary
 OJElement getCopyrightElement()
           
 OJElement getFullDOM()
          Provide the full DOM tree for this item, wrapped in a theory element.
 OJElement getMetadataElement()
           
 OJElement getTextualDOM()
          Construct the XML DOM tree for the textual content of an exercise.
 
Methods inherited from class org.activemath.content.items.ExerciseItem
getExerciseType, getVersion, isInteractive, isStartable, setVersion, toString
 
Methods inherited from class org.activemath.content.items.Item
equals, getCopyrightData, getDependsOn, getDifficulty, getFlavorSet, getForId, getForIds, getId, getIncomingRelations, getMBaseId, getMetadata, 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
 

Constructor Detail

ExerciseItemMathdox

public ExerciseItemMathdox(String id)
                    throws Exception
Throws:
Exception
Method Detail

getMetadataElement

public OJElement getMetadataElement()
Overrides:
getMetadataElement in class Item

getCopyrightElement

public OJElement getCopyrightElement()
Overrides:
getCopyrightElement in class Item

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 ExerciseItem
Returns:
theory element with item content inside, or null if there is an error.

getTextualDOM

public OJElement getTextualDOM()
Description copied from class: ExerciseItem
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 ExerciseItem
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.