|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(OClass clas)
Constructs a class node given an ontology class |
|
ClassNode(OInstance instance)
Constructs a class node given an ontology instance |
|
ClassNode(Ontology o)
Constructs a root class node from an ontology |
Method Summary | |
---|---|
void |
addSubNode(ClassNode sub)
Adds a sub node |
Vector<ClassNode> |
children()
|
static ClassNode |
createRootNode(Ontology o)
create a structure representing the class hierarchy of an ontology |
static ClassNode |
createRootNode(Ontology o,
boolean includeInstances,
boolean includeAnonymousClasses)
|
static ClassNode |
createRootNode(Ontology o,
MappingDefinition mapping,
Map<String,ClassNode> nameVsNode)
Creates a structure representing the class hierarchy of an ontology and the gazetteerLists mapped to it. |
boolean |
equals(Object obj)
|
IFolder |
getChild(int index)
|
int |
getChildCount()
|
Iterator<ClassNode> |
getChildren()
|
int |
getIndexOfChild(Object child)
|
Object |
getSource()
Gets the Source object |
Object |
getTransferData(DataFlavor df)
|
DataFlavor[] |
getTransferDataFlavors()
|
int |
hashCode()
|
boolean |
isDataFlavorSupported(DataFlavor df)
|
void |
removeSubNode(ClassNode sub)
Removes a sub class |
void |
rename(String newName)
Renames this class node |
void |
setChildren(Vector<ClassNode> chldrn)
|
void |
setSource(Object o)
Sets the source object |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DataFlavor CLASS_NODE_FLAVOR
Constructor Detail |
---|
public ClassNode(Ontology o)
o
- the ontologypublic ClassNode(OClass clas)
clas
- ontology classpublic ClassNode(OInstance instance)
instance
- ontology instancepublic ClassNode(MappingNode mapNode)
mapNode
- mapping nodeMethod Detail |
---|
public static ClassNode createRootNode(Ontology o)
public static ClassNode createRootNode(Ontology o, boolean includeInstances, boolean includeAnonymousClasses)
public static ClassNode createRootNode(Ontology o, MappingDefinition mapping, Map<String,ClassNode> 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<ClassNode> getChildren()
getChildren
in interface IFolder
public void setChildren(Vector<ClassNode> chldrn)
public Vector<ClassNode> 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 int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |