Package org.openhab.core.voice.text
Class InterpretationResult
java.lang.Object
org.openhab.core.voice.text.InterpretationResult
Bundles results of an interpretation. Represents final outcome and user feedback. This class is immutable.
- Author:
- Tilman Kamp - Initial contribution
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final InterpretationResultRepresents successful parsing and interpretation.static final InterpretationResultRepresents a problem in the interpretation step after successful parsing.static final InterpretationResultRepresents a syntactical problem during parsing.
- 
Constructor SummaryConstructorsConstructorDescriptionInterpretationResult(boolean success, String response) Constructs a result.InterpretationResult(String response) Constructs a successful result.InterpretationResult(InterpretationException exception) Constructs an unsuccessful result.
- 
Method Summary
- 
Field Details- 
OKRepresents successful parsing and interpretation.
- 
SYNTAX_ERRORRepresents a syntactical problem during parsing.
- 
SEMANTIC_ERRORRepresents a problem in the interpretation step after successful parsing.
 
- 
- 
Constructor Details- 
InterpretationResultConstructs a successful result.- Parameters:
- response- the textual response. Should be short, localized and understandable by non-technical users.
 
- 
InterpretationResultConstructs an unsuccessful result.- Parameters:
- exception- the responsible exception
 
- 
InterpretationResultConstructs a result.- Parameters:
- success- if the result represents a successful or unsuccessful interpretation
- response- the textual response. Should be short, localized and understandable by non-technical users.
 
 
- 
- 
Method Details- 
isSuccesspublic boolean isSuccess()- Returns:
- if interpretation was successful
 
- 
getException- Returns:
- the exception
 
- 
getResponse- Returns:
- the response
 
 
-