|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.core.DefaultPropertyChangeNotifier
org.ximtec.igesture.core.DefaultDataObject
org.ximtec.igesture.core.composite.DefaultConstraint
public abstract class DefaultConstraint
| Nested Class Summary | |
|---|---|
static class |
DefaultConstraint.Config
|
| Field Summary | |
|---|---|
protected Map<String,String> |
DEFAULT_CONFIGURATION
|
protected SimpleDateFormat |
df
|
protected List<DefaultConstraintEntry> |
gestures
|
protected Calendar |
gestureTime
|
protected Calendar |
processingTime
|
static String |
PROPERTY_GESTURES
|
protected Map<String,String> |
setterMapping
|
| Fields inherited from class org.ximtec.igesture.core.DefaultDataObject |
|---|
PROPERTY_ID |
| Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier |
|---|
propertyChangeSupport |
| Constructor Summary | |
|---|---|
DefaultConstraint()
|
|
| Method Summary | |
|---|---|
void |
addGestureClass(String gestureClass)
Add a gesture class to the composite gesture. |
void |
addGestureClass(String gestureClass,
int user)
Add a gesture class to the composite gesture and specify the user that performs it. |
void |
addGestureClass(String gestureClass,
int user,
String deviceType,
Set<String> devices)
Add a gesture class to the composite gesture and specify the user and the device type used to perform it. |
void |
addGestureClass(String gestureClass,
String deviceType,
Set<String> devices)
Add a gesture class to the composite gesture and specify the device type used to perform it. |
abstract Map<String,Calendar> |
determineTimeWindows()
Determine the time window for each composing gesture. |
abstract Set<String> |
generatePatterns(Map<String,String> charMapping)
Generate all possible string patterns that represent the composite gesture. |
Set<String> |
getDistinctGestureClasses()
Get the disctinct gesture classes that compose this composite gesture |
List<String> |
getGestureClasses()
Get all the names of the gesture classes that compose this composite gesture |
List<DefaultConstraintEntry> |
getGestureEntries()
Get all gesture entries. |
Calendar |
getGestureTime()
|
int |
getNumberOfGestures()
Get the number of composing gestures |
String |
getParameter(String property)
|
Map<String,String> |
getParameters()
Returns an array of containing the constraint parameters. |
protected long |
getTimeStamp(Gesture<?> gesture,
boolean start)
Get the start or end timestamp of a gesture. |
void |
removeAllGestureClasses()
Remove all gesture classes from the composite. |
void |
removeGestureClass(DefaultConstraintEntry entry)
Removes the specified gesture class from the composite. |
void |
setGestureTime(String time)
|
void |
setParameter(String property,
String value)
|
String |
toString()
|
boolean |
validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
Validate the constraint conditions. |
| Methods inherited from class org.ximtec.igesture.core.DefaultDataObject |
|---|
accept, getId, setId |
| Methods inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected Map<String,String> DEFAULT_CONFIGURATION
protected Map<String,String> setterMapping
protected List<DefaultConstraintEntry> gestures
public static final String PROPERTY_GESTURES
protected SimpleDateFormat df
protected Calendar gestureTime
protected Calendar processingTime
| Constructor Detail |
|---|
public DefaultConstraint()
| Method Detail |
|---|
public void addGestureClass(String gestureClass)
Constraint
addGestureClass in interface Constraint
public void addGestureClass(String gestureClass,
int user)
Constraint
addGestureClass in interface Constraint
public void addGestureClass(String gestureClass,
String deviceType,
Set<String> devices)
Constraint
addGestureClass in interface Constraint
public void addGestureClass(String gestureClass,
int user,
String deviceType,
Set<String> devices)
Constraint
addGestureClass in interface Constraintpublic List<String> getGestureClasses()
Constraint
getGestureClasses in interface Constraintpublic Set<String> getDistinctGestureClasses()
Constraint
getDistinctGestureClasses in interface Constraintpublic int getNumberOfGestures()
Constraint
getNumberOfGestures in interface Constraint
public void setGestureTime(String time)
throws ParseException
ParseExceptionpublic Calendar getGestureTime()
public abstract Set<String> generatePatterns(Map<String,String> charMapping)
Constraint
generatePatterns in interface ConstraintcharMapping - Mapping between the gesture class name and the character representation
public boolean validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
Constraint
validateConditions in interface Constraintgestures - Gestures that possibly compose the composite gesture.manager - Device manager to check the associated users.
public abstract Map<String,Calendar> determineTimeWindows()
Constraint
determineTimeWindows in interface Constraint
protected long getTimeStamp(Gesture<?> gesture,
boolean start)
gesture - the gesture from which to get the timestampstart - true to get the start timestamp, false to get the end timestamp
public String toString()
toString in interface ConstrainttoString in class Objectpublic Map<String,String> getParameters()
Constraint
getParameters in interface Constraintpublic String getParameter(String property)
getParameter in interface Constraint
public void setParameter(String property,
String value)
setParameter in interface Constraintpublic void removeAllGestureClasses()
Constraint
removeAllGestureClasses in interface Constraintpublic void removeGestureClass(DefaultConstraintEntry entry)
Constraint
removeGestureClass in interface Constraintpublic List<DefaultConstraintEntry> getGestureEntries()
Constraint
getGestureEntries in interface Constraint
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||