hmi.graphics.collada
Class Include

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.graphics.collada.ColladaElement
          extended by hmi.graphics.collada.Include
All Implemented Interfaces:
XMLStructure

public class Include
extends ColladaElement

include is an XML element that (temporarily) switches to a different Reader, specified by means of a URL(s). The current tokenizer state is pushed on a stack, so settings made while processing the included XML has no effect on the context of the element. The EndOfDocument, expected at the end of the included XML, is silently removed, by setting the popOnEndOfDocument attribute to true. So, in general, the effect is as if the included contents is physically inserted within the current input, like a C style include file.

Author:
Job Zwiers

Field Summary
private static Logger logger
           
private  Resources resources
           
private  String url
           
private static String XMLTAG
           
 
Fields inherited from class hmi.graphics.collada.ColladaElement
COLLADANAMESPACE
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
Include()
           
Include(Resources resources)
           
 
Method Summary
 StringBuilder appendAttributeString(StringBuilder buf)
          appends a String of Group attributes to buf.
 boolean decodeAttribute(String attrName, String valCode, XMLTokenizer tokenizer)
          decodes a single attribute, as encoded by appendAttributeString()
 void decodeContent(XMLTokenizer tokenizer)
          decodes the content of the included URL
 String getXMLTag()
          returns the XML Stag for XML encoding
 void postProcess(XMLTokenizer tokenizer)
          executed after all the ETag has been read.
 void setFile(String resourceFileName)
          Sets the (Resources) file name for the include element
 void setURL(String url)
           
 boolean switchReader(XMLTokenizer tokenizer)
           
static String xmlTag()
          The XML Stag for XML encoding
 
Methods inherited from class hmi.graphics.collada.ColladaElement
addColladaNode, addColladaNodes, addToIdMap, appendAttributes, decodeAttributes, getCollada, getColladaNodes, getId, getIdMap, getIdOrName, getIds, getName, getNamespace, getRecursiveColladaNodes, getRecursiveColladaNodes, getResources, getSid, report, reportNode, setCollada, setId, setName, setSid, urlToId
 
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, 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, 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, hasContent, parseXMLElement, 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

url

private String url

resources

private Resources resources

logger

private static Logger logger

XMLTAG

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

Include

public Include()

Include

public Include(Resources resources)
Method Detail

setURL

public void setURL(String url)

setFile

public void setFile(String resourceFileName)
Sets the (Resources) file name for the include element


switchReader

public boolean switchReader(XMLTokenizer tokenizer)

postProcess

public void postProcess(XMLTokenizer tokenizer)
executed after all the ETag has been read.

Overrides:
postProcess in class XMLStructureAdapter

decodeContent

public void decodeContent(XMLTokenizer tokenizer)
                   throws IOException
decodes the content of the included URL

Overrides:
decodeContent in class XMLStructureAdapter
Throws:
IOException

appendAttributeString

public StringBuilder appendAttributeString(StringBuilder buf)
appends a String of Group attributes to buf. Attributes:

Overrides:
appendAttributeString in class XMLStructureAdapter

decodeAttribute

public boolean decodeAttribute(String attrName,
                               String valCode,
                               XMLTokenizer tokenizer)
decodes a single attribute, as encoded by appendAttributeString()

Overrides:
decodeAttribute in class XMLStructureAdapter

xmlTag

public static String xmlTag()
The XML Stag for XML encoding


getXMLTag

public String getXMLTag()
returns the XML Stag for XML encoding

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