metadata-profile-form-build.../src/main/java/org/gcube/portlets/widgets/mpformbuilder/shared/metadata/MetaDataProfileBean.java

144 lines
2.7 KiB
Java

package org.gcube.portlets.widgets.mpformbuilder.shared.metadata;
import java.io.Serializable;
import java.util.List;
/**
* The Class MetaDataProfileBean.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Mar 3, 2022
*/
public class MetaDataProfileBean implements Serializable{
/**
*
*/
private static final long serialVersionUID = -8307518917648131477L;
private String type;
private String title;
private List<CategoryWrapper> categories;
private List<MetadataFieldWrapper> metadataFields;
/**
* Instantiates a new meta data profile bean.
*/
public MetaDataProfileBean(){
super();
}
/**
* Instantiates a new meta data profile bean.
*
* @param type the type
* @param title the title
* @param metadataFields the metadata fields
* @param categories the categories
*/
public MetaDataProfileBean(String type,
String title,
List<MetadataFieldWrapper> metadataFields,
List<CategoryWrapper> categories) {
super();
this.type = type;
this.title = title;
this.categories = categories;
this.metadataFields = metadataFields;
}
/**
* Gets the type.
*
* @return the type
*/
public String getType() {
return type;
}
/**
* Sets the type.
*
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* Gets the metadata fields.
*
* @return the metadataFields
*/
public List<MetadataFieldWrapper> getMetadataFields() {
return metadataFields;
}
/**
* Sets the metadata fields.
*
* @param metadataFields the metadataFields to set
*/
public void setMetadataFields(List<MetadataFieldWrapper> metadataFields) {
this.metadataFields = metadataFields;
}
/**
* Gets the categories.
*
* @return the categories
*/
public List<CategoryWrapper> getCategories() {
return categories;
}
/**
* Sets the categories.
*
* @param categories the new categories
*/
public void setCategories(List<CategoryWrapper> categories) {
this.categories = categories;
}
/**
* Gets the title.
*
* @return the title
*/
public String getTitle() {
return title;
}
/**
* Sets the title.
*
* @param title the new title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* To string.
*
* @return the string
*/
@Override
public String toString() {
final int maxLen = 10;
return "MetaDataProfileBean [type="
+ type
+ ", title="
+ title
+ ", categories="
+ (categories != null ? categories.subList(0,
Math.min(categories.size(), maxLen)) : null)
+ ", metadataFields="
+ (metadataFields != null ? metadataFields.subList(0,
Math.min(metadataFields.size(), maxLen)) : null) + "]";
}
}