Package org.dspace.app.util
Class DCInputSet
java.lang.Object
org.dspace.app.util.DCInputSet
Class representing all DC inputs required for a submission, organized into pages
- Author:
- Brian S. Hughes, based on work by Jenny Toves, OCLC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanDCInput[][]Get all the fieldsReturn the name of the form that defines this input setintReturn the number of fields in this input setbooleanDoes this set of inputs include an alternate title field?booleanDoes this set of inputs include the previously published fields?booleanisFieldPresent(String fieldName) Does the current input set define the named field?booleanisFieldPresent(String fieldName, String documentType) Does the current input set define the named field?populateAllowedFieldNames(String documentTypeValue) Iterate DC input rows and populate a list of all allowed field names in this submission configuration.
-
Constructor Details
-
Method Details
-
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
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
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
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 namedocumentType- doc type- Returns:
- true if the current set has the named field
-
doField
-
populateAllowedFieldNames
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
-