|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mindswap.pellet.taxonomy.Taxonomy
public class Taxonomy
Field Summary | |
---|---|
static boolean |
BOTTOM_UP
|
static boolean |
DEBUG
Deprecated. Edit log4j.properties instead to turn on debugging |
static boolean |
DETAILED_DEBUG
Deprecated. Edit log4j.properties instead to turn on debugging |
static boolean |
SUB
|
static boolean |
SUPER
|
static boolean |
TOP_DOWN
|
Constructor Summary | |
---|---|
Taxonomy()
|
|
Taxonomy(boolean hideTopBottom)
|
Method Summary | |
---|---|
void |
addEquivalentNode(aterm.ATermAppl c,
TaxonomyNode node)
|
TaxonomyNode |
addNode(aterm.ATermAppl c)
|
TaxonomyNode |
addNode(aterm.ATermAppl c,
boolean hide)
|
java.util.List |
computeLCA(aterm.ATermList list)
Given a list of concepts, find all the Least Common Ancestors (LCA). |
boolean |
contains(aterm.ATermAppl c)
|
java.util.Set |
getAllEquivalents(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c. |
TaxonomyNode |
getBottom()
|
java.util.Set |
getClasses()
|
java.util.Set |
getDirectTypes(aterm.ATermAppl ind)
Get all the direct classes individual belongs to. |
java.util.Set |
getEquivalents(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c. |
java.util.Set |
getFlattenedSubSupers(aterm.ATermAppl c,
boolean direct,
boolean subOrSuper)
|
java.util.Set |
getInstances(aterm.ATermAppl c)
Returns all the instances of concept c. |
java.util.Set |
getInstances(aterm.ATermAppl c,
boolean direct)
Returns the instances of class c. |
TaxonomyNode |
getNode(aterm.ATermAppl c)
|
java.util.Set |
getSubs(aterm.ATermAppl c)
Returns all the (named) subclasses of class c. |
java.util.Set |
getSubs(aterm.ATermAppl c,
boolean direct)
Returns the (named) subclasses of class c. |
java.util.Set |
getSubs(aterm.ATermAppl c,
boolean direct,
boolean flat)
|
java.util.Set |
getSubSupers(aterm.ATermAppl c,
boolean direct,
boolean subOrSuper,
boolean flat)
|
java.util.Set |
getSupers(aterm.ATermAppl c)
Returns all the superclasses (implicitly or explicitly defined) of class c. |
java.util.Set |
getSupers(aterm.ATermAppl c,
boolean direct)
Returns the (named) superclasses of class c. |
java.util.Set |
getSupers(aterm.ATermAppl c,
boolean direct,
boolean flat)
|
TaxonomyNode |
getTop()
|
java.util.Set |
getTypes(aterm.ATermAppl ind)
Get all the named classes individual belongs to. |
java.util.Set |
getTypes(aterm.ATermAppl ind,
boolean direct)
Returns the classes individual belongs to. |
boolean |
isEquivalent(aterm.ATermAppl x,
aterm.ATermAppl y)
Checks if x is equivalent to y |
Bool |
isSubNodeOf(aterm.ATermAppl x,
aterm.ATermAppl y)
Checks if x has an ancestor y. |
void |
merge(TaxonomyNode node1,
TaxonomyNode node2)
|
void |
print()
|
void |
print(OutputFormatter out)
|
void |
removeCycles(TaxonomyNode node)
Walk through the super nodes of the given node and when a cycle is detected merge all the nodes in that path |
void |
removeNode(TaxonomyNode node)
|
java.util.List |
topologocialSort()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
public static boolean DETAILED_DEBUG
public static boolean SUB
public static boolean SUPER
public static boolean TOP_DOWN
public static boolean BOTTOM_UP
Constructor Detail |
---|
public Taxonomy()
public Taxonomy(boolean hideTopBottom)
Method Detail |
---|
public TaxonomyNode getBottom()
public TaxonomyNode getTop()
public java.util.Set getClasses()
public boolean contains(aterm.ATermAppl c)
public TaxonomyNode addNode(aterm.ATermAppl c)
public TaxonomyNode addNode(aterm.ATermAppl c, boolean hide)
public void addEquivalentNode(aterm.ATermAppl c, TaxonomyNode node)
public TaxonomyNode getNode(aterm.ATermAppl c)
public void removeNode(TaxonomyNode node)
public java.util.Set getInstances(aterm.ATermAppl c)
c
- Class whose instances are returned
public java.util.Set getInstances(aterm.ATermAppl c, boolean direct)
c
- Class whose instances are founddirect
- If true return only the direct instances, otherwise return all the instances
public boolean isEquivalent(aterm.ATermAppl x, aterm.ATermAppl y)
x
- Name of the first classy
- Name of the second class
public Bool isSubNodeOf(aterm.ATermAppl x, aterm.ATermAppl y)
x
- Name of the nodey
- Name of the ancestor ode
public java.util.Set getSubs(aterm.ATermAppl c)
c
- class whose subclasses are returned
public java.util.Set getSubs(aterm.ATermAppl c, boolean direct)
c
- Class whose subclasses are founddirect
- If true return only direct subclasses elese return all the subclasses
public java.util.Set getSupers(aterm.ATermAppl c)
c
- class whose superclasses are returned
public java.util.Set getSupers(aterm.ATermAppl c, boolean direct, boolean flat)
public java.util.Set getSubs(aterm.ATermAppl c, boolean direct, boolean flat)
public java.util.Set getSupers(aterm.ATermAppl c, boolean direct)
c
- Class whose subclasses are founddirect
- If true return all the superclasses else return only direct superclasses
public java.util.Set getSubSupers(aterm.ATermAppl c, boolean direct, boolean subOrSuper, boolean flat)
public java.util.Set getFlattenedSubSupers(aterm.ATermAppl c, boolean direct, boolean subOrSuper)
public java.util.Set getEquivalents(aterm.ATermAppl c)
c
- class whose equivalent classes are found
public java.util.Set getAllEquivalents(aterm.ATermAppl c)
c
- class whose equivalent classes are found
public java.util.Set getDirectTypes(aterm.ATermAppl ind)
ind
- An individual name
public java.util.Set getTypes(aterm.ATermAppl ind)
ind
- An individual name
public java.util.Set getTypes(aterm.ATermAppl ind, boolean direct)
ind
- An individual namedirect
- If true return only the direct types, otherwise return all types
public java.util.List topologocialSort()
public void removeCycles(TaxonomyNode node)
node
- public void merge(TaxonomyNode node1, TaxonomyNode node2)
public java.util.List computeLCA(aterm.ATermList list)
names
-
public void print()
public void print(OutputFormatter out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |