Class OntoTree
java.lang.Object
|
+--OntoTree
- public class OntoTree
- extends java.lang.Object
This class is used to read the protege project file in and represent the knowledgebase in the JTree
|
Field Summary |
static ClsNode |
rootnode
|
static javax.swing.JTree |
tree
|
static javax.swing.tree.DefaultTreeModel |
treemodel
|
|
Constructor Summary |
OntoTree()
Constructor of the class |
|
Method Summary |
java.util.HashMap |
addnode(ClsNode node,
java.util.HashMap param,
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()
|
static edu.stanford.smi.protege.model.Project |
getProject()
|
static void |
handleErrors(java.util.Collection errors)
|
int |
ifClsExist(java.lang.String name)
|
static void |
saveProject()
save the modification of the project |
void |
SetTreeModel()
set the treeModel for the display |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tree
public static javax.swing.JTree tree
rootnode
public static ClsNode rootnode
treemodel
public static javax.swing.tree.DefaultTreeModel treemodel
OntoTree
public OntoTree()
- Constructor of the class
getKnowledgeBase
public static edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()
- Returns:
- return the knowledgebase object representing the protege project file
getProject
public static edu.stanford.smi.protege.model.Project getProject()
- Returns:
- return the project object that represent the protege project file
SetTreeModel
public void SetTreeModel()
- set the treeModel for the 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.util.HashMap param,
edu.stanford.smi.protege.model.Cls parent)
- Returns:
- HashMap return the hashmap of the parent name and child name
saveProject
public static void saveProject()
- save the modification of the project
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