return cc;
}
@SuppressWarnings("unchecked")
public JSONObject getJSONAtomicItem(MetsObject obj, int pageNum) {
AtomicItem ai = obj.getPhysicalStruct().get(pageNum-1);
JSONObject aim = new JSONObject();
aim.put("pageNumber", ai.getSequentialOrder());
aim.put("pageLabel", ai.getLabeledOrder());
aim.put("pageId", ai.getId());
JSONObject dataStream = new JSONObject();
Map<String, String> map = ai.getDataStreamsMap().get("size");
for (Map.Entry<String, String> entry : map.entrySet()) {
dataStream.put(entry.getKey(), entry.getValue());
}
aim.put("dataStream", dataStream);
aim.put("imageText", ai.getLabel());
List<String> parents = ai.parents();
JSONArray parentList = new JSONArray();
for (String string : parents) {
parentList.add(string);
}
aim.put("parents", parentList);