com.guiseframework.model.rdf.maqro
Class QuestionTreeNodeModel

java.lang.Object
  extended by com.guiseframework.model.rdf.maqro.AbstractInteractionTreeNodeModel<com.globalmentor.urf.maqro.Question>
      extended by com.guiseframework.model.rdf.maqro.QuestionTreeNodeModel

public class QuestionTreeNodeModel
extends AbstractInteractionTreeNodeModel<com.globalmentor.urf.maqro.Question>

A tree node model that represents a MAQRO question.

Author:
Garret Wilson

Constructor Summary
QuestionTreeNodeModel()
          Default constructor with no initial value.
QuestionTreeNodeModel(com.globalmentor.urf.maqro.FollowupEvaluation followupEvaluation, com.globalmentor.urf.maqro.Question initialValue)
          Followup subject and initial value constructor.
QuestionTreeNodeModel(com.globalmentor.urf.maqro.Question initialValue)
          Initial value constructor.
 
Method Summary
protected  AbstractRDFResourceTreeNodeModel createFollowupInteractionTreeNode(com.globalmentor.urf.maqro.FollowupEvaluation followupEvaluation, com.globalmentor.urf.maqro.Interaction interaction)
          Creates a child node to represent an interaction and optional subject followup evaluation.
protected  java.util.List<TreeNodeModel<?>> determineChildren()
          Dynamically determines children.
protected  boolean determineLeaf()
          Dynamically determines whether this node is a leaf.
 
Methods inherited from class com.guiseframework.model.rdf.maqro.AbstractInteractionTreeNodeModel
getFollowupEvaluation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionTreeNodeModel

public QuestionTreeNodeModel()
Default constructor with no initial value.


QuestionTreeNodeModel

public QuestionTreeNodeModel(com.globalmentor.urf.maqro.Question initialValue)
Initial value constructor.

Parameters:
initialValue - The initial value, which will not be validated.

QuestionTreeNodeModel

public QuestionTreeNodeModel(com.globalmentor.urf.maqro.FollowupEvaluation followupEvaluation,
                             com.globalmentor.urf.maqro.Question initialValue)
Followup subject and initial value constructor.

Parameters:
followupEvaluation - The followup evaluation which considers this interaction a followup in this context, or null if there is no followup evaluation subject in this context.
initialValue - The initial value, which will not be validated.
Method Detail

determineLeaf

protected boolean determineLeaf()
Dynamically determines whether this node is a leaf. This version determines if there is a followup evaluation with a followup interaction, or a followup interaction in a list of followups.

Returns:
Whether this node should be considered a leaf with no children.

determineChildren

protected java.util.List<TreeNodeModel<?>> determineChildren()
Dynamically determines children. This version includes followup evaluation interactions and followups listed as general followups.

Returns:
The dynamically loaded list of children.

createFollowupInteractionTreeNode

protected AbstractRDFResourceTreeNodeModel createFollowupInteractionTreeNode(com.globalmentor.urf.maqro.FollowupEvaluation followupEvaluation,
                                                                             com.globalmentor.urf.maqro.Interaction interaction)
Creates a child node to represent an interaction and optional subject followup evaluation. This version returns a GroupTreeNodeModel if the given resource is a Group. This version returns a QuestionTreeNodeModel if the given resource is a Question. Otherwise, this method delegates to #createRDFResourceTreeNode(RDFResource, RDFResource).

Parameters:
followupEvaluation - The followup evaluation which considers this interaction a followup in this context, or null if there is no followup evaluation subject in this context.
interaction - The interaction to represent in the new node.
Returns:
A child node to represent the given property object resource.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.