Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 32 33 package com.knowgate.dataxslt; 34 35 import java.util.Vector ; 36 37 import org.w3c.dom.Element ; 38 import org.w3c.dom.Node ; 39 import org.w3c.dom.NodeList ; 40 41 import dom.DOMSubDocument; 42 43 48 public class Container extends DOMSubDocument { 49 50 52 public Container(Node oRefNode) { 53 super(oRefNode); 54 } 55 56 58 public String guid() { 59 Node oItem = oNode.getAttributes().getNamedItem("guid"); 60 61 if (null==oItem) 62 return null; 63 else 64 return oItem.getNodeValue(); 65 } 67 69 public String name() { 70 return getElement("name"); 71 } 73 75 public String template() { 76 return getElement("template"); 77 } 79 81 public String thumbnail() { 82 return getElement("thumbnail"); 83 } 85 87 public String parameters() { 88 return getElement("parameters"); 89 } 91 93 public Vector metablocks() { 94 Node oMetaBlksNode = null; 95 NodeList oNodeList; 96 Vector oLinkVctr; 97 98 for (oMetaBlksNode=oNode.getFirstChild(); oMetaBlksNode!=null; oMetaBlksNode=oMetaBlksNode.getNextSibling()) 99 if (Node.ELEMENT_NODE==oMetaBlksNode.getNodeType()) 100 if (oMetaBlksNode.getNodeName().equals("metablocks")) break; 101 102 oNodeList = ((Element ) oMetaBlksNode).getElementsByTagName("metablock"); 103 104 oLinkVctr = new Vector (oNodeList.getLength()); 105 106 for (int i=0; i<oNodeList.getLength(); i++) 107 oLinkVctr.add(new MetaBlock (oNodeList.item(i))); 108 109 return oLinkVctr; 110 } 112 }
| Popular Tags
|