2018-03-12 17:43:51 +01:00
|
|
|
package org.gcube.portlets.widgets.wsthreddssync.shared;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* The Class GcubeScope.
|
2018-03-12 17:43:51 +01:00
|
|
|
*
|
2019-08-02 15:04:28 +02:00
|
|
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
|
|
|
*
|
|
|
|
* Aug 2, 2019
|
2018-03-12 17:43:51 +01:00
|
|
|
*/
|
2019-08-02 15:04:28 +02:00
|
|
|
public class GcubeScope implements Serializable, IsSerializable, Comparable<GcubeScope> {
|
2018-03-12 17:43:51 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = -6427520549519606384L;
|
|
|
|
|
|
|
|
private GcubeScopeType scopeType;
|
|
|
|
private String scopeTitle;
|
|
|
|
private String scopeName;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiates a new gcube VRE.
|
|
|
|
*/
|
|
|
|
public GcubeScope() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiates a new gcube scope.
|
|
|
|
*
|
|
|
|
* @param scopeTitle the scope title
|
2019-08-02 15:04:28 +02:00
|
|
|
* @param scopeName the scope name
|
|
|
|
* @param scopeType the scope type
|
2018-03-12 17:43:51 +01:00
|
|
|
*/
|
|
|
|
public GcubeScope(String scopeTitle, String scopeName, GcubeScopeType scopeType) {
|
|
|
|
|
|
|
|
super();
|
|
|
|
this.scopeTitle = scopeTitle;
|
|
|
|
this.scopeName = scopeName;
|
|
|
|
this.scopeType = scopeType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Gets the scope type.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @return the scopeType
|
|
|
|
*/
|
|
|
|
public GcubeScopeType getScopeType() {
|
|
|
|
|
|
|
|
return scopeType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Gets the scope title.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @return the scopeTitle
|
|
|
|
*/
|
|
|
|
public String getScopeTitle() {
|
|
|
|
|
|
|
|
return scopeTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Gets the scope name.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @return the scopeName
|
|
|
|
*/
|
|
|
|
public String getScopeName() {
|
|
|
|
|
|
|
|
return scopeName;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Sets the scope type.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @param scopeType the scopeType to set
|
|
|
|
*/
|
|
|
|
public void setScopeType(GcubeScopeType scopeType) {
|
|
|
|
|
|
|
|
this.scopeType = scopeType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Sets the scope title.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @param scopeTitle the scopeTitle to set
|
|
|
|
*/
|
|
|
|
public void setScopeTitle(String scopeTitle) {
|
|
|
|
|
|
|
|
this.scopeTitle = scopeTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-02 15:04:28 +02:00
|
|
|
* Sets the scope name.
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @param scopeName the scopeName to set
|
|
|
|
*/
|
|
|
|
public void setScopeName(String scopeName) {
|
|
|
|
|
|
|
|
this.scopeName = scopeName;
|
|
|
|
}
|
|
|
|
|
2019-08-02 15:04:28 +02:00
|
|
|
/*
|
|
|
|
* (non-Javadoc)
|
|
|
|
*
|
2018-03-14 16:04:08 +01:00
|
|
|
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public int compareTo(GcubeScope o) {
|
|
|
|
|
2019-08-02 15:04:28 +02:00
|
|
|
if (o == null)
|
2018-03-14 16:04:08 +01:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
return this.getScopeName().compareTo(o.getScopeName());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-08-02 15:04:28 +02:00
|
|
|
/*
|
|
|
|
* (non-Javadoc)
|
|
|
|
*
|
2018-03-12 17:43:51 +01:00
|
|
|
* @see java.lang.Object#toString()
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
builder.append("GcubeScope [scopeType=");
|
|
|
|
builder.append(scopeType);
|
|
|
|
builder.append(", scopeTitle=");
|
|
|
|
builder.append(scopeTitle);
|
|
|
|
builder.append(", scopeName=");
|
|
|
|
builder.append(scopeName);
|
|
|
|
builder.append("]");
|
|
|
|
return builder.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|