package eu.eudat.models.data.external;

import java.util.List;
import java.util.Map;


public class GrantsExternalSourcesModel extends ExternalListingItem<GrantsExternalSourcesModel> {
    @Override
    public GrantsExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
        for (Map<String, String> item : values) {
            ExternalSourcesItemModel model = new ExternalSourcesItemModel();
            model.setRemoteId(item.get("pid"));
            model.setUri(item.get("uri"));
            model.setName(item.get("name"));
            model.setDescription(item.get("description"));
            model.setTag(item.get("tag"));
            model.setKey(item.get("key"));
            this.add(model);
        }
        return this;
    }
}
