2017-04-25 15:42:17 +02:00
|
|
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.shared;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
2022-10-27 12:04:50 +02:00
|
|
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
|
|
|
2017-04-25 15:42:17 +02:00
|
|
|
/**
|
|
|
|
* A ckan organization/group (you can check its nature by looking at getIsOrganization();) like bean with name and title
|
|
|
|
* @author Costantino Perciante (costantino.perciante@isti.cnr.it)
|
|
|
|
*/
|
2022-10-27 12:04:50 +02:00
|
|
|
public class OrganizationBean implements Serializable, IsSerializable{
|
2017-04-25 15:42:17 +02:00
|
|
|
|
2024-02-15 17:25:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 8014712837346722595L;
|
2017-04-25 15:42:17 +02:00
|
|
|
private String title;
|
|
|
|
private String name;
|
|
|
|
private boolean isOrganization;
|
2017-05-19 14:26:33 +02:00
|
|
|
private boolean propagateUp; // an item linked to this group has to be added on the whole hierarchy chain
|
2017-04-25 15:42:17 +02:00
|
|
|
|
|
|
|
public OrganizationBean(){
|
|
|
|
}
|
|
|
|
|
|
|
|
public OrganizationBean(String title, String name, boolean isOrganization) {
|
|
|
|
this.title = title;
|
|
|
|
this.name = name;
|
|
|
|
this.isOrganization = isOrganization;
|
|
|
|
}
|
2017-05-19 14:26:33 +02:00
|
|
|
|
|
|
|
public OrganizationBean(String title, String name, boolean isOrganization, boolean propagateUp) {
|
|
|
|
this.title = title;
|
|
|
|
this.name = name;
|
|
|
|
this.isOrganization = isOrganization;
|
|
|
|
this.propagateUp = propagateUp;
|
|
|
|
}
|
2017-04-25 15:42:17 +02:00
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
this.title = title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setName(String name) {
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isOrganization() {
|
|
|
|
return isOrganization;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOrganization(boolean isOrganization) {
|
|
|
|
this.isOrganization = isOrganization;
|
|
|
|
}
|
|
|
|
|
2017-05-19 14:26:33 +02:00
|
|
|
public boolean isPropagateUp() {
|
|
|
|
return propagateUp;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPropagateUp(boolean propagateUp) {
|
|
|
|
this.propagateUp = propagateUp;
|
|
|
|
}
|
|
|
|
|
2017-04-25 15:42:17 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2024-02-15 17:25:57 +01:00
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
builder.append("OrganizationBean [title=");
|
|
|
|
builder.append(title);
|
|
|
|
builder.append(", name=");
|
|
|
|
builder.append(name);
|
|
|
|
builder.append(", isOrganization=");
|
|
|
|
builder.append(isOrganization);
|
|
|
|
builder.append(", propagateUp=");
|
|
|
|
builder.append(propagateUp);
|
|
|
|
builder.append("]");
|
|
|
|
return builder.toString();
|
2017-04-25 15:42:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|