org.universAAL.middleware.ui
Class UIRequest

Package class diagram package UIRequest
java.lang.Object
  extended by org.universAAL.middleware.rdf.Resource
      extended by org.universAAL.middleware.rdf.FinalizedResource
          extended by org.universAAL.middleware.ui.UIRequest
All Implemented Interfaces:
Matchable, Request, Requirement
Direct Known Subclasses:
Dialog, Message, SubDialog

public class UIRequest
extends FinalizedResource
implements Request

Instances of this class can be used to user interaction requests. Applications just need to provide the dialog's Form object along with the addressed User, the priority of the dialog, and the language and privacy level of the content. The IUIBus will then add the current adaptation parameters to the call (by asking the Dialog Manager) before selecting the appropriate UIHandler and forwarding the call to it.

Author:
mtazari, eandgrg, Carsten Stockloew

Field Summary
static String MY_URI
          The Constant MY_URI.
static String PROP_ADDRESSED_USER
          The Constant PROP_ADDRESSED_USER.
static String PROP_DIALOG_FORM
          The Constant PROP_DIALOG_FORM.
static String PROP_DIALOG_LANGUAGE
          The Constant PROP_DIALOG_LANGUAGE.
static String PROP_DIALOG_PRIORITY
          The Constant PROP_DIALOG_PRIORITY.
static String PROP_DIALOG_PRIVACY_LEVEL
          The Constant PROP_DIALOG_PRIVACY_LEVEL.
static String PROP_HAS_ACCESS_IMPAIRMENT
          The Constant PROP_HAS_ACCESS_IMPAIRMENT.
static String PROP_HAS_PREFERENCE
          The Constant PROP_HAS_PREFERENCE.
static String PROP_PRESENTATION_LOCATION
          The Constant PROP_PRESENTATION_LOCATION.
static String PROP_PRESENTATION_MODALITY
           
static String PROP_PRESENTATION_MODALITY_ALT
           
static String uAAL_UI_NAMESPACE
          The Constant uAAL_UI_NAMESPACE.
 
Fields inherited from class org.universAAL.middleware.rdf.Resource
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, ns_delim_index, 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, PROP_uAAL_INVOLVED_HUMAN_USER, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uAAL_NAMESPACE_PREFIX, uAAL_SERVICE_NAMESPACE, uAAL_VOCABULARY_NAMESPACE, uri
 
Constructor Summary
UIRequest()
          This constructor is for the exclusive usage by deserializers.
UIRequest(Resource user, Form dialogForm, LevelRating dialogPriority, Locale dialogLang, PrivacyLevel dialogPrivacy)
          Instantiates a new UIRequest.
 
Method Summary
 Resource getAddressedUser()
          Gets the addressed User.
 Modality getAltPresentationModality()
          Gets the alternative presentation modality.
 Form getDialogForm()
          Gets the dialog Form.
 String getDialogID()
          Gets the dialog id.
 Locale getDialogLanguage()
          Gets the dialog language.
 LevelRating getDialogPriority()
          Gets the dialog priority.
 PrivacyLevel getDialogPrivacyLevel()
          Gets the dialog privacy level.
 DialogType getDialogType()
          Gets the dialog type.
 AccessImpairment[] getImpairments()
          Gets the impairments.
 Preference[] getPreferences()
          Gets the Preferences.
 AbsLocation getPresentationLocation()
          Gets the presentation location.
 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.
 boolean matches(Matchable subset)
           
 void setAltPresentationModality(Modality outputModality)
          Sets the alternative presentation modality.
 void setCollectedInput(Resource data)
          Sets the collected input.
 void setImpairments(AccessImpairment[] impairments)
          Sets the impairments.
 void setPreferences(Preference[] preferences)
          Sets the preferences.
 void setPresentationLocation(AbsLocation presentationLocation)
          Sets the presentation location.
 void setPresentationModality(Modality modality)
          Sets the presentation modality.
 
Methods inherited from class org.universAAL.middleware.rdf.FinalizedResource
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
 
Methods inherited from class org.universAAL.middleware.rdf.Resource
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setProperty, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uAAL_UI_NAMESPACE

public static final String uAAL_UI_NAMESPACE
The Constant uAAL_UI_NAMESPACE.

See Also:
Constant Field Values

MY_URI

public static final String MY_URI
The Constant MY_URI.

See Also:
Constant Field Values

PROP_ADDRESSED_USER

public static final String PROP_ADDRESSED_USER
The Constant PROP_ADDRESSED_USER.

See Also:
Constant Field Values

PROP_DIALOG_FORM

public static final String PROP_DIALOG_FORM
The Constant PROP_DIALOG_FORM.

See Also:
Constant Field Values

PROP_DIALOG_PRIORITY

public static final String PROP_DIALOG_PRIORITY
The Constant PROP_DIALOG_PRIORITY.

See Also:
Constant Field Values

PROP_DIALOG_LANGUAGE

public static final String PROP_DIALOG_LANGUAGE
The Constant PROP_DIALOG_LANGUAGE.

See Also:
Constant Field Values

PROP_DIALOG_PRIVACY_LEVEL

public static final String PROP_DIALOG_PRIVACY_LEVEL
The Constant PROP_DIALOG_PRIVACY_LEVEL.

See Also:
Constant Field Values

PROP_PRESENTATION_LOCATION

public static final String PROP_PRESENTATION_LOCATION
The Constant PROP_PRESENTATION_LOCATION.

See Also:
Constant Field Values

PROP_HAS_ACCESS_IMPAIRMENT

public static final String PROP_HAS_ACCESS_IMPAIRMENT
The Constant PROP_HAS_ACCESS_IMPAIRMENT.

See Also:
Constant Field Values

PROP_HAS_PREFERENCE

public static final String PROP_HAS_PREFERENCE
The Constant PROP_HAS_PREFERENCE.

See Also:
Constant Field Values

PROP_PRESENTATION_MODALITY

public static final String PROP_PRESENTATION_MODALITY
See Also:
Constant Field Values

PROP_PRESENTATION_MODALITY_ALT

public static final String PROP_PRESENTATION_MODALITY_ALT
See Also:
Constant Field Values
Constructor Detail

UIRequest

public UIRequest()
This constructor is for the exclusive usage by deserializers.


UIRequest

public UIRequest(Resource user,
                 Form dialogForm,
                 LevelRating dialogPriority,
                 Locale dialogLang,
                 PrivacyLevel dialogPrivacy)
Instantiates a new UIRequest.

Parameters:
user - the 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.
dialogForm - The dialog form.
dialogPriority - The dialog priority.
dialogLang - the dialog Language.
dialogPrivacy - the dialog privacy.
Method Detail

getPropSerializationType

public int getPropSerializationType(String propURI)
Description copied from class: Resource
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. The return value must be one of 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().
Decision criterion should be if the value of this property is absolutely necessary when this resource is being sent to a remote node. If the subclass rates it as unlikely that the receiver side would need this info, the answer should be 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.

Overrides:
getPropSerializationType in class Resource
See Also:
Resource.getPropSerializationType(java.lang.String)

getAddressedUser

public Resource getAddressedUser()
Gets the addressed User.

Returns:
the addressed 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.

getDialogForm

public Form getDialogForm()
Gets the dialog Form.

Returns:
the dialog Form

getDialogID

public String getDialogID()
Gets the dialog id.

Returns:
the dialog id

getDialogLanguage

public Locale getDialogLanguage()
Gets the dialog language.

Returns:
the dialog language

getDialogPriority

public LevelRating getDialogPriority()
Gets the dialog priority.

Returns:
the dialog priority

getDialogPrivacyLevel

public PrivacyLevel getDialogPrivacyLevel()
Gets the dialog privacy level.

Returns:
the dialog privacy level

getDialogType

public DialogType getDialogType()
Gets the dialog type.

Returns:
the dialog type

getImpairments

public AccessImpairment[] getImpairments()
Gets the impairments.

Returns:
the impairments

getPreferences

public Preference[] getPreferences()
Gets the Preferences.

Returns:
the preferences

getPresentationLocation

public AbsLocation getPresentationLocation()
Gets the presentation location.

Returns:
the presentation location

setCollectedInput

public void setCollectedInput(Resource data)
Sets the collected input.

Parameters:
data - the new collected input, The Resource set as form Root data.

setImpairments

public void setImpairments(AccessImpairment[] impairments)
Sets the impairments.

Parameters:
impairments - the new impairments

setPreferences

public void setPreferences(Preference[] preferences)
Sets the preferences.

Parameters:
preferences - the new preferences

setPresentationLocation

public void setPresentationLocation(AbsLocation presentationLocation)
Sets the presentation location.

Parameters:
presentationLocation - the new presentation location

setPresentationModality

public void setPresentationModality(Modality modality)
Sets the presentation modality.

Parameters:
modality - the new presentation modality

getAltPresentationModality

public Modality getAltPresentationModality()
Gets the alternative presentation modality.

Returns:
the alternative presentation modality

setAltPresentationModality

public void setAltPresentationModality(Modality outputModality)
Sets the alternative presentation modality.

Parameters:
outputModality - the new alternative presentation modality

matches

public boolean matches(Matchable subset)
Specified by:
matches in interface Matchable
Returns:
true if the other Matchable matches, false if not
See Also:
Matchable.matches(Matchable)


Copyright © 2014 universAAL Consortium. All Rights Reserved.