private static List<RcCollectionMetadata> readColletionMetadata(File rcDataVolDir) throws IOException, SAXException, RcMetadataException, RcOutdatedMetadataException { if (!rcDataVolDir.getName().equals("RCDATA01")) { throw new IOException("ResCarta data volume directory must be RCDATA01."); } File collMdFile = new File(rcDataVolDir.getPath() + File.separator + "metadata.xml"); return RcCollectionMetadata.readMets(collMdFile); }
/** * Read the ResCarta collections metadata file from the selected ResCarta * data volume if it exists. */ private void readRcCollectionMetadata() throws IOException, RcMetadataException, RcMetsException, RcModsException, RcMixException, RcOutdatedMetadataException, ParserConfigurationException, SAXException { String currentResCartaVolumeDirectoryName = this.currentResCartaVolumeDirectory.getPath(); if (!currentResCartaVolumeDirectoryName.endsWith(File.separator)) currentResCartaVolumeDirectoryName += File.separator; File metsCollectionMetadataFile = new File(currentResCartaVolumeDirectoryName + RcCollectionsManagerJPanel.RC_METS_COLLECTION_METADATA_FILE_NAME); if (metsCollectionMetadataFile.exists()) { this.rcCollectionMetadata = new ArrayList<RcCollectionMetadata>(RcCollectionMetadata.readMets(metsCollectionMetadataFile, this.rcObjectMetadataMap)); } else { this.rcCollectionMetadata = new ArrayList<RcCollectionMetadata>(); } }
this.rcRootCollMdList = RcCollectionMetadata.readMets(this.rcMetsCollectionMetadataFile); endTime = System.currentTimeMillis();
List<RcCollectionMetadata> rcCollMdList = RcCollectionMetadata.readMets(metsFile); endTimeMs = System.currentTimeMillis(); System.out.println("(Done in " + RcTimeUtils.formatElapsedTimeMs(startTimeMs, endTimeMs) + ")");
rcCollMdList = RcCollectionMetadata.readMets(metsFile);