use strings for recordBasis (#2615 und #3544)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / ISimpleTerm.java
index c48b2ffea52b202bfaceb2200e1e4f8c283ad41a..75cc1116107d560f49daef5224e2565b46f8d5a3 100644 (file)
@@ -32,9 +32,31 @@ public interface ISimpleTerm<T extends ISimpleTerm> {
        \r
 \r
        /**\r
-        * Returns all defined terms this term is a generalization for.\r
-        * Therefore the returned terms are kind of <code>this</code> term\r
+        * Returns all defined terms this term is a direct generalization for.\r
+        * Therefore the returned terms are kind of <code>this</code> term.\r
         */\r
        public Set<T> getGeneralizationOf();\r
+       \r
+\r
+       /**\r
+        * Computes if <code>this</code> term is kind of the <code>ancestor</code> term.\r
+        * So the <code>ancestor</code> term is direct or indirect (recursive) generalization\r
+        * of <code>this</code> term.\r
+        * @param ancestor the potential ancestor term\r
+        * @see #getKindOf()\r
+        * @see #getGeneralizationOf()\r
+        */\r
+       public boolean isKindOf(T ancestor);\r
+       \r
+       /**\r
+        * Returns all defined terms this term is a generalization for.\r
+        * Therefore the returned terms are kind of <code>this</code> term.\r
+        * If parameter <code>recursive</code> is <code>false</code> only the\r
+        * direct descendants will be returned. If it is <code>true</code>\r
+        * the direct descendants and there recursive descendants (all descendants)\r
+        * will be returned. \r
+        */\r
+       //TODO move up to ISimpleTerm\r
+       public Set<T> getGeneralizationOf(boolean recursive);\r
 \r
 }\r