@Test void testGetEntityAsMap() { HashMap<String, Object> expected = newHashMap(); expected.put(ID, null); expected.put(ONTOLOGY_TERM_IRI, "iri"); expected.put(ONTOLOGY_TERM_NAME, "testTerm"); expected.put( ONTOLOGY_TERM_SYNONYM, singletonList( ImmutableMap.of( OntologyTermSynonymMetadata.ID, "1", ONTOLOGY_TERM_SYNONYM_ATTR, "synonym", SCORE, 10.0, COMBINED_SCORE, 20.0))); expected.put(ONTOLOGY_TERM_DYNAMIC_ANNOTATION, null); expected.put(ONTOLOGY_TERM_NODE_PATH, null); expected.put( ONTOLOGY, ImmutableMap.of( OntologyMetadata.ID, "1", OntologyMetadata.ONTOLOGY_IRI, ONTOLOGY_IRI, OntologyMetadata.ONTOLOGY_NAME, "testOntology")); assertEquals(singletonList(expected), getEntityAsMap(singletonList(term))); }
public static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities) { List<Map<String, Object>> docs = new ArrayList<>(); for (Entity entity : entities) { docs.add(getEntityAsMap(entity)); } return docs; }
SortaServiceUtil { public static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities) { List<Map<String, Object>> docs = new ArrayList<>(); for (Entity entity : entities) { docs.add(getEntityAsMap(entity)); } return docs; } }
SortaServiceUtil { public static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities) { List<Map<String, Object>> docs = new ArrayList<>(); for (Entity entity : entities) { docs.add(getEntityAsMap(entity)); } return docs; } private  SortaServiceUtil(); }
SortaServiceUtil { public static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities) { List<Map<String, Object>> docs = new ArrayList<>(); for (Entity entity : entities) { docs.add(getEntityAsMap(entity)); } return docs; } private  SortaServiceUtil(); static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities); static Map<String, Object> getEntityAsMap(Entity entity); }
SortaServiceUtil { public static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities) { List<Map<String, Object>> docs = new ArrayList<>(); for (Entity entity : entities) { docs.add(getEntityAsMap(entity)); } return docs; } private  SortaServiceUtil(); static List<Map<String, Object>> getEntityAsMap(Iterable<? extends Entity> entities); static Map<String, Object> getEntityAsMap(Entity entity);  }