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 org.w3c.dom.Element ; 36 import org.w3c.dom.Node ; 37 38 import com.knowgate.misc.Gadgets; 39 40 import dom.DOMSubDocument; 41 42 51 public class MetaBlock extends DOMSubDocument { 52 53 56 public MetaBlock(Node oRefNode) { 57 super(oRefNode); 58 } 59 60 62 public String id() { 63 Node oItem = oNode.getAttributes().getNamedItem("id"); 64 65 if (null==oItem) 66 return null; 67 else 68 return oItem.getNodeValue(); 69 } 71 73 78 public int maxoccurs() throws NumberFormatException { 79 80 String sMaxOccurs = getElement("maxoccurs"); 81 82 if (null==sMaxOccurs) 83 return -1; 84 else 85 return Integer.parseInt(sMaxOccurs.trim()); 86 } 88 90 public String name() { 91 return getElement("name"); 92 } 94 96 public String template() { 97 return getElement("template"); 98 } 100 102 public String thumbnail() { 103 return getElement("thumbnail"); 104 } 106 108 111 public String [] objects() { 112 String sObjs = getElement("objects"); 113 114 if (null==sObjs) 115 return null; 116 else 117 return Gadgets.split(sObjs,','); 118 } 120 122 }
| Popular Tags
|