Class ImportRecord
java.lang.Object
org.dspace.importer.external.datamodel.ImportRecord
This class contains all MetadatumDTO objects from an imported item
- Author:
- Roeland Dillen (roeland at atmire dot com)
-
Constructor Summary
ConstructorsConstructorDescriptionImportRecord(List<MetadatumDTO> valueList) Create an ImportRecord instance initialized with a List of MetadatumDTO objects -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(MetadatumDTO value) Add a value to the valueListgetSingleValue(String field) Returns anOptional<String>representing the value of the metadatafieldfound inside thevalueList.getSingleValue(String schema, String element, String qualifier) Retrieves a single value for the given schema, element, and qualifier.Return the MetadatumDTO's that are related to a given schema/element/qualifier pair/tripletRetrieve an unmodifiableList of MetadatumDTOtoString()Build a string based on the values in the valueList object The syntax will be Record{valueList={"schema"; "element" ; "qualifier"; "value"}}
-
Constructor Details
-
ImportRecord
Create an ImportRecord instance initialized with a List of MetadatumDTO objects- Parameters:
valueList- list of metadata values
-
-
Method Details
-
getValueList
Retrieve an unmodifiableList of MetadatumDTO- Returns:
- List of MetadatumDTO
-
toString
Build a string based on the values in the valueList object The syntax will be Record{valueList={"schema"; "element" ; "qualifier"; "value"}} -
getValue
Return the MetadatumDTO's that are related to a given schema/element/qualifier pair/triplet- Parameters:
schema- metadata field schemaelement- metadata field elementqualifier- metadata field qualifier- Returns:
- the MetadatumDTO's that are related to a given schema/element/qualifier pair/triplet
-
getSingleValue
Returns anOptional<String>representing the value of the metadatafieldfound inside thevalueList.- Parameters:
field- String of the MetadataField to search- Returns:
Optional<String>non empty if found.
-
getSingleValue
Retrieves a single value for the given schema, element, and qualifier.- Parameters:
schema- the schema for the valueelement- the element for the valuequalifier- the qualifier for the value- Returns:
- an optional containing the single value, if present
-
addValue
Add a value to the valueList- Parameters:
value- The MetadatumDTO to add to the valueList
-