public class DSpaceCSVLine extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected AuthorityValueService |
authorityValueService |
| Constructor and Description |
|---|
DSpaceCSVLine()
Create a new CSV line for a new item
|
DSpaceCSVLine(UUID itemId)
Create a new CSV line
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String key,
String value)
Add a new metadata value to this line
|
List<String> |
get(String key)
Get all the values that match the given metadata key.
|
String |
getAction()
Get any action associated with this line
|
UUID |
getID()
Get the item ID that this line represents
|
Set<String> |
keys()
Get all the metadata keys that are represented in this line
|
protected String |
toCSV(List<String> headings,
String fieldSeparator)
Write this line out as a CSV formatted string, in the order given by the headings provided
|
protected String |
valueToCSV(List<String> values,
String valueSeparator)
Internal method to create a CSV formatted String joining a given set of elements
|
protected final transient AuthorityValueService authorityValueService
public DSpaceCSVLine(UUID itemId)
itemId - The item ID of the linepublic DSpaceCSVLine()
public UUID getID()
public void add(String key, String value)
key - The metadata key (e.g. dc.contributor.author)value - The metadata valuepublic List<String> get(String key)
key - The metadata keypublic String getAction()
public Set<String> keys()
protected String toCSV(List<String> headings, String fieldSeparator)
headings - The headings which define the order the elements must be presented infieldSeparator - Copyright © 2016 DuraSpace. All Rights Reserved.