Package de.fraunhofer.iosb.ilt.sta.model
Enum EntityType
- java.lang.Object
-
- java.lang.Enum<EntityType>
-
- de.fraunhofer.iosb.ilt.sta.model.EntityType
-
- All Implemented Interfaces:
Serializable
,Comparable<EntityType>
public enum EntityType extends Enum<EntityType>
This enum contains class and naming information about entities.- Author:
- Nils Sommer, Hylke van der Schaaf, Michael Jacoby
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EntityType
byName(String name)
Get an EntityType by name.String
getName()
Get the name of this entity type.EntityType
getPlural()
Set<EntityProperty>
getProperties()
EntityType
getSingular()
Class<? extends Entity>
getType()
Get the class of this entity type.com.fasterxml.jackson.core.type.TypeReference<EntityList>
getTypeReference()
Returns the typeReference used for this entity type.boolean
hasProperty(EntityProperty property)
boolean
hasRelationTo(EntityType other)
Check whether this entity type has a relationship to another entity type.boolean
isList()
static EntityType
listForClass(Class<? extends Entity> clazz)
static EntityType
singleForClass(Class<? extends Entity> clazz)
static EntityType
valueOf(String name)
Returns the enum constant of this type with the specified name.static EntityType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATASTREAM
public static final EntityType DATASTREAM
-
DATASTREAMS
public static final EntityType DATASTREAMS
-
MULTIDATASTREAM
public static final EntityType MULTIDATASTREAM
-
MULTIDATASTREAMS
public static final EntityType MULTIDATASTREAMS
-
FEATURE_OF_INTEREST
public static final EntityType FEATURE_OF_INTEREST
-
FEATURES_OF_INTEREST
public static final EntityType FEATURES_OF_INTEREST
-
HISTORICAL_LOCATION
public static final EntityType HISTORICAL_LOCATION
-
HISTORICAL_LOCATIONS
public static final EntityType HISTORICAL_LOCATIONS
-
LOCATION
public static final EntityType LOCATION
-
LOCATIONS
public static final EntityType LOCATIONS
-
OBSERVATION
public static final EntityType OBSERVATION
-
OBSERVATIONS
public static final EntityType OBSERVATIONS
-
OBSERVED_PROPERTY
public static final EntityType OBSERVED_PROPERTY
-
OBSERVED_PROPERTIES
public static final EntityType OBSERVED_PROPERTIES
-
SENSOR
public static final EntityType SENSOR
-
SENSORS
public static final EntityType SENSORS
-
THING
public static final EntityType THING
-
THINGS
public static final EntityType THINGS
-
ACTUATOR
public static final EntityType ACTUATOR
-
ACTUATORS
public static final EntityType ACTUATORS
-
TASKING_CAPABILITY
public static final EntityType TASKING_CAPABILITY
-
TASKING_CAPABILITIES
public static final EntityType TASKING_CAPABILITIES
-
TASK
public static final EntityType TASK
-
TASKS
public static final EntityType TASKS
-
-
Method Detail
-
values
public static EntityType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EntityType c : EntityType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getProperties
public Set<EntityProperty> getProperties()
-
getType
public Class<? extends Entity> getType()
Get the class of this entity type.- Returns:
- the class
-
getTypeReference
public com.fasterxml.jackson.core.type.TypeReference<EntityList> getTypeReference()
Returns the typeReference used for this entity type. For plurals, it returns the typeReference for the collection of the type.- Returns:
- The type reference.
-
getName
public String getName()
Get the name of this entity type.- Returns:
- the name
-
isList
public boolean isList()
-
getPlural
public EntityType getPlural()
-
getSingular
public EntityType getSingular()
-
hasRelationTo
public boolean hasRelationTo(EntityType other)
Check whether this entity type has a relationship to another entity type.- Parameters:
other
- the other entity type- Returns:
- true if they are related, otherwise false
-
hasProperty
public boolean hasProperty(EntityProperty property)
-
listForClass
public static EntityType listForClass(Class<? extends Entity> clazz)
-
singleForClass
public static EntityType singleForClass(Class<? extends Entity> clazz)
-
byName
public static EntityType byName(String name)
Get an EntityType by name.- Parameters:
name
- the name- Returns:
- the EntityType
-
-