public DocumentWithMeta getLatestDocAndMeta(String docPath) {
   DocumentWithMeta dm = new DocumentWithMeta();
   dm.setContent(documentStore.get(docPath));
   dm.setDisplayName(docPath);
   dm.setMetaData(getLatestMeta(docPath));
   return dm;
 }
 /**
  * Insert values into the array, preserving the original order of the request
  *
  * @param docsWithMeta - array to set values in with the correct order
  * @param positions - the original ordering
  * @param contents - the document contents
  * @param metaContents - the meta document contents
  */
 protected void constructDocumentWithMetaList(
     DocumentWithMeta[] docsWithMeta,
     List<RaptureURI> uris,
     List<Integer> positions,
     List<String> contents,
     List<String> metaContents) {
   if (contents.size() != metaContents.size()) {
     log.error("Batch getDocAndMetas failed due to different size of content vs metaContent");
     return;
   }
   for (int i = 0; i < contents.size(); i++) {
     DocumentWithMeta dwm = new DocumentWithMeta();
     String meta = metaContents.get(i);
     if (meta != null) {
       dwm.setMetaData(JacksonUtil.objectFromJson(meta, DocumentMetadata.class));
     }
     dwm.setContent(contents.get(i));
     dwm.setDisplayName(uris.get(positions.get(i)).getDocPath());
     docsWithMeta[positions.get(i)] = dwm;
   }
 }