Changeset 6287 for trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build
- Timestamp:
- 2003-12-17T13:14:49+13:00 (21 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/FileIdentifierFactory.java
r5800 r6287 7 7 import org.greenstone.gsdl3.gs3build.doctypes.DocumentID; 8 8 9 public class FileIdentifierFactory 9 public class FileIdentifierFactory extends AbstractIdentifierFactory 10 10 { 11 public static Object makeFileIdentifier(DocumentID document) 12 { 13 return null; 14 } 11 public static final String FILE_IDENTIFIER_PRELUDE = "FILE"; 12 13 public FileIdentifierFactory() 14 { super(FILE_IDENTIFIER_PRELUDE); 15 } 15 16 } -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSDescriptive.java
r5945 r6287 123 123 } 124 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 {METSNamespace localNamespace = (METSNamespace) namespaceIterator.next();152 153 154 155 {accumulatedValues.addAll(localList);156 157 158 159 160 161 162 163 164 165 125 /** 126 * Fetch a <code>List</code> of the values matching the given label in 127 * the requisite namespace. 128 * 129 * @param <code>String</code> namespace 130 * @param <code>String</code> label of metadata to match 131 * 132 * @return <code>List</code> the corresponding values found. 133 */ 134 public List getMetadata(String namespace, String label) 135 { 136 // Simple case - no metadata 137 if (!this.map.containsKey(namespace)) 138 { return null; 139 } 140 141 // if there's just one instance of the requisite namespace, 142 // then again it is a simple case 143 if (this.map.getAll(namespace).size() == 1) 144 { return this.getNamespace(namespace).getMetadata(label); 145 } 146 147 // otherwise, step through and accumulate 148 List accumulatedValues = new ArrayList(); 149 Iterator namespaceIterator = this.map.getAll(namespace).iterator(); 150 while (namespaceIterator.hasNext()) 151 { METSNamespace localNamespace = (METSNamespace) namespaceIterator.next(); 152 153 List localList = localNamespace.getMetadata(label); 154 if (localList != null && localList.size() > 0) 155 { accumulatedValues.addAll(localList); 156 } 157 } 158 159 // if the result of the accumulation is empty, return a null item 160 if (accumulatedValues.size() == 0) 161 { return null; 162 } 163 164 return accumulatedValues; 165 } 166 166 167 167 /** -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSDescriptiveSet.java
r5945 r6287 29 29 { Map children; 30 30 Map childrenById; 31 DescriptiveIdentifierFactory identifierFactory; 32 33 class DescriptiveIdentifierFactory extends AbstractIdentifierFactory 34 { public DescriptiveIdentifierFactory() 35 { super("DM"); 36 } 37 } 31 38 32 39 public METSDescriptiveSet() … … 34 41 this.childrenById = new HashMap(); 35 42 36 METSDescriptive descriptive = new METSDescriptive("DM1", "default"); 37 this.addDescriptive(descriptive); 38 } 39 43 this.identifierFactory = new DescriptiveIdentifierFactory(); 44 45 this.createDescriptive("default"); 46 } 47 48 /** 49 * Create a new descriptive child, adding it automatically to this descriptive set. 50 * 51 * @param <code>String</code> a name to describe the descriptive set. 52 */ 53 public METSDescriptive createDescriptive(String name) 54 { METSDescriptive descriptive = new METSDescriptive(this.identifierFactory.getNextIdentifier(), name); 55 56 this.children.put(name, descriptive); 57 this.childrenById.put(descriptive.getID(), descriptive); 58 return descriptive; 59 } 60 61 /** 62 * Add a descriptive item to this set. 63 * 64 * @param <code>METSDescriptive</code> the descriptive set 65 */ 40 66 public void addDescriptive(METSDescriptive metadata) 41 { this.children.put(metadata.getName(), metadata); 67 { // insert the item into both maps... 68 this.children.put(metadata.getName(), metadata); 42 69 this.childrenById.put(metadata.getID(), metadata); 43 } 44 70 71 // when a descriptive block is added, check that it hasn't been used before... 72 this.identifierFactory.noteIdentifier(metadata.getID()); 73 } 74 75 /** 76 * Get a descriptive item by its name 77 */ 45 78 public METSDescriptive getDescriptive(String name) 46 79 { return (METSDescriptive) this.children.get(name); 47 80 } 48 81 82 /** 83 * Get a descriptive item by its identifier 84 */ 49 85 public METSDescriptive getDescriptiveById(String id) 50 86 { return (METSDescriptive) this.childrenById.get(id); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSDivision.java
r6017 r6287 7 7 import java.util.ArrayList; 8 8 import java.util.Map; 9 import java.util. HashMap;9 import java.util.LinkedHashMap; 10 10 11 11 import java.sql.SQLException; … … 17 17 import org.greenstone.gsdl3.gs3build.database.*; 18 18 19 20 public class METSDivision 19 public class METSDivision extends AbstractStructure 21 20 { 22 String ID; // the unique identifier for this division (unique within the23 // document, not necessarily unique within the collection).24 21 String order; // see the METS documentation for the meaning of the different 25 22 String orderLabel; // label types. … … 29 26 List adminRefs; 30 27 List fileRefs; 31 Map children;32 28 33 public static final String STRUCTURE_PARENT = "Structure"; 34 public static final String DIVISION_PARENT = "Division"; 29 public static final String DIVISION_TYPE = "Division"; 35 30 36 31 public METSDivision(String ID, String order, String orderLabel, String userLabel, String type) 37 { this.ID = ID; 32 { super(ID); 33 38 34 this.order = order; 39 35 this.orderLabel = orderLabel; … … 42 38 this.fileRefs = new ArrayList(); 43 39 this.metadataRefs = new ArrayList(); 44 this.children = new HashMap(); 45 } 46 47 public String getID() 48 { return this.ID; 40 } 41 42 public String getStructureType() 43 { return DIVISION_TYPE; 44 } 45 46 public String getLabel() 47 { return this.orderLabel; 49 48 } 50 49 … … 141 140 * Add a new file reference to the structure 142 141 * 143 * @param <code>METSFile Ref</code> the file to be referenced.142 * @param <code>METSFileID</code> the file to be referenced. 144 143 */ 145 144 public void addFileReference(METSFileID fileRef) 145 { this.addFileReference(fileRef.toString()); 146 } 147 148 public void addFileReference(String fileRef) 146 149 { this.fileRefs.add(fileRef); 147 150 } … … 156 159 157 160 /** 158 * Add a child division, or sub-division to the document. For example, 159 * sections within a chapter. 160 * 161 * @param <code>METSDivision</code> the child division. 162 */ 163 public void addSubDivision(METSDivision child) 164 { this.children.put(child.getID(), child); 165 } 166 167 /** 168 * Add a child division to a descendent of this division. 169 * 170 * @param <code>String</code> the path to the division into which the 171 * subdivision will be added. 172 * @param <code>METSDivision</code> the division to be added 173 */ 174 public void addSubDivision(String divisionID, METSDivision division) 175 { String topDivision = METSDivision.getTopDivisionName(divisionID); 176 177 METSDivision child = (METSDivision) this.children.get(topDivision); 161 * Get all the metadata references 162 * 163 * @return <code>List</code> containing all the references 164 */ 165 public List getMetadataReferences() 166 { return this.metadataRefs; 167 } 168 169 /** 170 * Get all the default (first) metadata reference... 171 * 172 * @return <code>List</code> containing all the references 173 */ 174 //TODO: check for this first *open* metadata item... 175 public String getDefaultMetadataReference() 176 { if (this.metadataRefs.size() == 0) { 177 return null; 178 } 179 return this.metadataRefs.get(0).toString(); 180 } 181 182 /** 183 * Get all the default (first) first filegroup reference... 184 * 185 * @return <code>List</code> containing all the references 186 */ 187 public String getDefaultFileReference() 188 { if (this.fileRefs.size() == 0) { 189 return null; 190 } 191 return this.fileRefs.get(0).toString(); 192 } 193 194 /** 195 * Get a child or descendant division 196 * 197 * @param <code>String</code> the path to the child division 198 * @return <code>METSDivision</code> the division found. 199 */ 200 public METSDivision getDivision(String divisionLabel) 201 { // if the division ID equals this, then process it 202 if (divisionLabel.equals(this.orderLabel)) { 203 return this; 204 } 205 206 // if we just shouldn't be here, then error... 207 if (!divisionLabel.startsWith(this.orderLabel + ".")) { 208 return null; 209 } 210 211 // get the next division in the division path... 212 String subdivisionPath = divisionLabel.substring(this.orderLabel.length() + 1); 213 String nextDivision = getTopDivisionName(subdivisionPath); 214 String nextLabel; 215 216 // first try the current division name with an appended '.' and the next child id... 217 METSDivision child = (METSDivision) this.children.get(this.orderLabel + "." + nextDivision); 178 218 if (child == null) 179 { return;180 }181 182 String subDivisionID = METSDivision.getSubDivisionName(divisionID);183 if (subDivisionID == null)184 { child.addSubDivision(division);185 }186 else187 { child.addSubDivision(subDivisionID, division); 188 } 189 }190 191 public METSDivision getDivision(String divisionID)192 { String topDivision = METSDivision.getTopDivisionName(divisionID);193 194 METSDivision child = (METSDivision) this.children.get(topDivision);195 if (child == null) 196 { return null;197 198 199 String subDivision = METSDivision.getSubDivisionName(divisionID);200 if (subDivision != null)201 { child = child.getDivision(subDivision);202 }203 204 return child;205 }206 219 { // if that didn't work, try the next division on its own 220 child = (METSDivision) this.children.get(nextDivision); 221 222 // if neither worked, then abort... 223 if (child == null) { 224 return null; 225 } 226 else { 227 // set the next identifier 228 nextLabel = METSDivision.getSubDivisionName(divisionLabel); 229 } 230 } 231 else { 232 // set the next identifier... 233 nextLabel = divisionLabel; 234 } 235 236 return child.getDivision(nextLabel); 237 } 238 239 /** 240 * A convenience method for splitting a division name - this gives the name 241 * without the leading division label... To be used when division identifiers 242 * are given as '.' separated paths and division names do not contain the 243 * full path of their parents. 244 * 245 * @return <code>String</code> 246 */ 207 247 public static String getSubDivisionName(String divisionName) 208 248 { int at = divisionName.indexOf('.'); … … 216 256 } 217 257 258 public static String getParentName(String divisionName) 259 { int at = divisionName.lastIndexOf('.'); 260 261 if (at >= 0) { 262 return divisionName.substring(0, at); 263 } 264 return ""; 265 } 266 218 267 public static String getTopDivisionName(String divisionName) 219 268 { int at = divisionName.indexOf('.'); … … 232 281 * @param <code>PrintWriter</code> the destination of the output 233 282 */ 234 public voidwrite(PrintWriter writer)283 public boolean write(PrintWriter writer) 235 284 { String tag = XMLTools.getOpenTag("mets", "div"); 236 285 tag = XMLTools.addAttribute(tag, "ID", this.ID.toString()); … … 267 316 writer.println(tag); 268 317 } 269 318 319 // write out any children in turn 320 Iterator groups = this.children.values().iterator(); 321 322 while (groups.hasNext()) 323 { METSDivision group = (METSDivision) groups.next(); 324 325 if (!group.write(writer)) { 326 return false; 327 } 328 } 329 270 330 // close the div element 271 331 writer.println(XMLTools.getCloseTag("mets", "div")); 272 } 273 332 333 return true; 334 } 335 336 /** 337 * A convenience method for writing a <code>List</code> as a space-separated <code>String</code>. 338 */ 274 339 private String writeList(List list) 275 340 { StringBuffer listString = new StringBuffer(); … … 294 359 select.addField("DivisionRef"); 295 360 GS3SQLWhereItem whereItem = new GS3SQLWhereItem("ParentRef", "=", Integer.toString(parentRef), GS3SQLField.INTEGER_TYPE); 296 GS3SQLWhereItem parentItem = new GS3SQLWhereItem("ParentType", "=", parentIsStructure ? "Structure" : "Division");361 GS3SQLWhereItem parentItem = new GS3SQLWhereItem("ParentType", "=", parentIsStructure ? METSStructure.STRUCTURE_TYPE : METSDivision.DIVISION_TYPE); 297 362 GS3SQLWhereItem item = new GS3SQLWhereItem("SectionID", "=", this.ID.toString()); 298 GS3SQLWhere where = new GS3SQLWhere(whereItem); 363 GS3SQLWhere where = new GS3SQLWhere(whereItem); 299 364 where.add(parentItem); 300 365 where.add(item); … … 316 381 insert.addValue("SectionID", this.ID.toString()); 317 382 insert.addValue("ParentRef", Integer.toString(parentRef)); 318 insert.addValue("ParentType", parentIsStructure == true ? STRUCTURE_PARENT : DIVISION_PARENT);383 insert.addValue("ParentType", parentIsStructure == true ? METSStructure.STRUCTURE_TYPE : METSDivision.DIVISION_TYPE); 319 384 320 385 action = insert; … … 332 397 } 333 398 catch (SQLException sql) { 334 System.err.println(sql );399 System.err.println(sql + " " + select.toString()); 335 400 return false; 336 401 } … … 373 438 } 374 439 catch (SQLException sql) { 375 System.err.println(sql );440 System.err.println(sql + " " + select.toString()); 376 441 } 377 442 } … … 435 500 METSLocation metsLocation = null; 436 501 502 GS3SQLSelect select = null; 437 503 try { 438 504 // read the basic information … … 449 515 int divisionRef = resultSet.getInt("DivisionRef"); 450 516 451 GS3SQLSelectselect = new GS3SQLSelect("divisions");517 select = new GS3SQLSelect("divisions"); 452 518 select.addField("*"); 453 519 GS3SQLWhereItem whereItem = new GS3SQLWhereItem("ParentRef", "=", Integer.toString(divisionRef), 454 520 GS3SQLField.INTEGER_TYPE); 455 521 GS3SQLWhere where = new GS3SQLWhere(whereItem); 456 whereItem = new GS3SQLWhereItem("ParentType", "=", DIVISION_PARENT);522 whereItem = new GS3SQLWhereItem("ParentType", "=", METSDivision.DIVISION_TYPE); 457 523 where.add(whereItem); 458 524 select.setWhere(where); … … 466 532 do { 467 533 METSDivision childDivision = METSDivision.readSQL(connection, childSet); 468 division.add SubDivision(childDivision);534 division.addDivision(childDivision); 469 535 } 470 536 while (childSet.next()); … … 508 574 } 509 575 catch (SQLException sqlEx) 510 { System.out.println(sqlEx );576 { System.out.println(sqlEx + " " +select.toString()); 511 577 } 512 578 return null; -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSFileGroup.java
r5945 r6287 115 115 file.setGroup(this); 116 116 if (!file.getID().isDefined()) 117 { file.setID(new METSFileID(this.id + Integer.toString(this.children.size())));117 { file.setID(new METSFileID(this.id + "." + Integer.toString(this.children.size()))); 118 118 } 119 119 } … … 170 170 * @return <code>String</code> the name of this group 171 171 */ 172 public String get Name()172 public String getId() 173 173 { return this.id; 174 174 } -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSFileSet.java
r5945 r6287 28 28 { Map fileGroups; 29 29 String reference; 30 FileIdentifierFactory identifierFactory; 31 FileGroupIdentifierFactory groupIdentifierFactory; 32 33 class FileGroupIdentifierFactory extends AbstractIdentifierFactory 34 { public static final String FILEGROUP_PRELUDE = "FG"; 35 36 public FileGroupIdentifierFactory() 37 { super("FILEGROUP_PRELUDE"); 38 } 39 } 30 40 31 41 public METSFileSet() … … 33 43 this.fileGroups.put("default", new METSFileGroup("default")); 34 44 this.reference = null; 45 this.identifierFactory = new FileIdentifierFactory(); 46 this.groupIdentifierFactory = new FileGroupIdentifierFactory(); 47 } 48 49 /** 50 * Get a new FileGroup to lie within this fileset. The group is not initialised with 51 * a parent, etc. - all that is done is the allocation of a unique group identifier. 52 * 53 * @return <code>METSFileGroup</code> the new group. 54 */ 55 public METSFileGroup createGroup() 56 { METSFileGroup group = new METSFileGroup(this.groupIdentifierFactory.getNextIdentifier()); 57 return group; 58 } 59 60 public METSFile createFile(METSFilePos filePos, String type) 61 { METSFile file = new METSFile(new METSFileID(this.identifierFactory.getNextIdentifier()), filePos, type); 62 return file; 35 63 } 36 64 … … 80 108 if (destGroup == null) 81 109 { destGroup = new METSFileGroup(toGroup); 82 this.fileGroups.put(destGroup.get Name(), destGroup);110 this.fileGroups.put(destGroup.getId(), destGroup); 83 111 } 84 112 … … 97 125 */ 98 126 public void addGroup(METSFileGroup group) 99 { this.fileGroups.put(group.get Name(), group);127 { this.fileGroups.put(group.getId(), group); 100 128 } 101 129 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSStructure.java
r6017 r6287 6 6 import java.util.ArrayList; 7 7 import java.util.Map; 8 import java.util. HashMap;8 import java.util.LinkedHashMap; 9 9 import java.util.Iterator; 10 10 … … 18 18 import org.greenstone.gsdl3.gs3build.database.*; 19 19 20 public class METSStructure 20 public class METSStructure extends AbstractStructure 21 21 { 22 Map children;23 String ID;24 22 String label; 25 23 String type; 24 25 public static final String STRUCTURE_TYPE = "Structure"; 26 26 27 27 public METSStructure(String id, String label, String type) 28 { this.children = new HashMap();29 this.ID = id; 28 { super(id); 29 30 30 this.label = label; 31 31 this.type = type; 32 32 } 33 34 /** 35 * Show what sort of <code>AbstractStructure</code> this structure is... 36 * 37 * @return <code>String The identifying string for a <code>METSStructure</code> type. 38 */ 39 public String getStructureType() 40 { return STRUCTURE_TYPE; 41 } 33 42 34 /**35 * Get the identifer of this structure36 *37 * @param <code>String</code> the identifier.38 */39 public String getID()40 { return this.ID;41 }42 43 43 /** 44 44 * Find all the divisions that match a given list of file group … … 59 59 60 60 /** 61 * Add a division directly underneath this structure.62 *63 * @param <code>METSDivision</code> the division to add.64 */65 public void addDivision(METSDivision division)66 { this.children.put(division.getID(), division);67 }68 69 /**70 61 * Add a division further into this structure. 71 62 * 72 * @param <code>String</code> the identifier for the division63 * @param <code>String</code> the identifier label for the division 73 64 * within which the division is to be added. 74 65 * @param <code>METSDivision</code> the division to add. 75 66 */ 76 public void addSubDivision(String division ID, METSDivision division)77 { String topDivision = METSDivision.getTopDivisionName(division ID);67 public void addSubDivision(String divisionLabel, METSDivision division) 68 { String topDivision = METSDivision.getTopDivisionName(divisionLabel); 78 69 79 70 METSDivision child = (METSDivision) this.children.get(topDivision); … … 82 73 } 83 74 84 String subDivisionID = METSDivision.getSubDivisionName(divisionID); 85 if (subDivisionID == null) 86 { child.addSubDivision(division); 87 } 88 else 89 { child.addSubDivision(subDivisionID, division); 75 child = child.getDivision(divisionLabel); 76 77 if (child != null) { 78 child.addDivision(division); 90 79 } 91 80 } … … 98 87 * <code>null</code> if it is not found. 99 88 */ 100 public METSDivision getDivision(String divisionID) 101 { String topDivision = METSDivision.getTopDivisionName(divisionID); 102 89 public METSDivision getDivision(String divisionLabel) 90 { String topDivision = METSDivision.getTopDivisionName(divisionLabel); 91 92 if (!topDivision.equals("All")) 93 System.out.println("Top division is " + topDivision); 103 94 METSDivision child = (METSDivision) this.children.get(topDivision); 104 95 if (child == null) 105 { return null; 106 } 107 108 String subDivision = METSDivision.getSubDivisionName(divisionID); 109 if (subDivision != null) 110 { child = child.getDivision(subDivision); 111 } 96 { System.out.println("No child found"); 97 Iterator groups = this.children.keySet().iterator(); 98 while (groups.hasNext()) { 99 System.out.println(groups.next().toString()); 100 } 101 return null; 102 } 103 104 105 child = child.getDivision(divisionLabel); 112 106 113 107 return child; 114 108 } 115 109 110 /** 111 * Write this structure in XML(METS) format to a <code>PrintWriter</code> 112 */ 116 113 public void write(PrintWriter writer) 117 114 { Iterator groups = this.children.values().iterator(); … … 216 213 } 217 214 218 215 /** 216 * Read a METSStructure from a database - on entry, the current item in the 217 * <code>ResultSet</code> holds the row in the database with the structure's 218 * data. 219 * 220 * @param <code>DocumentInterface</code> the document which owns the structure 221 * @param <code>GS3SQLConnection</code> the database connection itself, to load 222 * child objects through, etc. 223 * @param <code>ResultSet</code> pointing to the current row in the database. 224 */ 219 225 public static METSStructure readSQL(DocumentInterface document, GS3SQLConnection connection, 220 226 ResultSet resultSet) 221 227 { 228 GS3SQLSelect select = null; 229 222 230 try { 223 231 String ID = resultSet.getString("StructureID"); … … 232 240 233 241 // query the database for matching division for this structure block 234 GS3SQLSelectselect = new GS3SQLSelect("divisions");242 select = new GS3SQLSelect("divisions"); 235 243 select.addField("*"); 236 244 GS3SQLWhereItem whereItem = new GS3SQLWhereItem("ParentRef", "=", Integer.toString(structureRef), 237 245 GS3SQLField.INTEGER_TYPE); 238 246 GS3SQLWhere where = new GS3SQLWhere(whereItem); 239 whereItem = new GS3SQLWhereItem("ParentType", "=", METS Division.STRUCTURE_PARENT);247 whereItem = new GS3SQLWhereItem("ParentType", "=", METSStructure.STRUCTURE_TYPE); 240 248 where.add(whereItem); 241 249 select.setWhere(where); … … 245 253 // parse through the divisions 246 254 ResultSet divisionSet = connection.getResultSet(); 247 divisionSet.first(); 248 do { 249 METSDivision division = METSDivision.readSQL(connection, divisionSet); 250 if (division != null) { 251 structure.addDivision(division); 255 if (divisionSet != null && divisionSet.first()) { 256 do { 257 METSDivision division = METSDivision.readSQL(connection, divisionSet); 258 if (division != null) { 259 structure.addDivision(division); 260 } 252 261 } 253 } 254 while (divisionSet.next());262 while (divisionSet.next()); 263 } 255 264 256 265 return structure; 257 266 } 258 267 catch (SQLException sqlEx) 259 { System.out.println(sqlEx );268 { System.out.println(sqlEx + " " + select.toString()); 260 269 System.exit(1); 261 270 } … … 263 272 } 264 273 } 274 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSStructureSet.java
r5945 r6287 19 19 public class METSStructureSet 20 20 { Map children; 21 22 public static final String GSDL3_SECTION_STRUCTURE = "Section"; 21 23 22 24 public METSStructureSet() … … 58 60 * @param <code>METSDivision</code> the division to be added. 59 61 */ 60 public void addDivision(String structure Name, METSDivision division)61 { METSStructure structure = (METSStructure) this.children.get(structure Name);62 public void addDivision(String structureId, METSDivision division) 63 { METSStructure structure = (METSStructure) this.children.get(structureId); 62 64 63 65 if (structure != null) … … 74 76 * @param <code>METSDivision</code> the division to be added. 75 77 */ 76 public void addSubDivision(String structure Name, String divisionID, METSDivision division)77 { METSStructure structure = (METSStructure) this.children.get(structure Name);78 public void addSubDivision(String structureId, String divisionID, METSDivision division) 79 { METSStructure structure = (METSStructure) this.children.get(structureId); 78 80 79 81 if (structure != null) … … 82 84 } 83 85 84 public METSDivision getDivision(String structureName, String divisionID) 85 { METSStructure structure = (METSStructure) this.children.get(structureName); 86 /** 87 * Get a division from within a given structure 88 * 89 * @param <code>String</code> the structure identifier 90 * @param <code>String</code> the division identifer 91 * 92 * @return <code>METSDivision</code> the division 93 */ 94 public METSDivision getDivision(String structureId, String divisionId) 95 { METSStructure structure = (METSStructure) this.children.get(structureId); 86 96 87 97 if (structure != null) 88 { return structure.getDivision(divisionI D);98 { return structure.getDivision(divisionId); 89 99 } 90 100 return null; -
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/SimpleNamespace.java
r5945 r6287 36 36 { super(name); 37 37 this.metadataMap = new MultiMap(); 38 System.out.println("Namespace " + name);39 38 } 40 39
Note:
See TracChangeset
for help on using the changeset viewer.