Class MCSystemMetadata
java.lang.Object
org.dataone.service.types.v1.SystemMetadata
org.dataone.service.types.v2.SystemMetadata
edu.ucsb.nceas.metacat.systemmetadata.MCSystemMetadata
- All Implemented Interfaces:
Serializable
public class MCSystemMetadata
extends org.dataone.service.types.v2.SystemMetadata
A class of SystemMetadata which can hold multiple checksums
- Author:
- Jing Tao
- See Also:
-
Field Summary
Fields inherited from class org.dataone.service.types.v2.SystemMetadata
fileName, mediaType, seriesId
Fields inherited from class org.dataone.service.types.v1.SystemMetadata
accessPolicy, archived, authoritativeMemberNode, checksum, dateSysMetadataModified, dateUploaded, formatId, identifier, obsoletedBy, obsoletes, originMemberNode, replica, replicationPolicy, rightsHolder, serialVersion, size, submitter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.dataone.service.types.v2.SystemMetadata
convert
(MCSystemMetadata mcSystemMetadata) A utility method to convert an MCSystemMetadata object to a SystemMetadata objectstatic void
copy
(MCSystemMetadata mcSysmeta, org.dataone.service.types.v1.SystemMetadata sysmeta) Copy all properties from a SystemMetacat object to an MCSystemMetadata objectGet the checksums associated with the MCSystemMetadata objectvoid
setChecksums
(Map<String, String> checksums) Set the checksums for the MCSystemMetadata objectMethods inherited from class org.dataone.service.types.v2.SystemMetadata
getFileName, getMediaType, getSeriesId, setFileName, setMediaType, setSeriesId
Methods inherited from class org.dataone.service.types.v1.SystemMetadata
addReplica, clearReplicaList, getAccessPolicy, getArchived, getAuthoritativeMemberNode, getChecksum, getDateSysMetadataModified, getDateUploaded, getFormatId, getIdentifier, getObsoletedBy, getObsoletes, getOriginMemberNode, getReplica, getReplicaList, getReplicationPolicy, getRightsHolder, getSerialVersion, getSize, getSubmitter, grabAccessPolicyNullIfEmpty, grabReplicaListNullIfEmpty, grabReplicationPolicyNullIfEmpty, setAccessPolicy, setArchived, setAuthoritativeMemberNode, setChecksum, setDateSysMetadataModified, setDateUploaded, setFormatId, setIdentifier, setObsoletedBy, setObsoletes, setOriginMemberNode, setReplicaList, setReplicationPolicy, setRightsHolder, setSerialVersion, setSize, setSubmitter, sizeReplicaList
-
Constructor Details
-
MCSystemMetadata
public MCSystemMetadata()Default constructor
-
-
Method Details
-
copy
public static void copy(MCSystemMetadata mcSysmeta, org.dataone.service.types.v1.SystemMetadata sysmeta) throws InvocationTargetException, IllegalAccessException Copy all properties from a SystemMetacat object to an MCSystemMetadata object- Parameters:
mcSysmeta
- the destination object will accept the instance variables' valuessysmeta
- the source object- Throws:
InvocationTargetException
IllegalAccessException
-
convert
public static org.dataone.service.types.v2.SystemMetadata convert(MCSystemMetadata mcSystemMetadata) throws InvocationTargetException, IllegalAccessException A utility method to convert an MCSystemMetadata object to a SystemMetadata object- Parameters:
mcSystemMetadata
- the object which needs to be converted- Returns:
- a new SystemMetadata object which has all fields except the checksums information
- Throws:
InvocationTargetException
IllegalAccessException
-
getChecksums
Get the checksums associated with the MCSystemMetadata object- Returns:
- a map of hash algorithm names to their hex-encoded digest values
-
setChecksums
Set the checksums for the MCSystemMetadata object- Parameters:
checksums
- a map of hash algorithm names to their hex-encoded digest values
-