79 lines
1.7 KiB
Java
79 lines
1.7 KiB
Java
package org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* A wrapper for the MetadataCategory class.
|
|
* @see org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataCategory
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
|
*/
|
|
public class CategoryWrapper implements Serializable{
|
|
|
|
private static final long serialVersionUID = -1949961285656672831L;
|
|
private String id;
|
|
private String title;
|
|
private String description;
|
|
private List<MetadataFieldWrapper> fieldsForThisCategory;
|
|
|
|
public CategoryWrapper() {
|
|
super();
|
|
}
|
|
|
|
public CategoryWrapper(String id, String title, String description) {
|
|
super();
|
|
this.id = id;
|
|
this.title = title;
|
|
this.description = description;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public List<MetadataFieldWrapper> getFieldsForThisCategory() {
|
|
return fieldsForThisCategory;
|
|
}
|
|
|
|
public void setFieldsForThisCategory(
|
|
List<MetadataFieldWrapper> fieldsForThisCategory) {
|
|
this.fieldsForThisCategory = fieldsForThisCategory;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
final int maxLen = 10;
|
|
return "CategoryWrapper [id="
|
|
+ id
|
|
+ ", title="
|
|
+ title
|
|
+ ", description="
|
|
+ description
|
|
+ ", fieldsForThisCategory="
|
|
+ (fieldsForThisCategory != null ? fieldsForThisCategory
|
|
.subList(0,
|
|
Math.min(fieldsForThisCategory.size(), maxLen))
|
|
: null) + "]";
|
|
}
|
|
}
|