ObjectStoreSummary { public List<Object> getFieldValues(String className, String fieldName) { return fieldValuesMap.get(className + "." + fieldName); } ObjectStoreSummary(ObjectStore os, Properties configuration);  ObjectStoreSummary(Properties properties); int getMaxValues(); int getClassCount(String className); List<Object> getFieldValues(String className, String fieldName); Set<String> getNullReferencesAndCollections(String className); Map<String, Set<String>> getAllNullReferencesAndCollections(); Set<String> getNullAttributes(String className); Map<String, Set<String>> getAllNullAttributes(); Properties toProperties(); static final int DEFAULT_MAX_VALUES; }
@Test public void testIgnore() throws Exception { ObjectStore os = ObjectStoreFactory.getObjectStore("os.unittest"); Properties config = new Properties(); config.put("max.field.value", "10"); config.put("ignore.counts", "org.intermine.model.testmodel.Employee.age"); ObjectStoreSummary oss = new ObjectStoreSummary(os, config); Assert.assertNull(oss.getFieldValues("org.intermine.model.testmodel.Employee", "age")); }
@Test public void testGetFieldValues() throws Exception { Properties config = new Properties(); config.put("max.field.value", "10"); config.put("org.intermine.model.testmodel.Employee.fields", "age name"); config.put("org.intermine.model.testmodel.Manager.fields", "title"); ObjectStore os = ObjectStoreFactory.getObjectStore("os.unittest"); ObjectStoreSummary oss = new ObjectStoreSummary(os, config); Assert.assertEquals(Arrays.asList(new Object [] {"10", "20", "30", "40", "50", "60"}), oss.getFieldValues("org.intermine.model.testmodel.Employee", "age")); Assert.assertEquals(Arrays.asList(new Object [] {"Mr.", null}), oss.getFieldValues("org.intermine.model.testmodel.Manager", "title")); Assert.assertNull(oss.getFieldValues("org.intermine.model.testmodel.Bank", "name")); Assert.assertNull(oss.getFieldValues("org.intermine.model.testmodel.Thing", "id")); Assert.assertNull(oss.getFieldValues("org.intermine.model.InterMineObject", "id")); }