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

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.dataone.service.types.v2.SystemMetadata
    convert(MCSystemMetadata mcSystemMetadata)
    A utility method to convert an MCSystemMetadata object to a SystemMetadata object
    static void
    copy(MCSystemMetadata mcSysmeta, org.dataone.service.types.v1.SystemMetadata sysmeta)
    Copy all properties from a SystemMetacat object to an MCSystemMetadata object
    Get the checksums associated with the MCSystemMetadata object
    void
    Set the checksums for the MCSystemMetadata object

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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' values
      sysmeta - 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

      public Map<String,String> getChecksums()
      Get the checksums associated with the MCSystemMetadata object
      Returns:
      a map of hash algorithm names to their hex-encoded digest values
    • setChecksums

      public void setChecksums(Map<String,String> checksums)
      Set the checksums for the MCSystemMetadata object
      Parameters:
      checksums - a map of hash algorithm names to their hex-encoded digest values