Changeset 8491 for trunk/gsdl3/src
- Timestamp:
- 2004-11-09T11:24:27+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/CollectionManager.java
r8422 r8491 189 189 this.metadata = new CollectionMetadata(); 190 190 191 File buildDirectory = new File( GSFile.collectionBuildDir(this.collectionHome));191 File buildDirectory = new File(getBuildDirectory()); 192 192 if (!buildDirectory.exists()) { 193 193 buildDirectory.mkdir(); 194 194 } 195 196 File archiveDirectory = new File(GSFile.collectionArchiveDir(this.collectionHome)); 195 if (!buildDirectory.isDirectory()) { 196 System.err.println("Unable to open directory " + buildDirectory + " for writing"); 197 System.exit(1); 198 } 199 200 File archiveDirectory = new File(getArchiveDirectory()); 197 201 if (!archiveDirectory.exists()) { 198 202 archiveDirectory.mkdir(); 203 } 204 if (!archiveDirectory.isDirectory()) { 205 System.err.println("Unable to open directory " + archiveDirectory + " for writing"); 206 System.exit(1); 199 207 } 200 208 … … 315 323 // the name is a plugin element 316 324 317 if (name.equals("doctype")) { 318 System.out.println("document type"); 319 NamedNodeMap typeAttributes = children.item(c).getAttributes(); 320 Node typeAttribute = typeAttributes.getNamedItem("type"); 321 String documentType = null; 322 323 NodeList childNodes = children.item(c).getChildNodes(); 324 for (int n = 0; n < childNodes.getLength(); n ++) 325 { if (childNodes.item(n).getNodeType() == org.w3c.dom.Node.TEXT_NODE) 326 { String label = childNodes.item(n).getNodeValue(); 327 label.trim(); 328 if (label.length() > 0) { 329 documentType = label; 330 System.out.println("Document type " + documentType); 331 } 325 if (name.equals(GSXML.RECOGNISE_ELEM)) { 326 System.out.println("recognise elem"); 327 328 NodeList doc_types = ((Element)children.item(c)).getElementsByTagName(GSXML.DOC_TYPE_ELEM); 329 for(int i=0; i<doc_types.getLength(); i++) { 330 Element doc_type = (Element)doc_types.item(i); 331 String type = doc_type.getAttribute(GSXML.NAME_ATT); 332 System.err.println("adding recogniser, type "+type); 333 this.buildManager.getRecogniserManager().addRecogniser(type); 332 334 } 333 } 334 } 335 else if (name.equals(GSXML.SEARCH_ELEM)) { 335 } else if (name.equals(GSXML.SEARCH_ELEM)) { 336 336 // pick up attributes from the <search> tag now... 337 337 NamedNodeMap searchAttributes = children.item(c).getAttributes();
Note:
See TracChangeset
for help on using the changeset viewer.