|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ontotext.gate.vr.ClassNode
Represents a single class node from the visualized ontology
| Field Summary | |
private Vector |
children
|
static DataFlavor |
CLASS_NODE_FLAVOR
flavor used for drag and drop |
(package private) static DataFlavor[] |
flavors
|
private String |
name
|
private Object |
source
|
| Constructor Summary | |
ClassNode(MappingNode mapNode)
Constructs a class node given a mapping node |
|
ClassNode(OInstance instance)
Constructs a class node given an ontology instance |
|
ClassNode(Taxonomy o)
Constructs a root class node from an ontology |
|
ClassNode(TClass clas)
Constructs a class node given an ontology class |
|
| Method Summary | |
void |
addSubNode(ClassNode sub)
Adds a sub node |
Vector |
children()
|
static ClassNode |
createRootNode(Taxonomy o)
create a structure representing the class hierarchy of an ontology |
static ClassNode |
createRootNode(Taxonomy o,
boolean includeInstances)
|
static ClassNode |
createRootNode(Taxonomy o,
MappingDefinition mapping,
Map nameVsNode)
Creates a structure representing the class hierarchy of an ontology and the gazetteerLists mapped to it. |
boolean |
equals(Object o)
|
IFolder |
getChild(int index)
|
int |
getChildCount()
|
Iterator |
getChildren()
|
int |
getIndexOfChild(Object child)
|
Object |
getSource()
Gets the Source object |
Object |
getTransferData(DataFlavor df)
|
DataFlavor[] |
getTransferDataFlavors()
|
boolean |
isDataFlavorSupported(DataFlavor df)
|
void |
removeSubNode(ClassNode sub)
Removes a sub class |
void |
rename(String newName)
Renames this class node |
void |
setChildren(Vector chldrn)
|
void |
setSource(Object o)
Sets the source object |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final DataFlavor CLASS_NODE_FLAVOR
static DataFlavor[] flavors
private String name
private Vector children
private Object source
| Constructor Detail |
public ClassNode(Taxonomy o)
o - the ontologypublic ClassNode(TClass clas)
clas - ontology classpublic ClassNode(OInstance instance)
instance - ontology instancepublic ClassNode(MappingNode mapNode)
mapNode - mapping node| Method Detail |
public static ClassNode createRootNode(Taxonomy o)
public static ClassNode createRootNode(Taxonomy o,
boolean includeInstances)
public static ClassNode createRootNode(Taxonomy o,
MappingDefinition mapping,
Map nameVsNode)
o - an ontologymapping - mapping definitionnameVsNode - : this is actually a return value: should be
initialized before passing to this method and afterwards one can find a mapping
of class names vs class nodes there.
public int getIndexOfChild(Object child)
getIndexOfChild in interface IFolderpublic Iterator getChildren()
getChildren in interface IFolderpublic void setChildren(Vector chldrn)
public Vector children()
children in interface IFolderpublic String toString()
toString in interface IFolderpublic int getChildCount()
getChildCount in interface IFolderpublic IFolder getChild(int index)
getChild in interface IFolderpublic boolean equals(Object o)
public Object getSource()
public void setSource(Object o)
o - the source object to be setpublic void rename(String newName)
newName - the new name of the nodepublic void removeSubNode(ClassNode sub)
sub - the sub class to be removedpublic void addSubNode(ClassNode sub)
sub - the sub node to be addedpublic boolean isDataFlavorSupported(DataFlavor df)
isDataFlavorSupported in interface Transferable
public Object getTransferData(DataFlavor df)
throws UnsupportedFlavorException,
IOException
getTransferData in interface TransferableUnsupportedFlavorException
IOExceptionpublic DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||