Package org.openhab.core.semantics
Class SemanticTags
java.lang.Object
org.openhab.core.semantics.SemanticTags
This is a class that gives static access to the semantic tag library.
For everything that is not static, the
SemanticsService
should be used instead.- Author:
- Kai Kreuzer - Initial contribution, Jimmy Tanagra - Add the ability to add new tags at runtime, Laurent Garnier - Several methods moved into class SemanticsService or SemanticTagRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Retrieves the class for a given id.getEquipment
(Item item) getLocation
(Item item) getProperty
(Item item) getSemanticType
(Item item) Determines the semantic type of anItem
i.e.static void
removeTagSet
(String id, Class<? extends Tag> tagSet)
-
Constructor Details
-
SemanticTags
public SemanticTags()
-
-
Method Details
-
getById
Retrieves the class for a given id.- Parameters:
tagId
- the id of the tag. The id can be fully qualified (e.g. "Location_Room_Bedroom") or a segment, if this uniquely identifies the tag (e.g. "Bedroom").- Returns:
- the class for the id or null, if non exists.
-
getSemanticType
- Parameters:
item
- the Item to get the semantic type for- Returns:
- a sub-type of Location, Equipment or Point
-
getProperty
- Parameters:
item
- the Item to get the property for- Returns:
- a sub-type of Property if the Item represents a Point, otherwise null
-
getPoint
- Parameters:
item
- the Item to get the Point for- Returns:
- a sub-type of a
Point
if the Item represents a Point, otherwise null
-
getEquipment
- Parameters:
item
- the Item to get the Equipment for- Returns:
- a sub-type of
Equipment
if the Item represents an Equipment, otherwise null
-
getLocation
- Parameters:
item
- the item to get the location for- Returns:
- a sub-type of
Location
if the item represents a location, otherwise null
-
addTagSet
-
removeTagSet
-