Skip to content

Commit

Permalink
added publish for digital objects
Browse files Browse the repository at this point in the history
  • Loading branch information
sem42198 committed Oct 25, 2017
1 parent 3d160ae commit feaaa8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public Object[] getASpaceSubjectSource(String atValue) {
String code;

code = lookupListValuesToCodes.get(atValue);
System.out.println(atValue);
System.out.println(code);

atValue = atValue.toLowerCase();

Expand All @@ -107,8 +105,7 @@ public Object[] getASpaceSubjectSource(String atValue) {
if (code == null || code.isEmpty()) code = "local";
else code = code.replace(".", "");
}
System.out.println(code);
System.out.println(getASpaceEnumValue("subject_source", code)[0] + "\n");

return getASpaceEnumValue("subject_source", code);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@ public JSONObject convertToDigitalObjectComponent(DigitalObjects record) throws
String title = record.getObjectLabel();
json.put("title", fixEmptyString(title));

json.put("publish", publishHashMap.get("digitalObjects"));

addLanguageCode(json, record.getLanguageCode());

/* add fields required for digital object component*/
Expand Down Expand Up @@ -1784,6 +1786,9 @@ private JSONArray addAssessmentsAgent(String name, Assessments assessment) throw
namesJA.put(nameJSON);
json.put("names", namesJA);

json.put("publish", false);
json.put("agent_type", "agent_person");

//save the agent to ASpace
String endpoint = "/agents/people";
String id = aspaceCopyUtil.saveRecord(endpoint , json.toString(), "Assessments->" + assessment.getIdentifier());
Expand Down

0 comments on commit feaaa8f

Please sign in to comment.