package org.gcube.portlets.widgets.ckandatapublisherwidget.shared; import java.io.Serializable; import java.util.List; /** * A dataset's resource bean * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) */ public class ResourceBeanWrapper implements Serializable{ private static final long serialVersionUID = -6542455246456049712L; private String url; private String name; private String description; private String id; private boolean toBeAdded; private String mimeType; private String organizationNameDatasetParent; // the organization name in which the parent dataset was created private List subResources; // a list of sub resources private ResourceBeanWrapper parentResource; private boolean isFolder; public ResourceBeanWrapper(){ super(); } /** * @param url * @param name * @param description * @param id * @param toBeAdded * @param mimeType * @param organizationNameDatasetParent * @param subResources * @param parentResource * @param isFolder */ public ResourceBeanWrapper(String url, String name, String description, String id, boolean toBeAdded, String mimeType, String organizationNameDatasetParent, List subResources, ResourceBeanWrapper parentResource, boolean isFolder) { super(); this.url = url; this.name = name; this.description = description; this.id = id; this.toBeAdded = toBeAdded; this.mimeType = mimeType; this.organizationNameDatasetParent = organizationNameDatasetParent; this.subResources = subResources; this.parentResource = parentResource; this.isFolder = isFolder; } /** * Used when the user adds the resources after having created the product * @param url * @param name * @param description * @param id * @param toAdd * @param mimeType * @param datasetOrg */ public ResourceBeanWrapper(String url, String name, String description, String id, boolean toAdd, String mimeType, String datasetOrg) { super(); this.id = id; this.url = url; this.name = name; this.description = description; this.toBeAdded = toAdd; this.mimeType = mimeType; this.organizationNameDatasetParent = datasetOrg; } /** * @return the url */ public String getUrl() { return url; } /** * @param url the url to set */ public void setUrl(String url) { this.url = url; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the description */ public String getDescription() { return description; } /** * @param description the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the toBeAdded */ public boolean isToBeAdded() { return toBeAdded; } /** * @param toBeAdded the toBeAdded to set */ public void setToBeAdded(boolean toBeAdded) { this.toBeAdded = toBeAdded; } /** * @return the mimeType */ public String getMimeType() { return mimeType; } /** * @param mimeType the mimeType to set */ public void setMimeType(String mimeType) { this.mimeType = mimeType; } /** * @return the organizationNameDatasetParent */ public String getOrganizationNameDatasetParent() { return organizationNameDatasetParent; } /** * @param organizationNameDatasetParent the organizationNameDatasetParent to set */ public void setOrganizationNameDatasetParent( String organizationNameDatasetParent) { this.organizationNameDatasetParent = organizationNameDatasetParent; } public List getSubResources() { return subResources; } public void setSubResources(List subResources) { this.subResources = subResources; } public ResourceBeanWrapper getParentResource() { return parentResource; } public void setParentResource(ResourceBeanWrapper parentResource) { this.parentResource = parentResource; } public boolean isFolder() { return isFolder; } public void setFolder(boolean isFolder) { this.isFolder = isFolder; } @Override public String toString() { return "ResourceBeanWrapper [url=" + url + ", name=" + name + ", description=" + description + ", id=" + id + ", toBeAdded=" + toBeAdded + ", mimeType=" + mimeType + ", organizationNameDatasetParent=" + organizationNameDatasetParent + ", subResources=" + subResources + ", parentResource=" + parentResource + ", isFolder=" + isFolder + "]"; } }