Changeset 13819
- Timestamp:
- 2007-01-26T12:26:34+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/Collection.java
r13748 r13819 72 72 /** The document around which this collection class is based. */ 73 73 private Document document; 74 /** The file the collection is in (the file may not actually exist, such in the case of a legacy collection)! */ 75 private File file; 74 75 /** The file the collection is in (the file may not actually exist, such in the case of a legacy collection)! */ 76 private File file; 76 77 /** The name of the argument element. */ 77 78 static final private String ARGUMENT = "Argument"; … … 87 88 /** The name of the imported attribute. */ 88 89 static final private String IMPORTED = "imported"; 90 /** The name of the imported attribute. */ 91 static final private String SKIM_FILE = "skimfile"; 92 89 93 90 94 /** Constructor. */ … … 92 96 this.file = collection_xml; 93 97 // Try to load this collections details. 94 document = XMLTools.parseXMLFile(collection_xml);98 document = XMLTools.parseXMLFile(collection_xml); 95 99 // If that fails load the default settings for a collection. 96 100 if(document == null) { … … 253 257 return getTitle(); 254 258 } 259 260 public boolean toSkimFile(){ 261 Element document_element = document.getDocumentElement(); 262 NodeList arguments = document_element.getElementsByTagName(ARGUMENT); 263 for(int i = 0; i < arguments.getLength(); i++) { 264 Element argument_element = (Element) arguments.item(i); 265 if(argument_element.getAttribute(StaticStrings.NAME_ATTRIBUTE).equalsIgnoreCase(SKIM_FILE)) { 266 String skimfile = XMLTools.getValue(argument_element); 267 if (skimfile !=null && skimfile.trim().toLowerCase().equals("false")){ 268 return false; 269 } 270 } 271 272 } 273 274 return true; 275 } 276 255 277 256 278 /** Get the value of a collection argument. */ … … 309 331 return result; 310 332 } 333 334 335 311 336 312 337 /** Method to retrieve the current build options associated with this Collection. */
Note:
See TracChangeset
for help on using the changeset viewer.