Added DOI to message returned as result
This commit is contained in:
parent
b5e5244c6f
commit
032d01f57c
|
@ -153,7 +153,7 @@ public class CkanToZendoPublisherWidget {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
public void onSuccess(String doi) {
|
||||
buttonPublish.setEnabled(false);
|
||||
basicTabPanel.getElement().getStyle().setOpacity(1.0);
|
||||
try {
|
||||
|
@ -163,6 +163,9 @@ public class CkanToZendoPublisherWidget {
|
|||
}
|
||||
String msg = "The item has been uploaded to Zenodo correctly";
|
||||
|
||||
if(doi!=null)
|
||||
msg+=" "+doi;
|
||||
|
||||
Alert infoLabel = new Alert();
|
||||
infoLabel.setClose(false);
|
||||
infoLabel.setType(AlertType.INFO);
|
||||
|
|
|
@ -10,14 +10,38 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|||
|
||||
/**
|
||||
* The client side stub for the RPC service.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
*
|
||||
* Jan 28, 2020
|
||||
*/
|
||||
@RemoteServiceRelativePath("ckantozenodo")
|
||||
public interface CkanToZenodoPublisherService extends RemoteService {
|
||||
|
||||
/**
|
||||
* Convert to zenodo item.
|
||||
*
|
||||
* @param item the item
|
||||
* @return the zenodo item
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
ZenodoItem convertToZenodoItem(CatalogueItem item) throws Exception;
|
||||
|
||||
/**
|
||||
* Publish on zenodo.
|
||||
*
|
||||
* @param zenodoItem the zenodo item
|
||||
* @return the DOI of published Zenodo Item
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
String publishOnZenodo(ZenodoItem zenodoItem) throws Exception;
|
||||
|
||||
/**
|
||||
* Read fields descriptions.
|
||||
*
|
||||
* @return the map
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
Map<String, String> readFieldsDescriptions() throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class CkanToZenodoPublisherServiceImpl extends RemoteServiceServlet imple
|
|||
//Finalize
|
||||
LOG.debug("Calling publish on Zenodo for: "+zenodoDepositionPreview);
|
||||
zenodoDepositionPreview = client.publish(zenodoDepositionPreview, item);
|
||||
return zenodoDepositionPreview.toString();
|
||||
return zenodoDepositionPreview.getDoi();
|
||||
|
||||
}catch (TimeoutException e) {
|
||||
String error = "I'm waiting too time for publishing on Zenodo the catalogue item: "+zenodoItem.getName()+". Check by yourself the result later";
|
||||
|
|
Loading…
Reference in New Issue