Class BrowserOntoTree

java.lang.Object
  |
  +--BrowserOntoTree

public class BrowserOntoTree
extends java.lang.Object

this class is used to read the protege file in and represent the knowledgebase in the JTrree


Field Summary
static ClsNode rootnode
           
static javax.swing.JTree tree
           
static javax.swing.tree.DefaultTreeModel treemodel
           
 
Constructor Summary
BrowserOntoTree()
          Constructor of the class
BrowserOntoTree(java.lang.String fileName)
           
 
Method Summary
 java.util.HashMap addnode(ClsNode node, java.lang.String cls, edu.stanford.smi.protege.model.Cls parent)
           
 void createCls(java.lang.String cls, edu.stanford.smi.protege.model.Cls parent)
           
 void createNodes(ClsNode top, edu.stanford.smi.protege.model.Cls par_cls)
           
static edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()
          return the knowledgeBase instance
static edu.stanford.smi.protege.model.Project getProject()
          return the project instance
static void handleErrors(java.util.Collection errors)
           
 int ifClsExist(java.lang.String name)
           
static void saveProject()
          save the project back to the format of protege
 void SetTreeModel()
          set the Tree Model for display
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

public static javax.swing.JTree tree

rootnode

public static ClsNode rootnode

treemodel

public static javax.swing.tree.DefaultTreeModel treemodel
Constructor Detail

BrowserOntoTree

public BrowserOntoTree()
Constructor of the class


BrowserOntoTree

public BrowserOntoTree(java.lang.String fileName)
Method Detail

getKnowledgeBase

public static edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()
return the knowledgeBase instance


getProject

public static edu.stanford.smi.protege.model.Project getProject()
return the project instance


SetTreeModel

public void SetTreeModel()
set the Tree Model for display


createCls

public void createCls(java.lang.String cls,
                      edu.stanford.smi.protege.model.Cls parent)

addnode

public java.util.HashMap addnode(ClsNode node,
                                 java.lang.String cls,
                                 edu.stanford.smi.protege.model.Cls parent)

saveProject

public static void saveProject()
save the project back to the format of protege


createNodes

public void createNodes(ClsNode top,
                        edu.stanford.smi.protege.model.Cls par_cls)

handleErrors

public static void handleErrors(java.util.Collection errors)

ifClsExist

public int ifClsExist(java.lang.String name)
Returns:
int , 0--found in the knowledgebase, -1----not found in the knowledgebase