Class DCInputSet

java.lang.Object
org.dspace.app.util.DCInputSet

public class DCInputSet extends Object
Class representing all DC inputs required for a submission, organized into pages
Author:
Brian S. Hughes, based on work by Jenny Toves, OCLC
  • Constructor Details

  • Method Details

    • getFormName

      public String getFormName()
      Return the name of the form that defines this input set
      Returns:
      formName the name of the form
    • getNumberFields

      public int getNumberFields()
      Return the number of fields in this input set
      Returns:
      number of pages
    • getFields

      public DCInput[][] getFields()
      Get all the fields
      Returns:
      an array containing the fields
    • isDefinedMultTitles

      public boolean isDefinedMultTitles()
      Does this set of inputs include an alternate title field?
      Returns:
      true if the current set has an alternate title field
    • isDefinedPubBefore

      public boolean isDefinedPubBefore()
      Does this set of inputs include the previously published fields?
      Returns:
      true if the current set has all the prev. published fields
    • isFieldPresent

      public boolean isFieldPresent(String fieldName)
      Does the current input set define the named field? Scan through every field in every page of the input set
      Parameters:
      fieldName - selects the field.
      Returns:
      true if the current set has the named field
    • isFieldPresent

      public boolean isFieldPresent(String fieldName, String documentType)
      Does the current input set define the named field? and is valid for the specified document type Scan through every field in every page of the input set
      Parameters:
      fieldName - field name
      documentType - doc type
      Returns:
      true if the current set has the named field
    • doField

      protected boolean doField(DCInput dcf, boolean addTitleAlternative, boolean addPublishedBefore)
    • populateAllowedFieldNames

      public List<String> populateAllowedFieldNames(String documentTypeValue)
      Iterate DC input rows and populate a list of all allowed field names in this submission configuration. This is important because an input can be configured repeatedly in a form (for example it could be required for type Book, and allowed but not required for type Article). If the field is allowed for this document type it'll never be stripped from metadata on validation. This can be more efficient than isFieldPresent to avoid looping the input set with each check.
      Parameters:
      documentTypeValue - Document type eg. Article, Book
      Returns:
      ArrayList of field names to use in validation