public interface IOpenHabRestClient
| Modifier and Type | Field and Description |
|---|---|
static String |
ASK_PATH |
static String |
COMMAND_PATH |
static String |
ERR_JSON_CONVERT |
static String |
GOAL_EXECUTE_GOAL_PATH |
static String |
GOAL_GOAL_PATH |
static String |
GOAL_PATH |
static String |
GOAL_QUALITY_PATH |
static String |
ITEMS_PATH |
static String |
REST_PATH |
static String |
SELECT_PATH |
static String |
SEMANTIC_LOCATION_PATH |
static String |
SEMANTIC_LOCATIONS_PATH |
static String |
SEMANTIC_PATH |
static String |
SEMANTIC_PERSONS |
static String |
SEMANTIC_SENSOR_PATH |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this client.
|
boolean |
executeAsk(String queryStmt,
boolean withLatest)
Executes an AskQuery.
|
boolean |
executeGoal(ExecuteGoalCommandBean cmd)
Executes the given goal on the OH Goal Layer
|
String |
executeSelect(String queryStmt,
boolean withLatest)
Executes a select and gets the result as json string
|
List<Goal> |
getAllGoals()
Gets all goals from the OH Goal Layer
|
List<OpenHabItem> |
getAllItems()
Gets a list with all openhab items.
|
List<SemanticLocation> |
getAllLocations()
Gets all locations from the OH SAL
|
List<Quality> |
getAllQualities()
Gets all qualities from the OH Goal Layer
|
List<eu.vicci.process.devices.core.Sensor> |
getAllSensorsSemantic()
Gets a list with all sensors.
|
String |
getLocationForItem(String itemName)
Gets the location of a item, which is defined in openhab
|
String |
getOpenHabRestVersion()
Gets the current OpenHab rest API version
|
List<eu.vicci.process.model.util.messages.core.SemanticPerson> |
getSemanticPersons()
Gets all available persons semantically annotated
|
String |
getSemanticType(String itemName)
Gets the type of the item, defined in the semantic model
|
void |
postCommand(OpenHabItem item,
String command)
Posts a command to the specified openhab item.
|
String |
postCommandSemantic(String queryStmt,
String command,
boolean withLatest)
Posts a command to semantic layer in OpenHab.
|
static final String ITEMS_PATH
static final String REST_PATH
static final String SEMANTIC_PATH
static final String SELECT_PATH
static final String ASK_PATH
static final String COMMAND_PATH
static final String SEMANTIC_LOCATION_PATH
static final String SEMANTIC_SENSOR_PATH
static final String SEMANTIC_PERSONS
static final String SEMANTIC_LOCATIONS_PATH
static final String GOAL_PATH
static final String GOAL_GOAL_PATH
static final String GOAL_QUALITY_PATH
static final String GOAL_EXECUTE_GOAL_PATH
static final String ERR_JSON_CONVERT
String getOpenHabRestVersion()
String executeSelect(String queryStmt, boolean withLatest)
queryStmt - The Select StatementwithLatest - If true, all stateValues in the model will be updated before the query
is executed.boolean executeAsk(String queryStmt, boolean withLatest)
queryStmt - The Ask StatementwithLatest - If true, all stateValues in the model will be updated before the query
is executed.String postCommandSemantic(String queryStmt, String command, boolean withLatest)
queryStmt - The query should select the functionalities, which should receive the
command. E.g. '?subject dogont:hasFunctionality ?func' where the var
'?func' represents all the functionalities, which receives the command.command - The command, supported by the functionalities and the specific items.withlatest - If true, all stateValues in the model will be updated before the query
is executed.String getLocationForItem(String itemName)
itemName - String getSemanticType(String itemName)
itemName - List<OpenHabItem> getAllItems()
List<eu.vicci.process.model.util.messages.core.SemanticPerson> getSemanticPersons()
void close()
void postCommand(OpenHabItem item, String command)
List<eu.vicci.process.devices.core.Sensor> getAllSensorsSemantic()
List<SemanticLocation> getAllLocations()
boolean executeGoal(ExecuteGoalCommandBean cmd)
cmd - Copyright © 2018. All rights reserved.