Changeset 4537
- Timestamp:
- 2003-06-10T14:04:25+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSet.java
r4504 r4537 179 179 * @param name The name of this element as a <strong>String</strong>. 180 180 * @return An <strong>ElementWrapper</strong> around the newly created element or null if the element was not created. 181 * @deprecated All elements should be created with a language. 181 182 */ 182 183 public ElementWrapper addElement(String name) { … … 194 195 } 195 196 197 public ElementWrapper addElement(String name, String language) 198 { 199 Text text = document.createTextNode(name); 200 Element identifier = document.createElementNS("","Attribute"); 201 identifier.setAttribute("name","identifier"); 202 identifier.setAttribute("language", language); 203 identifier.appendChild(text); 204 Element element = document.createElementNS("","Element"); 205 element.setAttribute("name",name); 206 element.appendChild(identifier); 207 root.appendChild(element); 208 return new ElementWrapper(element); 209 } 210 196 211 /** Method to add a new metadata element to this metadata set, if and only if the element is not already present. 197 212 * @param others_element An <strong>Element</strong> we wish to add to this metadata set, that currently belongs to some other set.
Note:
See TracChangeset
for help on using the changeset viewer.