Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ public String getDescribedBy(
DSpaceObject object = findObject(context, uuid);
DisseminationCrosswalk xwalk = (DisseminationCrosswalk)
pluginService.getNamedPlugin(DisseminationCrosswalk.class, xwalkName);
List<Element> elements = xwalk.disseminateList(context, object);
// Output valid XML: disseminate using root element as opposed to list
Element element = xwalk.disseminateElement(context, object);
XMLOutputter outputter = new XMLOutputter(Format.getCompactFormat());
return outputter.outputString(elements);
return outputter.outputString(element);
}

private DSpaceObject findObject(Context context, UUID uuid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,8 @@ public void getDescribedBy() throws Exception {

getClient().perform(get("/signposting/describedby/" + item.getID()))
.andExpect(status().isOk())
.andExpect(content().string(
Matchers.startsWith("<resource xmlns=\"http://datacite.org/schema/kernel-4\"")))
.andExpect(content().string(Matchers.containsString(title)))
.andExpect(header().stringValues("Content-Type", responseMimeType + ";charset=UTF-8"));
}
Expand Down
Loading