Class Semantics
java.lang.Object
org.openhab.core.model.script.actions.Semantics
The static methods of this class are made available as functions in the scripts. This allows a script to use
Semantics features.
- Author:
- Christoph Weitkamp - Initial contribution
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Item
getEquipment
(Item item) getEquipmentType
(Item item) static @Nullable Item
getLocation
(Item item) getLocationType
(Item item) getPointType
(Item item) getPropertyType
(Item item) getSemanticType
(Item item) Determines the semantic type of anItem
(i.e.static boolean
isEquipment
(Item item) static boolean
isLocation
(Item item) static boolean
-
Constructor Details
-
Semantics
public Semantics()
-
-
Method Details
-
isLocation
- Parameters:
item
- the Item to check- Returns:
- return true, if the given Item is a Location, false otherwise
-
isEquipment
- Parameters:
item
- the Item to check- Returns:
- return true, if the given Item is an Equipment, false otherwise
-
isPoint
- Parameters:
item
- the Item to check- Returns:
- return true, if the given Item is a Point, false otherwise
-
getLocation
- Parameters:
item
- the Item to determine the Location for- Returns:
- the related Location Item of the Item or null
-
getLocationType
- Parameters:
item
- the Item to determine the Location for- Returns:
- the related Location type of the Item or null
-
getEquipment
- Parameters:
item
- the Item to retrieve the Equipment Item for- Returns:
- the related Equipment Item the Item belongs to or null
-
getEquipmentType
- Parameters:
item
- the Item to retrieve the Equipment for- Returns:
- the Equipment the Item relates to or null
-
getPointType
- Parameters:
item
- the Item to determine the Point for- Returns:
- the Point type of the Item or null
-
getPropertyType
- Parameters:
item
- the Item to retrieve the Property for- Returns:
- the Property type the Item relates to or null
-
getSemanticType
- Parameters:
item
- the Item to get the semantic type for- Returns:
- a sub-type of Location, Equipment or Point
-