Package com.gengoai.hermes
Class EntityType
- java.lang.Object
-
- com.gengoai.EnumValue<T>
-
- com.gengoai.HierarchicalEnumValue<EntityType>
-
- com.gengoai.hermes.EntityType
-
- All Implemented Interfaces:
Tag
,Serializable
,Cloneable
,Comparable<EntityType>
public final class EntityType extends HierarchicalEnumValue<EntityType>
Tag type associated with Entity annotations. Entities are defined in a hierarchy, e.g.
Location -> Country
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityType.Converter
The type Converter.
-
Field Summary
Fields Modifier and Type Field Description static EntityType
ROOT
The constant ROOT.-
Fields inherited from class com.gengoai.HierarchicalEnumValue
SEPARATOR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EntityType
make(EntityType parent, String name)
Makes a new or retrieves an existing EntityType with the given parent and namestatic EntityType
make(String name)
Makes a new or retrieves an existing EntityType.protected HierarchicalRegistry<EntityType>
registry()
static Collection<EntityType>
values()
Returns a collection of all currently registered EntityType-
Methods inherited from class com.gengoai.HierarchicalEnumValue
children, depth, isInstance, isLeaf, isRoot, label, parent, path
-
Methods inherited from class com.gengoai.EnumValue
canonicalName, clone, compareTo, equals, hashCode, main, name, readResolve, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.gengoai.Tag
isInstance
-
-
-
-
Field Detail
-
ROOT
public static final EntityType ROOT
The constant ROOT.
-
-
Method Detail
-
make
public static EntityType make(EntityType parent, String name)
Makes a new or retrieves an existing EntityType with the given parent and name- Parameters:
parent
- the parent EntityTypename
- the name of the EntityType- Returns:
- the EntityType
-
make
public static EntityType make(String name)
Makes a new or retrieves an existing EntityType.- Parameters:
name
- the name of the EntityType- Returns:
- the EntityType
-
values
public static Collection<EntityType> values()
Returns a collection of all currently registered EntityType- Returns:
- the collection of EntityType
-
registry
protected HierarchicalRegistry<EntityType> registry()
- Specified by:
registry
in classHierarchicalEnumValue<EntityType>
-
-