Commit 77ac48d0 authored by bourgesl's avatar bourgesl
Browse files

minor refactoring to describe keyword attributes

parent 03e43648
...@@ -160,7 +160,7 @@ public interface Const { ...@@ -160,7 +160,7 @@ public interface Const {
//# 19 [funder] //# 19 [funder]
KEY_FUNDER_NAME KEY_FUNDER_NAME
}; };
public static final String[] KEY_ATTRS = new String[]{ public static final String[] KEY_ATTRS_NAMES = new String[]{
// creator / contributor attributes: // creator / contributor attributes:
// nameIdentifier variants: // nameIdentifier variants:
// "nameIdentifier:AUTHORCLAIM", // "nameIdentifier:AUTHORCLAIM",
...@@ -170,11 +170,15 @@ public interface Const { ...@@ -170,11 +170,15 @@ public interface Const {
// "nameIdentifier:VIAF", // "nameIdentifier:VIAF",
// "nameIdentifier:URL", // "nameIdentifier:URL",
// affiliation: // affiliation:
"affiliation", "affiliation"
// givenName // givenName
// familyName // familyName
};
public static final String[] KEY_ATTRS_RIGHTS = new String[]{
// rights attribute: // rights attribute:
"rightsURI", "rightsURI"
};
public static final String[] KEY_ATTRS_FUNDER = new String[]{
// funder attributes: // funder attributes:
// funderIdentifier // funderIdentifier
"awardNumber", "awardNumber",
......
...@@ -31,9 +31,9 @@ public final class DoiCsvData extends CsvData { ...@@ -31,9 +31,9 @@ public final class DoiCsvData extends CsvData {
KEY_ORDER_INDEX.put(key, Integer.valueOf(i++)); KEY_ORDER_INDEX.put(key, Integer.valueOf(i++));
} }
// supported attributes (extra CSV columns): // supported attributes (extra CSV columns):
for (String key : Const.KEY_ATTRS) { KEY_ATTR_SET.addAll(Arrays.asList(Const.KEY_ATTRS_NAMES));
KEY_ATTR_SET.add(key); KEY_ATTR_SET.addAll(Arrays.asList(Const.KEY_ATTRS_RIGHTS));
} KEY_ATTR_SET.addAll(Arrays.asList(Const.KEY_ATTRS_FUNDER));
} }
DoiCsvData(final List<String[]> rows) { DoiCsvData(final List<String[]> rows) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment