VolumeDescriptorRecord extends BaseRecord { @Override public void assignMetadataTo(final MetadataElement elem, final String suffix) { super.assignMetadataTo(elem, suffix); elem.setAttributeString("Ascii code character", _asciiCodeCharacter); elem.setAttributeString("Specification number", _specificationNumber); elem.setAttributeString("Specification revision number", _specificationRevisionNumber); elem.setAttributeString("Record format revision number", _recordFormatRevisionNumer); elem.setAttributeString("Software version number", _softwareVersionNumber); elem.setAttributeString("Logical volume ID", _logicalVolumeID); elem.setAttributeString("Volume set ID", _volumeSetID); elem.setAttributeInt("Volume number of this volume descriptor record", _volumeNumberOfThisVolumeDescritorRecord); elem.setAttributeInt("Number of first file following the volume directory file", _numberOfFirstFileFollowingTheVolumeDirectoryFile); elem.setAttributeInt("Logical volume number in volume set", _logicalVolumeNumberInVolumeSet); elem.setAttributeString("Logical volume preparation date", _logicalVolumePreparationDate); elem.setAttributeString("Logical volume preparation time", _logicalVolumePreparationTime); elem.setAttributeString("Logical volume preparation country", _logicalVolumePreparationCountry); elem.setAttributeString("Logical volume preparing agent", _logicalVolumePreparingAgent); elem.setAttributeString("Logical volume preparing facility", _logicalVolumePreparingFacility); elem.setAttributeInt("Number of filepointer records", _numberOfFilepointerRecords); elem.setAttributeInt("Number of records", _numberOfRecords); } VolumeDescriptorRecord(CeosFileReader reader);  VolumeDescriptorRecord(CeosFileReader reader, long startPos); String getAsciiCodeCharacter(); String getSpecificationNumber(); String getSpecificationRevisionNumber(); String getRecordFormatRevisionNumer(); String getSoftwareVersionNumber(); String getLogicalVolumeID(); String getVolumeSetID(); int getVolumeNumberOfThisVolumeDescritorRecord(); int getNumberOfFirstFileFollowingTheVolumeDirectoryFile(); int getLogicalVolumeNumberInVolumeSet(); String getLogicalVolumePreparationDate(); String getLogicalVolumePreparationTime(); String getLogicalVolumePreparationCountry(); String getLogicalVolumePreparingAgent(); String getLogicalVolumePreparingFacility(); int getNumberOfFilepointerRecords(); int getNumberOfRecords(); @Override void assignMetadataTo(final MetadataElement elem, final String suffix);  }
@Test public void testAssignMetadata() throws IOException, IllegalCeosFormatException { final VolumeDescriptorRecord record = new VolumeDescriptorRecord(_reader, _prefix.length()); final MetadataElement volumeMetadata = new MetadataElement("VOLUME_DESCRIPTOR"); record.assignMetadataTo(volumeMetadata, "suffix"); assertEquals(23, volumeMetadata.getNumAttributes()); assertEquals(0, volumeMetadata.getNumElements()); assertMetadata(volumeMetadata); }