public class UIResponse extends ScopedResource implements Response
Modifier and Type | Field and Description |
---|---|
static String |
MY_URI
The Constant MY_URI.
|
static String |
PROP_DIALOG_DATA
The Constant PROP_DIALOG_DATA.
|
static String |
PROP_DIALOG_ID
The Constant PROP_DIALOG_ID.
|
static String |
PROP_IS_DIALOG_MANAGER_RESPONSE
The Constant PROP_IS_DIALOG_MANAGER_RESPONSE.
|
static String |
PROP_IS_SUBDIALOG_CALL
The Constant PROP_IS_SUBDIALOG_CALL.
|
static String |
PROP_SUBMISSION_ID
The Constant PROP_SUBMISSION_ID.
|
static String |
PROP_SUBMISSION_LOCATION
The Constant PROP_SUBMISSION_LOCATION.
|
ONLY_LOCAL_SCOPE, PROP_ORIG_SCOPE, PROP_SCOPES
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Constructor and Description |
---|
UIResponse()
This constructor is for the exclusive usage by deserializers.
|
UIResponse(Resource user,
AbsLocation inputLocation,
Submit submit)
This constructor is used in the context of a running dialog.
|
Modifier and Type | Method and Description |
---|---|
String |
getDialogID()
Gets the dialog id.
|
String |
getParentDialogURI()
Gets the parent dialog uri.
|
int |
getPropSerializationType(String propURI)
Answers if the given property has to be considered when serializing this
individual in a minimized way, and if not ignore-able, whether its value
should be presented in its full form or can be reduced.
|
String |
getSubmissionID()
Gets the submission id.
|
AbsLocation |
getSubmissionLocation()
Gets the submission location.
|
Resource |
getSubmittedData()
Gets the submitted data.
|
Resource |
getUser()
Gets the
User . |
Object |
getUserInput(String[] propPath)
Gets the user input.
|
boolean |
isForDialogManagerCall()
Checks if is the response is for the IDialogManager.
|
boolean |
isSubdialogCall()
Checks if is subdialog call.
|
boolean |
isSubdialogSubmission()
Checks if is subdialog submission.
|
addScope, clearScopes, getOriginScope, getScopes, isScoped, isSerializableTo, setOriginScope, setScope
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setProperty, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
public static final String MY_URI
public static final String PROP_DIALOG_DATA
public static final String PROP_DIALOG_ID
public static final String PROP_SUBMISSION_LOCATION
public static final String PROP_IS_SUBDIALOG_CALL
public static final String PROP_SUBMISSION_ID
public static final String PROP_IS_DIALOG_MANAGER_RESPONSE
public UIResponse()
public UIResponse(Resource user, AbsLocation inputLocation, Submit submit)
user
- reference to the User
inputLocation
- location of the User
submit
- instance of a submit button that has finished the dialogpublic String getDialogID()
public AbsLocation getSubmissionLocation()
public String getParentDialogURI()
public int getPropSerializationType(String propURI)
Resource
Resource.PROP_SERIALIZATION_OPTIONAL
,
Resource.PROP_SERIALIZATION_REDUCED
, or Resource.PROP_SERIALIZATION_FULL
.
It can be assumed that the given property is one of those returned by
Resource.getPropertyURIs()
. PROP_SERIALIZATION_OPTIONAL
in
favor of lower communication traffic and higher performance even at risk
of a possible additional query on the receiver side for fetching this
info. With the same rationale, if a property should be included in the
process of serialization, it is preferable to include it in a reduced
form; in this case the return value should be
PROP_SERIALIZATION_REDUCED
, otherwise
PROP_SERIALIZATION_FULL
can be returned.
Subclasses should normally overwrite this method as this default
implementation returns always PROP_SERIALIZATION_FULL
.getPropSerializationType
in class Resource
Resource.getPropSerializationType(java.lang.String)
public String getSubmissionID()
public Resource getSubmittedData()
public Resource getUser()
User
.User
. It is declared as Resource because the type
User is defined in the Profiling Ontology. The type is not needed
for for matchmaking Either.public Object getUserInput(String[] propPath)
propPath
- array of property URIs, path of a certain expected user inputpublic boolean isSubdialogCall()
public boolean isSubdialogSubmission()
public boolean isForDialogManagerCall()
Copyright © 2018 universAAL Consortium. All rights reserved.