information-system-model/src/main/java/org/gcube/informationsystem/types/impl/entities/FacetTypeImpl.java

48 lines
1.3 KiB
Java
Raw Normal View History

2020-01-20 10:24:55 +01:00
package org.gcube.informationsystem.types.impl.entities;
2020-02-03 10:51:29 +01:00
import java.util.Set;
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
2020-07-07 17:04:25 +02:00
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName;
import org.gcube.informationsystem.base.reference.AccessType;
2020-01-20 10:24:55 +01:00
import org.gcube.informationsystem.model.reference.entities.Entity;
import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.reference.entities.FacetType;
2020-02-03 10:51:29 +01:00
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
2020-01-20 10:24:55 +01:00
2020-01-23 17:14:44 +01:00
/**
* @author Luca Frosini (ISTI - CNR)
*/
@JsonTypeName(value=FacetType.NAME)
public final class FacetTypeImpl extends EntityTypeImpl implements FacetType {
2020-01-20 10:24:55 +01:00
/**
* Generated Serial Version UID
*/
private static final long serialVersionUID = 6268161046955738969L;
2020-02-03 10:51:29 +01:00
protected Set<PropertyDefinition> properties;
protected FacetTypeImpl() {
2020-01-20 10:24:55 +01:00
super();
}
public FacetTypeImpl(Class<? extends Facet> clz) {
2020-01-20 10:24:55 +01:00
super(clz);
2023-05-12 17:47:58 +02:00
this.extendedTypes = retrieveSuperClasses(clz, Facet.class, Entity.NAME);
2020-02-03 10:51:29 +01:00
this.properties = retrieveListOfProperties(clz);
}
@Override
public Set<PropertyDefinition> getProperties() {
return properties;
2020-01-20 10:24:55 +01:00
}
@Override
@JsonIgnore
public AccessType getAccessType() {
return AccessType.FACET;
}
2020-01-20 10:24:55 +01:00
}