62 lines
1.8 KiB
Java
62 lines
1.8 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.informationsystem.context.reference.entities;
|
|
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
import org.gcube.informationsystem.base.reference.entities.BaseEntity;
|
|
import org.gcube.informationsystem.context.impl.entities.ContextImpl;
|
|
import org.gcube.informationsystem.context.reference.relations.IsParentOf;
|
|
import org.gcube.informationsystem.model.reference.relations.Relation;
|
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonGetter;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR) This Entity is for internal use only
|
|
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Context
|
|
*/
|
|
@JsonDeserialize(as = ContextImpl.class)
|
|
public interface Context extends BaseEntity {
|
|
|
|
public static final String NAME = "Context"; // Context.class.getSimpleName();
|
|
|
|
public static final String NAME_PROPERTY = "name";
|
|
public static final String PARENT_PROPERTY = "parent";
|
|
public static final String CHILDREN_PROPERTY = "children";
|
|
|
|
@ISProperty(name = NAME_PROPERTY, mandatory = true, nullable = false)
|
|
public String getName();
|
|
|
|
public void setName(String name);
|
|
|
|
@JsonGetter
|
|
@JsonIgnoreProperties({ Relation.TARGET_PROPERTY })
|
|
public IsParentOf getParent();
|
|
|
|
@JsonIgnore
|
|
public void setParent(UUID uuid);
|
|
|
|
@JsonIgnore
|
|
public void setParent(Context context);
|
|
|
|
@JsonIgnore
|
|
public void setParent(IsParentOf isParentOf);
|
|
|
|
@JsonGetter
|
|
@JsonIgnoreProperties({ Relation.SOURCE_PROPERTY })
|
|
public List<IsParentOf> getChildren();
|
|
|
|
public void addChild(UUID uuid);
|
|
|
|
public void addChild(Context child);
|
|
|
|
public void addChild(IsParentOf isParentOf);
|
|
|
|
}
|