hmi.physics.assembler
Class IDSegmentAssembler

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.physics.assembler.IDSegmentAssembler
All Implemented Interfaces:
XMLStructure

public class IDSegmentAssembler
extends XMLStructureAdapter


Field Summary
 ArrayList<VJoint> endJoints
           
private  VJoint human
           
private  boolean isRoot
           
private  org.slf4j.Logger logger
           
 float[] pos
           
 IDSegment segment
           
 VJoint startJoint
           
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
IDSegmentAssembler(VJoint h, IDSegment seg)
          Create a IDSegment
 
Method Summary
 StringBuilder appendAttributeString(StringBuilder buf)
          Appends a String to buf that encodes the attributes for the XML encoding.
 void createFromGNode(GNode rootNode, String name)
           
 boolean decodeAttribute(String attrName, String attrValue)
          decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized.
 boolean decodeAttribute(String attrName, String attrValue, XMLTokenizer tokenizer)
          decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized.
private  GNode findStartNode(GNode rootNode)
           
 String getXMLTag()
          returns the XML tag that is used to encode this type of XMLStructure.
 boolean isRoot()
           
 void setRoot(boolean isRoot)
           
 
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, 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, decodeAttributes, decodeBoolean, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeContent, 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, xmlTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

startJoint

public VJoint startJoint

human

private VJoint human

segment

public IDSegment segment

endJoints

public ArrayList<VJoint> endJoints

isRoot

private boolean isRoot

pos

public float[] pos

logger

private org.slf4j.Logger logger
Constructor Detail

IDSegmentAssembler

public IDSegmentAssembler(VJoint h,
                          IDSegment seg)
Create a IDSegment

Parameters:
h - humanoid
seg - segment
Method Detail

findStartNode

private GNode findStartNode(GNode rootNode)

createFromGNode

public void createFromGNode(GNode rootNode,
                            String name)

decodeAttribute

public boolean decodeAttribute(String attrName,
                               String attrValue)
Description copied from class: XMLStructureAdapter
decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized. Might throw a RuntimeException when an attribute has been recognized, but is ill formatted. MUST BE OVERWRITTEN BY IMPLEMENTATIONS.

Overrides:
decodeAttribute in class XMLStructureAdapter

decodeAttribute

public boolean decodeAttribute(String attrName,
                               String attrValue,
                               XMLTokenizer tokenizer)
Description copied from class: XMLStructureAdapter
decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized. Might throw a RuntimeException when an attribute has been recognized, but is ill formatted. Moreover, an XMLTokenizer reference is available which can be queried for attributes, like getTokenLine() or getTokenCharPos(), which might be helpful to produce error messages referring to lines/positions within the XML document The default implementation simply calls decodeAttribute(attrName, attrValue) SHOUL BE OVERWRITTEN BY IMPLEMENTATIONS.

Overrides:
decodeAttribute in class XMLStructureAdapter

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 XMLStructureAdapter

getXMLTag

public String getXMLTag()
Description copied from class: XMLStructureAdapter
returns the XML tag that is used to encode this type of XMLStructure. The default returns null.

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

isRoot

public boolean isRoot()

setRoot

public void setRoot(boolean isRoot)