public class TaxonomyUtils extends Object
Title: TaxonomyUtils
Description: Utilities for manipulating taxonomy data structure
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
| Modifier and Type | Field and Description |
|---|---|
static Object |
INSTANCES_KEY |
static Object |
SUPER_EXPLANATION_KEY |
| Constructor and Description |
|---|
TaxonomyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addSuperExplanation(Taxonomy<aterm.ATermAppl> t,
aterm.ATermAppl sub,
aterm.ATermAppl sup,
Set<aterm.ATermAppl> explanation) |
static void |
clearAllInstances(Taxonomy<?> t) |
static void |
clearSuperExplanation(Taxonomy<aterm.ATermAppl> t,
aterm.ATermAppl c) |
static <T,I> Set<I> |
getAllInstances(Taxonomy<T> t,
T c)
Retrieve all instances of a class (based on the current state of the
taxonomy)
|
static <T,I> Set<I> |
getDirectInstances(Taxonomy<T> t,
T c)
Retrieve direct instances of a class (based on current state of the
taxonomy)
|
static Set<Set<aterm.ATermAppl>> |
getSuperExplanations(Taxonomy<aterm.ATermAppl> t,
aterm.ATermAppl sub,
aterm.ATermAppl sup) |
static <T> Set<Set<T>> |
getTypes(Taxonomy<T> t,
Object ind,
boolean directOnly)
Get classes of which the individual is an instance (based on the current
state of the taxonomy)
|
static boolean |
isType(Taxonomy<aterm.ATermAppl> t,
aterm.ATermAppl ind,
aterm.ATermAppl c)
Determine if an individual is an instance of a class (based on the
current state of the taxonomy)
|
public static final Object INSTANCES_KEY
public static final Object SUPER_EXPLANATION_KEY
public static boolean addSuperExplanation(Taxonomy<aterm.ATermAppl> t, aterm.ATermAppl sub, aterm.ATermAppl sup, Set<aterm.ATermAppl> explanation)
public static void clearSuperExplanation(Taxonomy<aterm.ATermAppl> t, aterm.ATermAppl c)
public static void clearAllInstances(Taxonomy<?> t)
public static <T,I> Set<I> getAllInstances(Taxonomy<T> t, T c)
t - the taxonomyc - the classpublic static <T,I> Set<I> getDirectInstances(Taxonomy<T> t, T c)
t - the taxonomyc - the classc and not
instances of any class d where subClassOf(d,c)public static Set<Set<aterm.ATermAppl>> getSuperExplanations(Taxonomy<aterm.ATermAppl> t, aterm.ATermAppl sub, aterm.ATermAppl sup)
public static <T> Set<Set<T>> getTypes(Taxonomy<T> t, Object ind, boolean directOnly)
t - the taxonomyind - the individualdirectOnly - true if only most specific classes are desired,
false if all classes are desiredpublic static boolean isType(Taxonomy<aterm.ATermAppl> t, aterm.ATermAppl ind, aterm.ATermAppl c)
t - the taxonomyind - the individualc - the classtrue if instanceOf(ind,c),
false elseCopyright © 2019. All rights reserved.