20 lines
558 B
Java
20 lines
558 B
Java
package org.gcube.data.publishing.ckan2zenodo.clients;
|
|
|
|
import java.net.MalformedURLException;
|
|
|
|
import org.gcube.data.publishing.ckan2zenodo.model.CkanItemDescriptor;
|
|
import org.gcube.gcat.client.Item;
|
|
|
|
public class GCat {
|
|
|
|
|
|
public static CkanItemDescriptor getByID(String itemName) throws MalformedURLException {
|
|
return new CkanItemDescriptor(itemName,new Item().read(itemName));
|
|
}
|
|
|
|
|
|
public static void updateItem(CkanItemDescriptor toUpdate) throws MalformedURLException {
|
|
new Item().update(toUpdate.getItemName(), toUpdate.getContent());
|
|
}
|
|
}
|