org.activemath.webapp.exercises.tools
Class Interaction

java.lang.Object
  extended by org.jdom.Content
      extended by org.jdom.Element
          extended by org.activemath.webapp.exercises.tools.Interaction
All Implemented Interfaces:
Serializable, Cloneable, Vertex, org.jdom.Parent

public class Interaction
extends org.jdom.Element
implements Vertex

See Also:
Serialized Form

Nested Class Summary
 class Interaction.AnswermapItem
           
 class Interaction.FeedbackItem
           
 class Interaction.InteractionElement
           
 
Field Summary
 
Fields inherited from class org.jdom.Element
additionalNamespaces, name, namespace
 
Constructor Summary
Interaction(String interactionId, boolean head)
           
 
Method Summary
 void addBlank(String type, org.jdom.Element formula, String techId)
           
 Transition addCondition(List userInput, String xref)
           
 Transition addDefault(String xref)
           
 void addFeedbackRef(String from, boolean inputDecoration)
           
 Transition addHint(String xref)
           
 Transition addInteractionRef(String xref)
           
 void addMetadata(org.jdom.Element meta)
           
 void addSelection(String type, String style, List content, String techId)
           
 void addText(List content, String techId)
           
protected  void addTransition(org.jdom.Element transition)
           
 org.jdom.Element getAnswerMap()
           
 List getAnswermapPresentation()
           
 org.jdom.Element getFeedback()
           
 List getFeedbackPresentation(String lang)
           
 String getInteractionId()
           
 org.jdom.Element getInteractionMap()
           
 org.jdom.Element getMetadata()
           
 Transition getTransition(String techId)
           
 boolean isHead()
           
 boolean isReachable()
           
 boolean isTransitionValid(Transition transition)
           
 boolean isVisited()
           
 Interaction.InteractionElement loadElement(String techId)
           
 void removeElement(String techId)
           
 void removeFeedbackRef()
           
 void removeTransition(String techId)
           
 void removeTransitions()
           
protected  void setParent(Exercise parent)
           
 void setReachable(boolean reachable)
           
 void setVisited(boolean visited)
           
 String vertexId()
           
 
Methods inherited from class org.jdom.Element
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toString
 
Methods inherited from class org.jdom.Content
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdom.Parent
getDocument, getParent
 

Constructor Detail

Interaction

public Interaction(String interactionId,
                   boolean head)
Method Detail

addMetadata

public void addMetadata(org.jdom.Element meta)
                 throws Exception
Throws:
Exception

addText

public void addText(List content,
                    String techId)

addBlank

public void addBlank(String type,
                     org.jdom.Element formula,
                     String techId)
              throws Exception
Throws:
Exception

addSelection

public void addSelection(String type,
                         String style,
                         List content,
                         String techId)

addCondition

public Transition addCondition(List userInput,
                               String xref)

addHint

public Transition addHint(String xref)
                   throws Exception
Throws:
Exception

addDefault

public Transition addDefault(String xref)
                      throws Exception
Throws:
Exception

addInteractionRef

public Transition addInteractionRef(String xref)
                             throws Exception
Throws:
Exception

addFeedbackRef

public void addFeedbackRef(String from,
                           boolean inputDecoration)

getInteractionId

public String getInteractionId()

getInteractionMap

public org.jdom.Element getInteractionMap()

getAnswerMap

public org.jdom.Element getAnswerMap()

getFeedback

public org.jdom.Element getFeedback()

getMetadata

public org.jdom.Element getMetadata()

getTransition

public Transition getTransition(String techId)

removeFeedbackRef

public void removeFeedbackRef()

removeElement

public void removeElement(String techId)
                   throws Exception
Throws:
Exception

removeTransition

public void removeTransition(String techId)

removeTransitions

public void removeTransitions()

loadElement

public Interaction.InteractionElement loadElement(String techId)
                                           throws Exception
Throws:
Exception

addTransition

protected void addTransition(org.jdom.Element transition)
                      throws Exception
Throws:
Exception

setParent

protected void setParent(Exercise parent)

getFeedbackPresentation

public List getFeedbackPresentation(String lang)
                             throws Exception
Throws:
Exception

getAnswermapPresentation

public List getAnswermapPresentation()
                              throws Exception
Throws:
Exception

isTransitionValid

public boolean isTransitionValid(Transition transition)
                          throws Exception
Throws:
Exception

vertexId

public String vertexId()
Specified by:
vertexId in interface Vertex

isHead

public boolean isHead()
Specified by:
isHead in interface Vertex

isReachable

public boolean isReachable()
Specified by:
isReachable in interface Vertex

isVisited

public boolean isVisited()
Specified by:
isVisited in interface Vertex

setReachable

public void setReachable(boolean reachable)
Specified by:
setReachable in interface Vertex

setVisited

public void setVisited(boolean visited)
Specified by:
setVisited in interface Vertex