/** * Removes the @id member of each node object where the member value is a * blank node identifier which appears only once in any property value * within input. * * @param input * the framed output before compaction */ static void pruneBlankNodes(final Object input) { final Map<String, Object> toPrune = new HashMap<>(); fillNodesToPrune(input, toPrune); for (final String id : toPrune.keySet()) { final Object node = toPrune.get(id); if (node == null) { continue; } ((Map<String, Object>) node).remove(JsonLdConsts.ID); } }
/** * Removes the @id member of each node object where the member value is a * blank node identifier which appears only once in any property value * within input. * * @param input * the framed output before compaction */ static void pruneBlankNodes(final Object input) { final Map<String, Object> toPrune = new HashMap<>(); fillNodesToPrune(input, toPrune); for (final String id : toPrune.keySet()) { final Object node = toPrune.get(id); if (node == null) { continue; } ((Map<String, Object>) node).remove(JsonLdConsts.ID); } }
fillNodesToPrune(i, toPrune); fillNodesToPrune(((Map<String, Object>) input).get("@list"), toPrune); return; fillNodesToPrune(((Map<String, Object>) input).get(prop), toPrune);
fillNodesToPrune(i, toPrune); fillNodesToPrune(((Map<String, Object>) input).get("@list"), toPrune); return; fillNodesToPrune(((Map<String, Object>) input).get(prop), toPrune);