use of org.folio.rest.jaxrs.model.MarcJson in project mod-inventory-storage by folio-org.
the class InstanceStorageTest method toMarcJson.
private MarcJson toMarcJson(String resourcePath) throws IOException {
String mrcjson = IOUtils.toString(this.getClass().getResourceAsStream(resourcePath), "UTF-8");
JsonObject json = new JsonObject(mrcjson);
MarcJson newMarcJson = new MarcJson();
newMarcJson.setLeader(json.getString("leader"));
newMarcJson.setFields(json.getJsonArray("fields").getList());
return newMarcJson;
}
Aggregations