Class BagInfoRequirement

java.lang.Object
nl.knaw.dans.bagit.conformance.profile.BagInfoRequirement

public class BagInfoRequirement extends Object
This class is used to define elements in a bag-info.txt file used by a bagit-profile.
  • Field Details

    • required

      private boolean required
    • acceptableValues

      private List<String> acceptableValues
    • repeatable

      private boolean repeatable
  • Constructor Details

    • BagInfoRequirement

      public BagInfoRequirement()
    • BagInfoRequirement

      public BagInfoRequirement(boolean required, List<String> acceptableValues)
      Constructs a new BagInfoRequirement setting repeatable to true (default).
      Parameters:
      required - Indicates whether or not the tag is required.
      acceptableValues - List of acceptable values.
    • BagInfoRequirement

      public BagInfoRequirement(boolean required, List<String> acceptableValues, boolean repeatable)
      Constructs a new BagInfoRequirement.
      Parameters:
      required - Indicates whether or not the tag is required.
      acceptableValues - List of acceptable values.
      repeatable - Indicates whether or not the tag is repeatable.
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • isRequired

      public boolean isRequired()
    • setRequired

      public void setRequired(boolean required)
    • getAcceptableValues

      public List<String> getAcceptableValues()
    • setAcceptableValues

      public void setAcceptableValues(List<String> acceptableValues)
    • isRepeatable

      public boolean isRepeatable()
    • setRepeatable

      public void setRepeatable(boolean repeatable)