Wrapped all items from ckan2zenodo lib

This commit is contained in:
Francesco Mangiacrapa 2019-12-10 12:06:34 +01:00
parent 3f5807a68a
commit 628f25047a
14 changed files with 1175 additions and 6 deletions

View File

@ -5,7 +5,6 @@ import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.CatalogueItem;
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.ZenodoItem;
import com.github.gwtbootstrap.client.ui.Modal;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
@ -32,7 +31,7 @@ public class CkanToZendoPublisherWidget {
*
* @param item the item
*/
public void publishOnZenodo(CatalogueItem item) {
public void publishOnZenodo(final CatalogueItem item) {
ckanToZenodoService.convertToZenodoItem(item, new AsyncCallback<ZenodoItem>() {
@ -45,6 +44,7 @@ public class CkanToZendoPublisherWidget {
Modal modal = new Modal(true);
FormToPublishOnZenodoView form = new FormToPublishOnZenodoView(result) {
@Override
public void submitHandler() {
}
@ -57,7 +57,8 @@ public class CkanToZendoPublisherWidget {
public void setConfirm(boolean visible, String msg) {
}
};
modal.setTitle("Publishing on Zenodo...");
modal.setCloseVisible(true);
modal.add(form);
modal.show();
}

View File

@ -86,13 +86,13 @@ public abstract class FormToPublishOnZenodoView extends Composite {
this.zenodoItem = zenodoItem;
// if(conf!=null)
// this.isEditConfiguration = true;
// this.editConfiguration = conf;
bindEvents();
pager.getLeft().setVisible(false);
fillForm();
if (isEditConfiguration) {
pager.getRight().setText("Update Configuration");
} else {

View File

@ -0,0 +1,27 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.server;
import java.util.ArrayList;
import java.util.List;
public class CkanToZenodoUtil {
/**
* Gets the names.
*
* @param arrayEnum the list values
* @return the names
*/
public static List<String> getNames(Enum<?>[] arrayEnum) {
//return Arrays.toString(e.getEnumConstants()).replaceAll("^.|.$", "").split(", ");
List<String> list = new ArrayList<String>();
for (Enum<?> s : arrayEnum) {
list.add(s.name());
}
return list;
}
}

View File

@ -3,10 +3,13 @@ package org.gcube.portlets.widgets.ckan2zenodopublisher.server.converter;
import java.util.ArrayList;
import java.util.List;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.DepositionMetadata;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.FileDeposition;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.ZenodoDeposition;
import org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoUtil;
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.ZenodoFile;
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.ZenodoItem;
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.ZenodoMetadata;
/**
* The Class Ckan2ZenodoItemConverter.
@ -56,5 +59,14 @@ public class ItemConverter {
zf.setChecksum(fileDeposition.getChecksum());
return zf;
}
public static ZenodoMetadata toZenodoMetadata(DepositionMetadata depositionMetadata){
List<String> listUploadType = new ArrayList<String>(DepositionMetadata.UploadType.values().length);
CkanToZenodoUtil.getNames(DepositionMetadata.UploadType.values());
return null;
}
}

View File

@ -0,0 +1,68 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
/**
* The Class ZenodoCommunity.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoCommunity implements Serializable{
/**
*
*/
private static final long serialVersionUID = -1179726596008909364L;
private String identifier;
/**
* Instantiates a new zenodo community.
*/
ZenodoCommunity(){}
/**
* Instantiates a new zenodo community.
*
* @param identifier the identifier
*/
public ZenodoCommunity(String identifier) {
super();
this.identifier = identifier;
}
/**
* Gets the identifier.
*
* @return the identifier
*/
public String getIdentifier() {
return identifier;
}
/**
* Sets the identifier.
*
* @param identifier the new identifier
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoCommunity [identifier=");
builder.append(identifier);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,60 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.util.List;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.Contributor;
import org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoUtil;
/**
* The Class ZenodoContributor.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoContributor extends ZenodoCreator{
/**
*
*/
private static final long serialVersionUID = -3422470577729844766L;
public static final List<String> SELECTABLE_TYPE = CkanToZenodoUtil.getNames(Contributor.Type.values());
private String type;
/**
* Instantiates a new zenodo contributor.
*/
ZenodoContributor(){}
/**
* Gets the type.
*
* @return the type
*/
public String getType() {
return type;
}
/**
* Sets the type.
*
* @param type the new type
*/
public void setType(String type) {
this.type = type;
}
/* (non-Javadoc)
* @see org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped.ZenodoCreator#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoContributor [type=");
builder.append(type);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,86 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
/**
* The Class ZenodoCreator.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoCreator implements Serializable{
/**
*
*/
private static final long serialVersionUID = 4357548679127123138L;
private String name;
private String affiliation;
private String orcid;
private String gnd;
ZenodoCreator(){}
public ZenodoCreator(String name, String affiliation, String orcid, String gnd) {
super();
this.name = name;
this.affiliation = affiliation;
this.orcid = orcid;
this.gnd = gnd;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAffiliation() {
return affiliation;
}
public void setAffiliation(String affiliation) {
this.affiliation = affiliation;
}
public String getOrcid() {
return orcid;
}
public void setOrcid(String orcid) {
this.orcid = orcid;
}
public String getGnd() {
return gnd;
}
public void setGnd(String gnd) {
this.gnd = gnd;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoCreator [name=");
builder.append(name);
builder.append(", affiliation=");
builder.append(affiliation);
builder.append(", orcid=");
builder.append(orcid);
builder.append(", gnd=");
builder.append(gnd);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,96 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.DateInterval;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.DateInterval.Type;
import org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoUtil;
public class ZenodoDateInterval implements Serializable{
/**
*
*/
private static final long serialVersionUID = 6553194706340699412L;
public static final List<String> SELECTABLE_TYPE = CkanToZenodoUtil.getNames(DateInterval.Type.values());
private Date start;
private Date end;
private Type type;
private String description;
ZenodoDateInterval(){}
public ZenodoDateInterval(Date start, Date end, Type type, String description) {
super();
this.start = start;
this.end = end;
this.type = type;
this.description = description;
}
public Date getStart() {
return start;
}
public void setStart(Date start) {
this.start = start;
}
public Date getEnd() {
return end;
}
public void setEnd(Date end) {
this.end = end;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoDateInterval [start=");
builder.append(start);
builder.append(", end=");
builder.append(end);
builder.append(", type=");
builder.append(type);
builder.append(", description=");
builder.append(description);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,69 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
/**
* The Class ZenodoGrant.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoGrant implements Serializable{
/**
*
*/
private static final long serialVersionUID = -6481107870594473881L;
private String id;
/**
* Instantiates a new zenodo grant.
*/
public ZenodoGrant() {
}
/**
* Instantiates a new zenodo grant.
*
* @param id the id
*/
public ZenodoGrant(String id) {
super();
this.id = id;
}
/**
* Gets the id.
*
* @return the id
*/
public String getId() {
return id;
}
/**
* Sets the id.
*
* @param id the new id
*/
public void setId(String id) {
this.id = id;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoGrant [id=");
builder.append(id);
builder.append("]");
return builder.toString();
}
}

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;

View File

@ -0,0 +1,141 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
/**
* The Class ZenodoLocation.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoLocation implements Serializable{
/**
*
*/
private static final long serialVersionUID = -5866865983455214353L;
private Double lat;
private Double lon;
private String place;
private String description;
/**
* Instantiates a new zenodo location.
*/
ZenodoLocation(){}
/**
* Instantiates a new zenodo location.
*
* @param lat the lat
* @param lon the lon
* @param place the place
* @param description the description
*/
public ZenodoLocation(Double lat, Double lon, String place, String description) {
super();
this.lat = lat;
this.lon = lon;
this.place = place;
this.description = description;
}
/**
* Gets the lat.
*
* @return the lat
*/
public Double getLat() {
return lat;
}
/**
* Sets the lat.
*
* @param lat the new lat
*/
public void setLat(Double lat) {
this.lat = lat;
}
/**
* Gets the lon.
*
* @return the lon
*/
public Double getLon() {
return lon;
}
/**
* Sets the lon.
*
* @param lon the new lon
*/
public void setLon(Double lon) {
this.lon = lon;
}
/**
* Gets the place.
*
* @return the place
*/
public String getPlace() {
return place;
}
/**
* Sets the place.
*
* @param place the new place
*/
public void setPlace(String place) {
this.place = place;
}
/**
* Gets the description.
*
* @return the description
*/
public String getDescription() {
return description;
}
/**
* Sets the description.
*
* @param description the new description
*/
public void setDescription(String description) {
this.description = description;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoLocation [lat=");
builder.append(lat);
builder.append(", lon=");
builder.append(lon);
builder.append(", place=");
builder.append(place);
builder.append(", description=");
builder.append(description);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,423 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.DepositionMetadata;
import org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoUtil;
public class ZenodoMetadata implements Serializable{
public static final List<String> SELECTABLE_UPLOAD_TYPE = CkanToZenodoUtil.getNames(DepositionMetadata.UploadType.values());
private String upload_type;
public static final List<String> SELECTABLE_PUBLICATION_TYPE = CkanToZenodoUtil.getNames(DepositionMetadata.PublicationType.values());
private String publication_type;
public static final List<String> SELECTABLE_IMAGE_TYPE = CkanToZenodoUtil.getNames(DepositionMetadata.ImageType.values());
private String image_type;
private Date publication_date;
private String title;
private List<ZenodoCreator> creators;
private String description; // TODO HTML
public static final List<String> SELECTABLE_ACCESS_RIGHTS = CkanToZenodoUtil.getNames(DepositionMetadata.AccessRights.values());
private String access_right;
private Date embargo_date;
private String access_conditions; // TODO HTML
private String doi;
private Boolean preserve_doi;
private List<String> keywords;
private String notes; // TODO HTML
private List<ZenodoRelatedIdentifier> related_identifiers;
private List<ZenodoContributor> contributors;
private List<String> references;
private List<ZenodoCommunity> communities;
private List<ZenodoGrant> grants;
private String journal_title;
private String journal_volume;
private String journal_issue;
private String journal_pages;
private String conference_title;
private String conference_acronym;
private String conference_dates;
private String conference_place;
private String conference_url;
private String conference_session;
private String conference_session_part;
private String imprint_publisher;
private String imprint_isbn;
private String imprint_place;
private String partof_title;
private String partof_pages;
private List<ZenodoCreator> thesis_supervisors;
private String thesis_university;
private List<ZenodoSubject> subjects;
private String version;
private String language; //https://www.loc.gov/standards/iso639-2/php/code_list.php
private List<ZenodoLocation> locations;
private List<ZenodoDateInterval> dates;
private String method; //TODO html
public ZenodoMetadata(){}
public String getUpload_type() {
return upload_type;
}
public void setUpload_type(String upload_type) {
this.upload_type = upload_type;
}
public String getPublication_type() {
return publication_type;
}
public void setPublication_type(String publication_type) {
this.publication_type = publication_type;
}
public String getImage_type() {
return image_type;
}
public void setImage_type(String image_type) {
this.image_type = image_type;
}
public Date getPublication_date() {
return publication_date;
}
public void setPublication_date(Date publication_date) {
this.publication_date = publication_date;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<ZenodoCreator> getCreators() {
return creators;
}
public void setCreators(List<ZenodoCreator> creators) {
this.creators = creators;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getAccess_right() {
return access_right;
}
public void setAccess_right(String access_right) {
this.access_right = access_right;
}
public Date getEmbargo_date() {
return embargo_date;
}
public void setEmbargo_date(Date embargo_date) {
this.embargo_date = embargo_date;
}
public String getAccess_conditions() {
return access_conditions;
}
public void setAccess_conditions(String access_conditions) {
this.access_conditions = access_conditions;
}
public String getDoi() {
return doi;
}
public void setDoi(String doi) {
this.doi = doi;
}
public Boolean getPreserve_doi() {
return preserve_doi;
}
public void setPreserve_doi(Boolean preserve_doi) {
this.preserve_doi = preserve_doi;
}
public List<String> getKeywords() {
return keywords;
}
public void setKeywords(List<String> keywords) {
this.keywords = keywords;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<ZenodoRelatedIdentifier> getRelated_identifiers() {
return related_identifiers;
}
public void setRelated_identifiers(List<ZenodoRelatedIdentifier> related_identifiers) {
this.related_identifiers = related_identifiers;
}
public List<ZenodoContributor> getContributors() {
return contributors;
}
public void setContributors(List<ZenodoContributor> contributors) {
this.contributors = contributors;
}
public List<String> getReferences() {
return references;
}
public void setReferences(List<String> references) {
this.references = references;
}
public List<ZenodoCommunity> getCommunities() {
return communities;
}
public void setCommunities(List<ZenodoCommunity> communities) {
this.communities = communities;
}
public List<ZenodoGrant> getGrants() {
return grants;
}
public void setGrants(List<ZenodoGrant> grants) {
this.grants = grants;
}
public String getJournal_title() {
return journal_title;
}
public void setJournal_title(String journal_title) {
this.journal_title = journal_title;
}
public String getJournal_volume() {
return journal_volume;
}
public void setJournal_volume(String journal_volume) {
this.journal_volume = journal_volume;
}
public String getJournal_issue() {
return journal_issue;
}
public void setJournal_issue(String journal_issue) {
this.journal_issue = journal_issue;
}
public String getJournal_pages() {
return journal_pages;
}
public void setJournal_pages(String journal_pages) {
this.journal_pages = journal_pages;
}
public String getConference_title() {
return conference_title;
}
public void setConference_title(String conference_title) {
this.conference_title = conference_title;
}
public String getConference_acronym() {
return conference_acronym;
}
public void setConference_acronym(String conference_acronym) {
this.conference_acronym = conference_acronym;
}
public String getConference_dates() {
return conference_dates;
}
public void setConference_dates(String conference_dates) {
this.conference_dates = conference_dates;
}
public String getConference_place() {
return conference_place;
}
public void setConference_place(String conference_place) {
this.conference_place = conference_place;
}
public String getConference_url() {
return conference_url;
}
public void setConference_url(String conference_url) {
this.conference_url = conference_url;
}
public String getConference_session() {
return conference_session;
}
public void setConference_session(String conference_session) {
this.conference_session = conference_session;
}
public String getConference_session_part() {
return conference_session_part;
}
public void setConference_session_part(String conference_session_part) {
this.conference_session_part = conference_session_part;
}
public String getImprint_publisher() {
return imprint_publisher;
}
public void setImprint_publisher(String imprint_publisher) {
this.imprint_publisher = imprint_publisher;
}
public String getImprint_isbn() {
return imprint_isbn;
}
public void setImprint_isbn(String imprint_isbn) {
this.imprint_isbn = imprint_isbn;
}
public String getImprint_place() {
return imprint_place;
}
public void setImprint_place(String imprint_place) {
this.imprint_place = imprint_place;
}
public String getPartof_title() {
return partof_title;
}
public void setPartof_title(String partof_title) {
this.partof_title = partof_title;
}
public String getPartof_pages() {
return partof_pages;
}
public void setPartof_pages(String partof_pages) {
this.partof_pages = partof_pages;
}
public List<ZenodoCreator> getThesis_supervisors() {
return thesis_supervisors;
}
public void setThesis_supervisors(List<ZenodoCreator> thesis_supervisors) {
this.thesis_supervisors = thesis_supervisors;
}
public String getThesis_university() {
return thesis_university;
}
public void setThesis_university(String thesis_university) {
this.thesis_university = thesis_university;
}
public List<ZenodoSubject> getSubjects() {
return subjects;
}
public void setSubjects(List<ZenodoSubject> subjects) {
this.subjects = subjects;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public List<ZenodoLocation> getLocations() {
return locations;
}
public void setLocations(List<ZenodoLocation> locations) {
this.locations = locations;
}
public List<ZenodoDateInterval> getDates() {
return dates;
}
public void setDates(List<ZenodoDateInterval> dates) {
this.dates = dates;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoMetadata [upload_type=");
builder.append(upload_type);
builder.append(", publication_type=");
builder.append(publication_type);
builder.append(", image_type=");
builder.append(image_type);
builder.append(", publication_date=");
builder.append(publication_date);
builder.append(", title=");
builder.append(title);
builder.append(", creators=");
builder.append(creators);
builder.append(", description=");
builder.append(description);
builder.append(", access_right=");
builder.append(access_right);
builder.append(", embargo_date=");
builder.append(embargo_date);
builder.append(", access_conditions=");
builder.append(access_conditions);
builder.append(", doi=");
builder.append(doi);
builder.append(", preserve_doi=");
builder.append(preserve_doi);
builder.append(", keywords=");
builder.append(keywords);
builder.append(", notes=");
builder.append(notes);
builder.append(", related_identifiers=");
builder.append(related_identifiers);
builder.append(", contributors=");
builder.append(contributors);
builder.append(", references=");
builder.append(references);
builder.append(", communities=");
builder.append(communities);
builder.append(", grants=");
builder.append(grants);
builder.append(", journal_title=");
builder.append(journal_title);
builder.append(", journal_volume=");
builder.append(journal_volume);
builder.append(", journal_issue=");
builder.append(journal_issue);
builder.append(", journal_pages=");
builder.append(journal_pages);
builder.append(", conference_title=");
builder.append(conference_title);
builder.append(", conference_acronym=");
builder.append(conference_acronym);
builder.append(", conference_dates=");
builder.append(conference_dates);
builder.append(", conference_place=");
builder.append(conference_place);
builder.append(", conference_url=");
builder.append(conference_url);
builder.append(", conference_session=");
builder.append(conference_session);
builder.append(", conference_session_part=");
builder.append(conference_session_part);
builder.append(", imprint_publisher=");
builder.append(imprint_publisher);
builder.append(", imprint_isbn=");
builder.append(imprint_isbn);
builder.append(", imprint_place=");
builder.append(imprint_place);
builder.append(", partof_title=");
builder.append(partof_title);
builder.append(", partof_pages=");
builder.append(partof_pages);
builder.append(", thesis_supervisors=");
builder.append(thesis_supervisors);
builder.append(", thesis_university=");
builder.append(thesis_university);
builder.append(", subjects=");
builder.append(subjects);
builder.append(", version=");
builder.append(version);
builder.append(", language=");
builder.append(language);
builder.append(", locations=");
builder.append(locations);
builder.append(", dates=");
builder.append(dates);
builder.append(", method=");
builder.append(method);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,69 @@
/*
*
*/
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
import java.util.List;
import org.gcube.data.publishing.ckan2zenodo.model.zenodo.RelatedIdentifier.Relation;
import org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoUtil;
/**
* The Class ZenodoRelatedIdentifier.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoRelatedIdentifier implements Serializable{
/**
*
*/
private static final long serialVersionUID = 884279610505770594L;
private String identifier;
private String relation;
public static final List<String> SELECTABLE_RELATED_IDENTIFIERS = CkanToZenodoUtil.getNames(Relation.values());
ZenodoRelatedIdentifier(){}
public ZenodoRelatedIdentifier(String identifier, String relation) {
super();
this.identifier = identifier;
this.relation = relation;
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public String getRelation() {
return relation;
}
public void setRelation(String relation) {
this.relation = relation;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoRelatedIdentifier [identifier=");
builder.append(identifier);
builder.append(", relation=");
builder.append(relation);
builder.append("]");
return builder.toString();
}
}

View File

@ -0,0 +1,118 @@
package org.gcube.portlets.widgets.ckan2zenodopublisher.shared.wrapped;
import java.io.Serializable;
/**
* The Class ZenodoSubject.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Dec 10, 2019
*/
public class ZenodoSubject implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1344448838422680493L;
private String term;
private String identifier;
private String scheme;
/**
* Instantiates a new zenodo subject.
*/
ZenodoSubject(){}
/**
* Instantiates a new zenodo subject.
*
* @param term the term
* @param identifier the identifier
* @param scheme the scheme
*/
public ZenodoSubject(String term, String identifier, String scheme) {
super();
this.term = term;
this.identifier = identifier;
this.scheme = scheme;
}
/**
* Gets the term.
*
* @return the term
*/
public String getTerm() {
return term;
}
/**
* Sets the term.
*
* @param term the new term
*/
public void setTerm(String term) {
this.term = term;
}
/**
* Gets the identifier.
*
* @return the identifier
*/
public String getIdentifier() {
return identifier;
}
/**
* Sets the identifier.
*
* @param identifier the new identifier
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
* Gets the scheme.
*
* @return the scheme
*/
public String getScheme() {
return scheme;
}
/**
* Sets the scheme.
*
* @param scheme the new scheme
*/
public void setScheme(String scheme) {
this.scheme = scheme;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZenodoSubject [term=");
builder.append(term);
builder.append(", identifier=");
builder.append(identifier);
builder.append(", scheme=");
builder.append(scheme);
builder.append("]");
return builder.toString();
}
}