© 2006-2007 ETH Zurich

org.ximtec.igesture.core.composite
Class ConcurrencyConstraint

java.lang.Object
  extended by org.ximtec.igesture.core.DefaultPropertyChangeNotifier
      extended by org.ximtec.igesture.core.DefaultDataObject
          extended by org.ximtec.igesture.core.composite.DefaultConstraint
              extended by org.ximtec.igesture.core.composite.ConcurrencyConstraint
All Implemented Interfaces:
Serializable, Constraint, DataObject, PropertyChangeNotifier
Direct Known Subclasses:
ProximityConcurrencyConstraint

public class ConcurrencyConstraint
extends DefaultConstraint

This class represents a concurrency constraint, all gestures must be performed in parallel. This means all gestures must have an overlapping time interval in common.

Author:
Bjorn Puype, bpuype@gmail.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ximtec.igesture.core.composite.DefaultConstraint
DefaultConstraint.Config
 
Field Summary
 
Fields inherited from class org.ximtec.igesture.core.composite.DefaultConstraint
DEFAULT_CONFIGURATION, df, gestures, gestureTime, processingTime, PROPERTY_GESTURES, setterMapping
 
Fields inherited from class org.ximtec.igesture.core.DefaultDataObject
PROPERTY_ID
 
Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
propertyChangeSupport
 
Constructor Summary
ConcurrencyConstraint()
           
 
Method Summary
 Map<String,Calendar> determineTimeWindows()
          Determine the time window for each composing gesture.
 Set<String> generatePatterns(Map<String,String> charMapping)
          Generate all possible string patterns that represent the composite gesture.
 String toString()
           
 boolean validateConditions(List<Gesture<?>> gestures, IDeviceManager manager)
          Validate the constraint conditions.
 
Methods inherited from class org.ximtec.igesture.core.composite.DefaultConstraint
addGestureClass, addGestureClass, addGestureClass, addGestureClass, getDistinctGestureClasses, getGestureClasses, getGestureEntries, getGestureTime, getNumberOfGestures, getParameter, getParameters, getTimeStamp, removeAllGestureClasses, removeGestureClass, setGestureTime, setParameter
 
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
 

Constructor Detail

ConcurrencyConstraint

public ConcurrencyConstraint()
Method Detail

determineTimeWindows

public Map<String,Calendar> determineTimeWindows()
Description copied from interface: Constraint
Determine the time window for each composing gesture.

Specified by:
determineTimeWindows in interface Constraint
Specified by:
determineTimeWindows in class DefaultConstraint
Returns:
Mapping between the gesture name and the corresponding time window.

generatePatterns

public Set<String> generatePatterns(Map<String,String> charMapping)
Description copied from interface: Constraint
Generate all possible string patterns that represent the composite gesture.

Specified by:
generatePatterns in interface Constraint
Specified by:
generatePatterns in class DefaultConstraint
Parameters:
charMapping - Mapping between the gesture class name and the character representation

validateConditions

public boolean validateConditions(List<Gesture<?>> gestures,
                                  IDeviceManager manager)
Description copied from interface: Constraint
Validate the constraint conditions.

Specified by:
validateConditions in interface Constraint
Overrides:
validateConditions in class DefaultConstraint
Parameters:
gestures - Gestures that possibly compose the composite gesture.
manager - Device manager to check the associated users.
Returns:

toString

public String toString()
Specified by:
toString in interface Constraint
Overrides:
toString in class DefaultConstraint

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.