hmi.bml.ext.bmlt
Class BMLTAudioFileBehaviour

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.bml.core.BMLElement
          extended by hmi.bml.core.Behaviour
              extended by hmi.bml.ext.bmlt.BMLTBehaviour
                  extended by hmi.bml.ext.bmlt.BMLTAudioFileBehaviour
All Implemented Interfaces:
XMLStructure

public class BMLTAudioFileBehaviour
extends BMLTBehaviour

This class represents audio behaviour. This is represented in BML by the <audiofile>-tag, in the http://hmi.ewi.utwente.nl/bmlt namespace.

Author:
dennisr

Field Summary
protected  String fileName
           
private static String XMLTAG
           
 
Fields inherited from class hmi.bml.ext.bmlt.BMLTBehaviour
BMLTNAMESPACE, parameters
 
Fields inherited from class hmi.bml.core.Behaviour
descBehaviour, timeOffset
 
Fields inherited from class hmi.bml.core.BMLElement
bmlId, id
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
BMLTAudioFileBehaviour()
           
BMLTAudioFileBehaviour(XMLTokenizer tokenizer)
           
 
Method Summary
 StringBuilder appendAttributeString(StringBuilder buf)
          Appends a String to buf that encodes the attributes for the XML encoding.
 StringBuilder appendContent(StringBuilder buf, XMLFormatting fmt)
          Appends a String to buf that encodes the contents for the XML encoding.
 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 getContent()
           
 float getFloatParameterValue(String name)
           
 String getStringParameterValue(String name)
           
 String getXMLTag()
          The XML Stag for XML encoding -- use this method to find out the run-time xml tag of an object
 boolean hasContent()
          returns whether the XML encoding should have an contents part, or should be an empty element tag.
 boolean specifiesParameter(String name)
          Does the behavior prescribe a value for parameter with name name?
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.bml.ext.bmlt.BMLTBehaviour
getNamespace, satisfiesConstraint
 
Methods inherited from class hmi.bml.core.Behaviour
addDefaultSyncPoints, addSyncPoint, addSyncPoints, constructConstraints, getStartSyncPoint, getSyncPoints, removeSyncPoints
 
Methods inherited from class hmi.bml.core.BMLElement
ensureDecodeProgress, registerElementsById
 
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, appendBooleans, appendCloseEmptyTag, appendCloseSTag, appendComment, 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, getOptionalAttribute, getOptionalAttribute, getOptionalBooleanAttribute, getOptionalDoubleAttribute, getOptionalFloatAttribute, getOptionalIntAttribute, getOptionalLongAttribute, getRequiredAttribute, getRequiredBooleanAttribute, getRequiredDoubleAttribute, getRequiredFloatAttribute, getRequiredIntAttribute, getRequiredLongAttribute, getTagLine, 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

fileName

protected String fileName

XMLTAG

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

BMLTAudioFileBehaviour

public BMLTAudioFileBehaviour()

BMLTAudioFileBehaviour

public BMLTAudioFileBehaviour(XMLTokenizer tokenizer)
                       throws IOException
Throws:
IOException
Method Detail

getStringParameterValue

public String getStringParameterValue(String name)
Overrides:
getStringParameterValue in class BMLTBehaviour

getFloatParameterValue

public float getFloatParameterValue(String name)
Overrides:
getFloatParameterValue in class BMLTBehaviour

specifiesParameter

public boolean specifiesParameter(String name)
Description copied from class: Behaviour
Does the behavior prescribe a value for parameter with name name?

Overrides:
specifiesParameter in class BMLTBehaviour

appendAttributeString

public StringBuilder appendAttributeString(StringBuilder buf)
Description copied from class: XMLStructureAdapter
Appends a String to buf that encodes the attributes for the XML encoding. When non empty, the attribute string should start with a space character. Hint: call the appendAttribute(StringBuilder buf, String attrName, String attrValue) for every relevant attribute; this takes care of the leading space as well as spaces in between the attributes) MUST BE OVERWRITTEN BY IMPLEMENTATIONS. (The default implementation appends nothing). The encoding should preferably not add newline characters.

Overrides:
appendAttributeString in class Behaviour

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 Behaviour

hasContent

public boolean hasContent()
Description copied from class: XMLStructureAdapter
returns whether the XML encoding should have an contents part, or should be an empty element tag. This method should be overwritten if necessary in classes that inherit from XMLStructureAdapter. The default implementation returns always true.

Overrides:
hasContent in class Behaviour

appendContent

public StringBuilder appendContent(StringBuilder buf,
                                   XMLFormatting fmt)
Description copied from class: XMLStructureAdapter
Appends a String to buf that encodes the contents for the XML encoding. MUST BE OVERWRITTEN BY IMPLEMENTATIONS. (The default implementation appends nothing). The encoding should start on a new line, using indentation equal to tab. There should be no newline after the encoding.

Overrides:
appendContent in class Behaviour

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 BMLTBehaviour
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 BMLElement

getContent

public String getContent()
Returns:
the content