|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ontotext.gate.vr.ClassNode
public class ClassNode
Represents a single class node from the visualized ontology
Field Summary | |
---|---|
static DataFlavor |
CLASS_NODE_FLAVOR
flavor used for drag and drop |
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
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 nodeMethod Detail |
---|
public static ClassNode createRootNode(Taxonomy o)
includeInstances
- if true, then instances of the ontology
are also included
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 IFolder
public Iterator getChildren()
getChildren
in interface IFolder
public void setChildren(Vector chldrn)
public Vector children()
children
in interface IFolder
public String toString()
toString
in interface IFolder
toString
in class Object
public int getChildCount()
getChildCount
in interface IFolder
public IFolder getChild(int index)
getChild
in interface IFolder
public boolean equals(Object o)
equals
in class Object
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 Transferable
UnsupportedFlavorException
IOException
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |