Class FileMeta

java.lang.Object
nl.knaw.dans.lib.dataverse.model.file.FileMeta

public class FileMeta extends Object
  • Constructor Details

    • FileMeta

      public FileMeta()
  • Method Details

    • toPrestagedFile

      public PrestagedFile toPrestagedFile()
    • toFileMetaUpdate

      public FileMetaUpdate toFileMetaUpdate()
    • toFileMetaUpdate

      public FileMetaUpdate toFileMetaUpdate(boolean sendRestrict)
      Convert this object to a FileMetaUpdate object, which can be used in the {DatasetApi.updateFileMetadatas(List) method. Note, that the 'restrict' property is only included in the FileMetaUpdate object if the 'sendRestrict' parameter is true and the 'restricted' property is not null. You should only send the 'restrict' property if you want to change the restricted status of the file. Dataverse will return an error if you set 'restrict' to the same value as the current restricted status of the file.
      Parameters:
      sendRestrict - whether to include the 'restrict' property in the FileMetaUpdate object
      Returns:
      the FileMetaUpdate object
    • getRestrict

      public Boolean getRestrict()
      Dataverse uses "restrict" in the Add File To Dataset API, but returns "restricted" in the response message; "restricted" is ignored by Add File To Dataset. This library works around the confusion by supporting both the "restrict" and "restricted" property, storing them in the same private field.
      Returns:
      whether the file is or should be restricted
      See Also:
    • setRestrict

      public void setRestrict(Boolean restrict)
      See comments in the getRestrict() method docs.
      Parameters:
      restrict - whether to restrict the file or not
    • getRestricted

      public Boolean getRestricted()
      See comments in the getRestrict() method docs. *
      Returns:
      whether the file is or should be restricted
      See Also:
    • setRestricted

      public void setRestricted(Boolean restricted)
      See comments in the getRestrict() method docs.
      Parameters:
      restricted - whether to restrict the file or not
    • getLabel

      public String getLabel()
    • getDescription

      public String getDescription()
    • getDirectoryLabel

      public String getDirectoryLabel()
    • getVersion

      public int getVersion()
    • getDatasetVersionId

      public int getDatasetVersionId()
    • getCategories

      public List<String> getCategories()
    • getDataFile

      public DataFile getDataFile()
    • getForceReplace

      public Boolean getForceReplace()
    • getLicense

      public License getLicense()
    • getTermsOfUse

      public String getTermsOfUse()
    • getConfidentialityDeclaration

      public String getConfidentialityDeclaration()
    • getSpecialPermissions

      public String getSpecialPermissions()
    • getRestrictions

      public String getRestrictions()
    • getCitationRequirements

      public String getCitationRequirements()
    • getDepositorRequirements

      public String getDepositorRequirements()
    • getConditions

      public String getConditions()
    • getDisclaimer

      public String getDisclaimer()
    • setLabel

      public void setLabel(String label)
    • setDescription

      public void setDescription(String description)
    • setDirectoryLabel

      public void setDirectoryLabel(String directoryLabel)
    • setVersion

      public void setVersion(int version)
    • setDatasetVersionId

      public void setDatasetVersionId(int datasetVersionId)
    • setCategories

      public void setCategories(List<String> categories)
    • setDataFile

      public void setDataFile(DataFile dataFile)
    • setForceReplace

      public void setForceReplace(Boolean forceReplace)
    • setLicense

      public void setLicense(License license)
    • setTermsOfUse

      public void setTermsOfUse(String termsOfUse)
    • setConfidentialityDeclaration

      public void setConfidentialityDeclaration(String confidentialityDeclaration)
    • setSpecialPermissions

      public void setSpecialPermissions(String specialPermissions)
    • setRestrictions

      public void setRestrictions(String restrictions)
    • setCitationRequirements

      public void setCitationRequirements(String citationRequirements)
    • setDepositorRequirements

      public void setDepositorRequirements(String depositorRequirements)
    • setConditions

      public void setConditions(String conditions)
    • setDisclaimer

      public void setDisclaimer(String disclaimer)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object