Class SystemMetadataValidator

java.lang.Object
edu.ucsb.nceas.metacat.systemmetadata.SystemMetadataValidator

public class SystemMetadataValidator extends Object
A class to validate the given system metadata object
Author:
tao
  • Constructor Details

    • SystemMetadataValidator

      public SystemMetadataValidator()
  • Method Details

    • hasLatestVersion

      public static boolean hasLatestVersion(org.dataone.service.types.v1.SystemMetadata sysmeta) throws InvalidSystemMetadata, org.dataone.service.exceptions.ServiceFailure
      Check if the given system metadata has the latest version. If Metacat doesn't have a stored copy of the system metadata, of course this given system is the latest version; if Metacat does have a copy, we will check two parts - first, the last modified date should match the stored copy. second, the serial version should equal or be greater than the stored copy
      Parameters:
      sysmeta -
      Returns:
      true if it has the latest version; otherwise false.
      Throws:
      InvalidSystemMetadata
      org.dataone.service.exceptions.ServiceFailure