zenodoItem setLicenses not null as LicenseBean
This commit is contained in:
parent
7cd0c9c5e8
commit
a5da7f0f0d
|
@ -204,7 +204,7 @@ public class CkanToZenodoPublisherServiceImpl extends RemoteServiceServlet imple
|
||||||
// zenodoItem.getMetadata().setUpload_type(null);
|
// zenodoItem.getMetadata().setUpload_type(null);
|
||||||
// zenodoItem.getMetadata().setPublication_type(null);
|
// zenodoItem.getMetadata().setPublication_type(null);
|
||||||
|
|
||||||
LOG.info("zenodoItem setLicenses not null");
|
LOG.info("zenodoItem setLicenses not null as LicenseBean");
|
||||||
//zenodoItem.getMetadata().setLicenses(null);
|
//zenodoItem.getMetadata().setLicenses(null);
|
||||||
|
|
||||||
LOG.debug("Returning item: "+zenodoItem);
|
LOG.debug("Returning item: "+zenodoItem);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.SerializableEnum;
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.SerializableEnum;
|
||||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.ZenodoLicense;
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.ZenodoLicense;
|
||||||
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.LicenseBean;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,21 +49,20 @@ public class CkanToZenodoUtil {
|
||||||
return new SerializableEnum<String>(selectedValues, values);
|
return new SerializableEnum<String>(selectedValues, values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To serializable enum.
|
* License to serializable enum.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
|
||||||
* @param selectedLicense the selected license
|
* @param selectedLicense the selected license
|
||||||
* @param allLicenses the all licenses
|
* @param allLicenses the all licenses
|
||||||
* @return the serializable enum
|
* @return the serializable enum
|
||||||
*/
|
*/
|
||||||
public static <E extends ZenodoLicense> SerializableEnum<E> licenseToSerializableEnum(List<E> selectedLicense, List<E> allLicenses) {
|
public static SerializableEnum<LicenseBean> licenseToSerializableEnum(List<LicenseBean> selectedLicense, List<LicenseBean> allLicenses) {
|
||||||
|
|
||||||
if(allLicenses==null)
|
// if(allLicenses==null)
|
||||||
allLicenses = new ArrayList<E>();
|
// allLicenses = new ArrayList<LicenseBean>();
|
||||||
|
|
||||||
return new SerializableEnum<E>(selectedLicense, allLicenses);
|
return new SerializableEnum<LicenseBean>(selectedLicense, allLicenses);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,10 +13,11 @@ import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.ZenodoLicense;
|
||||||
*/
|
*/
|
||||||
public class LicenseBean implements ZenodoLicense, Serializable {
|
public class LicenseBean implements ZenodoLicense, Serializable {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 6618784269251750489L;
|
private static final long serialVersionUID = -7484830974654963132L;
|
||||||
private String id;
|
private String id;
|
||||||
private String title;
|
private String title;
|
||||||
private String url;
|
private String url;
|
||||||
|
|
Loading…
Reference in New Issue