private JSONObj store(JSONObj obj, StoreInfo store) { String name = store.getName(); obj.put("name", name) .put("workspace", store.getWorkspace().getName()) .put("enabled", store.isEnabled()) .put("description", store.getDescription()) .put("format", store.getType()); String source = source(store); obj.put("source", source) .put("type", IO.Kind.of(store).name()) .put("kind", IO.Type.of(store).name()); return IO.metadata(obj, store); }