Changeset 12191 for trunk/greenstone3-extensions/gs3build/src/org/greenstone/gsdl3/gs3build/doctypes/METSDocument.java
- Timestamp:
- 2006-07-13T10:29:55+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/greenstone3-extensions/gs3build/src/org/greenstone/gsdl3/gs3build/doctypes/METSDocument.java
r12188 r12191 26 26 public static final String METS_DOCUMENT_TYPE = "METS"; 27 27 Document domDocument; 28 String original_location; 29 28 30 public METSDocument(DocumentID id) { 29 31 super(id); … … 50 52 domDocument = builder.parse(file); 51 53 52 int filePosition = file.getPath().indexOf("import/")+7; 53 parseFilePath = file.getPath().substring(0, filePosition); 54 //int filePosition = file.getPath().indexOf("import/")+7; 55 //parseFilePath = file.getPath().substring(0, filePosition); 56 parseFilePath = file.getParent(); // all refs should be relative to the current doc, or absolute 57 parseFilePath += File.separator; 58 this.original_location = parseFilePath; 54 59 // TODO: get all the types in the tree 55 60 … … 139 144 URL url = (URL) this.fileSet.getFile(0).getLocation(); 140 145 141 this.getSectionText("1");146 //this.getSectionText("1"); 142 147 143 148 if (url.getProtocol().equals("file")) { 144 metsDoc = new HTMLDoc(url,url.getPath()); 149 String path = url.getPath(); 150 File f = new File(path); 151 if (!f.isAbsolute() && this.original_location != null) { 152 path = this.original_location + path; 153 System.err.println("new path ="+path); 154 } 155 metsDoc = new HTMLDoc(url,path); 145 156 } else { 146 157 metsDoc = new HTMLDoc(url);
Note:
See TracChangeset
for help on using the changeset viewer.