private Content assemble(JsonNode tree, Reference base) { Set<Reference> visited = new HashSet<Reference>(); JsonNode assembly = assembleNode(tree, base, visited); return Content.getContentItem(base, assembly); }
public Content load(URL url) { Reference ref = new Reference(url, modelVersion); Content doc = docCache.get(ref); if (doc == null) { try { String text = readFromUrl(url); JsonNode root = toJson(text, url, modelVersion); doc = Content.getContentItem(ref, root); } catch (LoadException e) { doc = Content.getUnloadableContentItem(ref, e.getMessage()); } } docCache.put(ref, doc); return doc; }