Changeset 3867
- Timestamp:
- 2003-03-12T16:30:32+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSXML.java
r3850 r3867 75 75 public static final String PARAM_IGNORE_POS_ATT = "ignore"; 76 76 public static final String CLASSIFIER_CONTENT_ATT = "content"; 77 78 // document stuff 77 79 public static final String DOC_NODE_ELEM = "documentNode"; 80 public static final String DOC_NODE_CONTENT_ELEM = "documentNodeContent"; 81 public static final String DOC_NODE_STRUCTURE_ELEM = "documentNodeStructure"; 78 82 public static final String DOC_NODE_ID_ATT = "documentID"; 79 83 public static final String DOC_NODE_NAME_ATT = "documentNodeName"; … … 84 88 public static final String NODE_TYPE_LEAF = "leaf"; 85 89 90 // classifier stuff 91 public static final String CLASS_NODE_ELEM = "classifierNode"; 92 public static final String CLASS_NODE_ID_ATT = "classifierID"; 93 86 94 // parameter types 87 95 public static final String PARAM_TYPE_INTEGER = "integer"; … … 126 134 public static final String COMM_TYPE_SOAP_JAVA = "soap"; 127 135 136 137 /** takes a list of elements, and returns an array of strings 138 * of the values of attribute att_name */ 139 public static String [] getAttributeValuesFromList(Element list, 140 String att_name) { 141 142 NodeList children = list.getChildNodes(); 143 144 int num_nodes = children.getLength(); 145 String []ids = new String[num_nodes]; 146 for (int i=0; i<num_nodes; i++) { 147 Element e = (Element)children.item(i); 148 String id = e.getAttribute(att_name); 149 ids[i] = id; 150 } 151 152 return ids; 153 } 154 155 128 156 // takes a node with a resource elements inside it and extracts all the 129 157 // HASH oids - name att for resource … … 258 286 public static boolean addDocText(Document owner, Element doc, String text) { 259 287 260 Element content = owner.createElement( CONTENT_ELEM);288 Element content = owner.createElement(DOC_NODE_CONTENT_ELEM); 261 289 Text t = owner.createTextNode(text); 262 290 content.appendChild(t); … … 282 310 283 311 /** adds an empty MetadataList elem to a doc, and returns a ref to it*/ 284 public static Element addMetaList(Document owner, Element doc) {285 Element list = owner.createElement(METADATA_ELEM+LIST_MODIFIER);286 doc.appendChild(list);287 return list;288 }312 // public static Element addMetaList(Document owner, Element doc) { 313 // Element list = owner.createElement(METADATA_ELEM+LIST_MODIFIER); 314 // doc.appendChild(list); 315 // return list; 316 // } 289 317 /** adds a metadata elem to a list */ 290 318 public static boolean addMetadata(Document owner, Element list,
Note:
See TracChangeset
for help on using the changeset viewer.