2013-02-06 15:40:17 +01:00
|
|
|
package org.gcube.portlets.user.workspace.client.model;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
import com.extjs.gxt.ui.client.data.BaseModelData;
|
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
/**
|
2016-09-29 15:28:32 +02:00
|
|
|
* The Class SmartFolderModel.
|
2013-02-06 15:40:17 +01:00
|
|
|
*
|
2019-02-22 12:05:22 +01:00
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
2016-09-29 15:28:32 +02:00
|
|
|
* Sep 29, 2016
|
2013-02-06 15:40:17 +01:00
|
|
|
*/
|
|
|
|
public class SmartFolderModel extends BaseModelData implements Serializable {
|
|
|
|
|
|
|
|
/**
|
2016-09-15 16:42:20 +02:00
|
|
|
*
|
2013-02-06 15:40:17 +01:00
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Instantiates a new smart folder model.
|
|
|
|
*/
|
|
|
|
public SmartFolderModel(){
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Instantiates a new smart folder model.
|
|
|
|
*
|
|
|
|
* @param id the id
|
|
|
|
* @param name the name
|
|
|
|
* @param query the query
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public SmartFolderModel(String id, String name, String query){
|
|
|
|
setIdentifier(id);
|
|
|
|
setName(name);
|
|
|
|
setQuery(query);
|
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Sets the identifier.
|
|
|
|
*
|
|
|
|
* @param id the new identifier
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public void setIdentifier(String id) {
|
2016-09-15 16:42:20 +02:00
|
|
|
set(FileModel.IDENTIFIER,id);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Sets the name.
|
|
|
|
*
|
|
|
|
* @param name the new name
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
private void setName(String name){
|
2016-09-15 16:42:20 +02:00
|
|
|
set(FileModel.NAME, name);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Sets the query.
|
|
|
|
*
|
|
|
|
* @param query the new query
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
private void setQuery(String query){
|
2016-09-15 16:42:20 +02:00
|
|
|
set(FileModel.QUERY, query);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Gets the identifier.
|
|
|
|
*
|
|
|
|
* @return the identifier
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public String getIdentifier() {
|
2016-09-15 16:42:20 +02:00
|
|
|
return get(FileModel.IDENTIFIER);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Gets the name.
|
|
|
|
*
|
|
|
|
* @return the name
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public String getName(){
|
2016-09-15 16:42:20 +02:00
|
|
|
return get(FileModel.NAME);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
2016-09-15 16:42:20 +02:00
|
|
|
|
2016-09-29 15:28:32 +02:00
|
|
|
/**
|
|
|
|
* Gets the query.
|
|
|
|
*
|
|
|
|
* @return the query
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public String getQuery(){
|
2016-09-15 16:42:20 +02:00
|
|
|
return get(FileModel.QUERY);
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
|
|
|
}
|