61 lines
1.8 KiB
Java
61 lines
1.8 KiB
Java
|
/**
|
||
|
*
|
||
|
*/
|
||
|
package org.gcube.informationsystem.model.reference.entities;
|
||
|
|
||
|
import java.util.List;
|
||
|
import java.util.UUID;
|
||
|
|
||
|
import org.gcube.informationsystem.model.impl.entities.ContextImpl;
|
||
|
import org.gcube.informationsystem.model.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 Entity {
|
||
|
|
||
|
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<Context, Context> getParent();
|
||
|
|
||
|
@JsonIgnore
|
||
|
public void setParent(UUID uuid);
|
||
|
|
||
|
@JsonIgnore
|
||
|
public void setParent(Context context);
|
||
|
|
||
|
@JsonIgnore
|
||
|
public void setParent(IsParentOf<Context, Context> isParentOf);
|
||
|
|
||
|
@JsonGetter
|
||
|
@JsonIgnoreProperties({ Relation.SOURCE_PROPERTY })
|
||
|
public List<IsParentOf<Context, Context>> getChildren();
|
||
|
|
||
|
public void addChild(UUID uuid);
|
||
|
|
||
|
public void addChild(Context child);
|
||
|
|
||
|
public void addChild(IsParentOf<Context, Context> isParentOf);
|
||
|
|
||
|
}
|