org.problets.domain.knowledge
Class KnowledgeModel

java.lang.Object
  extended by org.problets.domain.knowledge.KnowledgeModel
Direct Known Subclasses:
IndividualKnowledgeModel

public class KnowledgeModel
extends java.lang.Object

KnowledgeModel Class holds the correct knowledge model, a hierarchy of KnowledgeUnits.

Author:
Amruth Kumar

Constructor Summary
KnowledgeModel(KnowledgeModel referenceKM)
          Constructor for the benefit of the derived class IndividualKnowledgeModel
KnowledgeModel(java.lang.String inDomain, java.lang.String inTopic, java.lang.String inConcepts)
           
KnowledgeModel(java.lang.String inDomain, java.lang.String inPath, java.lang.String inTopic, java.lang.String inConcepts)
           
 
Method Summary
 KnowledgeUnit breadthFirstSearch(java.util.Vector nodeVector, java.lang.String desiredRoot)
          Facilitates Breadth first search of the knowledge tree - If this is the node you are looking for, return it Else, add its children to the nodeVector and return
 KnowledgeUnit findShallowest(KnowledgeUnit currentRoot, java.lang.String desiredRoot)
          Does Breadth First Search to find the KnowledgeUnit node with content = desiredRoot in the tree whose root is currentRoot - returns the desiredRoot's node
 java.util.Vector getAllLeafNodes()
          Returns a vector of references to all the leaf nodes in the knowledge model Note: getDesiredLeafNodes() subsumes getAllLeafNodes() based on the values of topic and concepts
 java.util.Vector getConceptExplanationPairs(boolean leafOnly)
          Returns a vector of AtributeValue pairs of all the fully qualified learning objectives and their corresponding elaborations
 java.util.Vector getDesiredLeafNodes()
          Returns a vector of references to all the leaf nodes in the knowledge model that are in (subtree of) concepts list specified by the client.
 KnowledgeUnit getDomainRoot()
           
 KnowledgeUnit getKnowledgeUnit(java.lang.String learningObjective)
          Returns a reference to the leaf KnowledgeUnit corresponding to the learning objective provided in dot.separated notation.
static void main(java.lang.String[] args)
           
 void printKnowledgeModel()
          Prints the knowledge model recursively
static void printVector(java.util.Vector v)
           
 void setProficiency(java.util.Vector inputVector)
          Sets the proficiency criteria of the KnowledgeUnit corresponding to the learning objective passed as parameter.
 java.lang.String toXMLString()
          Returns the structure of the knowledge model in XML format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnowledgeModel

public KnowledgeModel(java.lang.String inDomain,
                      java.lang.String inTopic,
                      java.lang.String inConcepts)
Parameters:
inDomain - The text file where the hierarchy of knowledge units is saved
inRootContent - The particular knowledge unit that is expected to serve as the root for this tree

KnowledgeModel

public KnowledgeModel(java.lang.String inDomain,
                      java.lang.String inPath,
                      java.lang.String inTopic,
                      java.lang.String inConcepts)

KnowledgeModel

public KnowledgeModel(KnowledgeModel referenceKM)
Constructor for the benefit of the derived class IndividualKnowledgeModel

Method Detail

getAllLeafNodes

public java.util.Vector getAllLeafNodes()
Returns a vector of references to all the leaf nodes in the knowledge model Note: getDesiredLeafNodes() subsumes getAllLeafNodes() based on the values of topic and concepts


getKnowledgeUnit

public KnowledgeUnit getKnowledgeUnit(java.lang.String learningObjective)
Returns a reference to the leaf KnowledgeUnit corresponding to the learning objective provided in dot.separated notation. Returns null if the leaf node does not exist.


getDesiredLeafNodes

public java.util.Vector getDesiredLeafNodes()
Returns a vector of references to all the leaf nodes in the knowledge model that are in (subtree of) concepts list specified by the client. getDesiredLeafNodes() subsumes getAllLeafNodes() based on the values of topic and concepts


getConceptExplanationPairs

public java.util.Vector getConceptExplanationPairs(boolean leafOnly)
Returns a vector of AtributeValue pairs of all the fully qualified learning objectives and their corresponding elaborations

Parameters:
leafOnly - Whether learning objective - explanation pair desired for leaf nodes only

toXMLString

public java.lang.String toXMLString()
Returns the structure of the knowledge model in XML format


setProficiency

public void setProficiency(java.util.Vector inputVector)
Sets the proficiency criteria of the KnowledgeUnit corresponding to the learning objective passed as parameter. inputVector is a vector where odd indices hold the learning objective string and even indices hold the integer array of proficiency for it


findShallowest

public KnowledgeUnit findShallowest(KnowledgeUnit currentRoot,
                                    java.lang.String desiredRoot)
Does Breadth First Search to find the KnowledgeUnit node with content = desiredRoot in the tree whose root is currentRoot - returns the desiredRoot's node


breadthFirstSearch

public KnowledgeUnit breadthFirstSearch(java.util.Vector nodeVector,
                                        java.lang.String desiredRoot)
Facilitates Breadth first search of the knowledge tree - If this is the node you are looking for, return it Else, add its children to the nodeVector and return


printKnowledgeModel

public void printKnowledgeModel()
Prints the knowledge model recursively


printVector

public static void printVector(java.util.Vector v)

main

public static void main(java.lang.String[] args)

getDomainRoot

public KnowledgeUnit getDomainRoot()