hmi.elckerlyc.animationengine.gesturebinding
Class MotionUnitSpec

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.elckerlyc.animationengine.gesturebinding.MotionUnitSpec
All Implemented Interfaces:
ParameterDefaultsHandler, XMLStructure

public class MotionUnitSpec
extends XMLStructureAdapter
implements ParameterDefaultsHandler


Field Summary
private  ArrayList<MotionUnitSpecConstraint> constraints
           
private static org.slf4j.Logger logger
           
 MotionUnit motionUnit
           
private  HashMap<String,MotionUnitParameterDefault> parameterdefault
           
private  HashMap<String,String> parametermap
           
private  Resources resources
           
private  String specnamespace
           
private  String type
           
private static String XMLTAG
           
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
MotionUnitSpec(Resources r)
           
 
Method Summary
 void addConstraint(MotionUnitSpecConstraint c)
           
 void addParameter(MotionUnitParameter p)
           
 void addParameterDefault(MotionUnitParameterDefault p)
           
 void decodeAttributes(HashMap<String,String> attrMap, XMLTokenizer tokenizer)
          decodes all attributes.
 void decodeContent(XMLTokenizer tokenizer)
          decodes the XML contents, i.e. the XML between the STag and ETag of the encoding.
 String getParameter(String src)
          Get motion unit parameter for BML parameter src
 Collection<MotionUnitParameterDefault> getParameterDefaults()
          Get motion unit parameter for BML parameter src
 Set<String> getParameters()
           
 String getSpecnamespace()
           
 String getType()
           
 String getXMLTag()
          The XML Stag for XML encoding -- use this method to find out the run-time xml tag of an object
 boolean satisfiesConstraints(Behaviour b)
           
static String xmlTag()
          The XML Stag for XML encoding -- use this static method when you want to see if a given String equals the xml tag for this class
 
Methods inherited from class hmi.xml.XMLStructureAdapter
appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttributes, appendAttributes, appendAttributeString, appendAttributeString, appendBooleans, appendCloseEmptyTag, appendCloseSTag, appendComment, appendContent, appendContent, appendDoubleElement, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendETag, appendETag, appendFloatArrayElement, appendFloatElement, appendFloats, appendIntArrayElement, appendIntElement, appendInts, appendLongElement, appendNewLine, appendNewLine, appendNewLine, appendOpenSTag, appendOptionalDoubleElement, appendOptionalFloatElement, appendOptionalIntElement, appendOptionalLongElement, appendSpaces, appendSpaces, appendSTag, appendSTag, appendSTag, appendStringArrayElement, appendStrings, appendSystemNewLine, appendTab, appendTextElement, appendXML, appendXML, appendXML, appendXML, appendXML, appendXMLStructure, appendXMLStructureList, appendXMLTextElementList, countTokens, countTokens, decodeAttribute, decodeAttribute, decodeBoolean, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeDouble, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeFloat, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeInt, decodeIntArray, decodeIntArray, decodeIntArray, decodeIntArray, decodeLong, decodeStringArray, decodeStringArray, decodeStringArray, decodeStringArray, decodeXMLStructureList, decodeXMLValueElement, getNamespace, getOptionalAttribute, getOptionalAttribute, getOptionalBooleanAttribute, getOptionalDoubleAttribute, getOptionalFloatAttribute, getOptionalIntAttribute, getOptionalLongAttribute, getRequiredAttribute, getRequiredBooleanAttribute, getRequiredDoubleAttribute, getRequiredFloatAttribute, getRequiredIntAttribute, getRequiredLongAttribute, getTagLine, hasContent, parseXMLElement, postProcess, preProcess, readXML, readXML, readXML, setConsoleAttributeEnabled, setDefaultRecoverMode, setRecoverMode, spaces, toString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, writeXML, writeXML, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger

motionUnit

public MotionUnit motionUnit

type

private String type

specnamespace

private String specnamespace

constraints

private ArrayList<MotionUnitSpecConstraint> constraints

parametermap

private HashMap<String,String> parametermap

parameterdefault

private HashMap<String,MotionUnitParameterDefault> parameterdefault

resources

private final Resources resources

XMLTAG

private static final String XMLTAG
See Also:
Constant Field Values
Constructor Detail

MotionUnitSpec

public MotionUnitSpec(Resources r)
Method Detail

satisfiesConstraints

public boolean satisfiesConstraints(Behaviour b)

getSpecnamespace

public String getSpecnamespace()
Returns:
the specnamespace

getType

public String getType()
Returns:
the type

getParameters

public Set<String> getParameters()

addConstraint

public void addConstraint(MotionUnitSpecConstraint c)

addParameter

public void addParameter(MotionUnitParameter p)

addParameterDefault

public void addParameterDefault(MotionUnitParameterDefault p)
Specified by:
addParameterDefault in interface ParameterDefaultsHandler

getParameter

public String getParameter(String src)
Get motion unit parameter for BML parameter src


getParameterDefaults

public Collection<MotionUnitParameterDefault> getParameterDefaults()
Get motion unit parameter for BML parameter src


decodeAttributes

public void decodeAttributes(HashMap<String,String> attrMap,
                             XMLTokenizer tokenizer)
Description copied from class: XMLStructureAdapter
decodes all attributes. The default implementation calls decodeAttribute for every attribute in turn. The decodeAttributes method can be reimplemented when attributes must be processed in some particular order.

Overrides:
decodeAttributes in class XMLStructureAdapter

decodeContent

public void decodeContent(XMLTokenizer tokenizer)
                   throws IOException
Description copied from class: XMLStructureAdapter
decodes the XML contents, i.e. the XML between the STag and ETag of the encoding. MUST BE OVERWRITTEN BY IMPLEMENTATIONS.

Overrides:
decodeContent in class XMLStructureAdapter
Throws:
IOException

xmlTag

public static String xmlTag()
The XML Stag for XML encoding -- use this static method when you want to see if a given String equals the xml tag for this class


getXMLTag

public String getXMLTag()
The XML Stag for XML encoding -- use this method to find out the run-time xml tag of an object

Specified by:
getXMLTag in interface XMLStructure
Overrides:
getXMLTag in class XMLStructureAdapter