|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.xml.XMLStructureAdapter
hmi.graphics.collada.ColladaElement
public class ColladaElement
An extension of XMLStructureAdapter, used as base class for all COLLADA elements. It deals with a few attributes like id, sid, name, that are common to many Collada elements. It also deals with child nodes in the parse tree.
| Field Summary | |
|---|---|
private List<ColladaElement> |
childNodes
|
private Collada |
collada
|
static String |
COLLADANAMESPACE
|
private String |
id
|
private Map<String,ColladaElement> |
idMap
|
private Set<String> |
ids
|
private String |
name
|
private String |
sid
|
| Fields inherited from class hmi.xml.XMLStructureAdapter |
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING |
| Constructor Summary | |
|---|---|
ColladaElement()
Default constructor. |
|
ColladaElement(Collada collada)
Constructor that keeps track of the Collada environment |
|
| Method Summary | |
|---|---|
void |
addColladaNode(ColladaElement nod)
Adds some other ColladaElement as a child node. |
void |
addColladaNodes(List<? extends ColladaElement> nods)
Adds other ColladaElements as child nodes. |
Map<String,ColladaElement> |
addToIdMap(Map<String,ColladaElement> idMap)
Adds the id of this ColladaElement, and recursively, of the id's of all of its children, to the Id-To-ColladaElement Map provided as input parameter. |
StringBuilder |
appendAttributes(StringBuilder buf)
appends the id and sid XML attributes to buf. |
void |
decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodes the id and sid XML attributes. |
Collada |
getCollada()
returns the getCollada() attribute |
List<ColladaElement> |
getColladaNodes()
Returns (direct) child nodes. |
String |
getId()
Returns the id attribute, which could be null. |
Map<String,ColladaElement> |
getIdMap()
Returns the Map that maps Collada Id's to ColladaNodes. |
String |
getIdOrName()
returns the id, if non-null, else returns the name. |
Set<String> |
getIds()
Returns the Set containing the defined Collada Id's for this node. |
String |
getName()
Returns the name attribute, which could be null. |
String |
getNamespace()
Returns the (full, unabbreviated) namespace string for this XMLStructure Class |
List<ColladaElement> |
getRecursiveColladaNodes()
Returns all direct or indirect (i.e. recursive) child nodes. |
List<ColladaElement> |
getRecursiveColladaNodes(List<ColladaElement> nodeList)
Returns all direct or indirect child nodes, added to the node list provided as input parameter (Basically, this is an auxiliary method, to implement getRecursiveColladaNodes()) |
Resources |
getResources()
|
String |
getSid()
Returns the sid attribute, which could be null. |
void |
report(String reportType)
Calls reportNode for this ColladaElement, as well as all child nodes. |
void |
reportNode(String reportType)
Method that should be overwritten in classes that extend from ColladaElement: the intention is that (depending on the reportType parameter) they will "report" by printing to the Console. |
void |
setCollada(Collada collada)
Sets the getCollada() attribute |
void |
setId(String id)
Sets the id of the element |
void |
setName(String name)
Sets the name of the element |
void |
setSid(String sid)
Sets the sid of the element |
String |
urlToId(String url)
Assuming that url is a fragment of the form #id, urlToId returns the id part, i.e. without the sharp character. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String id
private String sid
private String name
private List<ColladaElement> childNodes
private Map<String,ColladaElement> idMap
private Set<String> ids
private Collada collada
public static final String COLLADANAMESPACE
| Constructor Detail |
|---|
public ColladaElement()
public ColladaElement(Collada collada)
| Method Detail |
|---|
public String getNamespace()
XMLStructureAdapter
getNamespace in class XMLStructureAdapterpublic String getId()
public String getSid()
public String getName()
public String getIdOrName()
public void setId(String id)
public void setSid(String sid)
public void setName(String name)
public Collada getCollada()
public void setCollada(Collada collada)
public void addColladaNode(ColladaElement nod)
public void addColladaNodes(List<? extends ColladaElement> nods)
public List<ColladaElement> getColladaNodes()
public List<ColladaElement> getRecursiveColladaNodes()
public List<ColladaElement> getRecursiveColladaNodes(List<ColladaElement> nodeList)
public void reportNode(String reportType)
public void report(String reportType)
public Map<String,ColladaElement> getIdMap()
public Map<String,ColladaElement> addToIdMap(Map<String,ColladaElement> idMap)
public Set<String> getIds()
public String urlToId(String url)
public Resources getResources()
public StringBuilder appendAttributes(StringBuilder buf)
appendAttributes in class XMLStructureAdapter
public void decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodeAttributes in class XMLStructureAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||