Class GCubeContext
- java.lang.Object
-
- org.gcube.informationsystem.base.impl.ElementImpl
-
- org.gcube.informationsystem.base.impl.entities.EntityElementImpl
-
- org.gcube.informationsystem.contexts.impl.entities.ContextImpl
-
- org.gcube.resourcemanagement.contexts.impl.entities.GCubeContext
-
- All Implemented Interfaces:
Serializable,org.gcube.informationsystem.base.reference.Element,org.gcube.informationsystem.base.reference.entities.EntityElement,org.gcube.informationsystem.base.reference.IdentifiableElement,org.gcube.informationsystem.base.reference.SchemaMixedElement,org.gcube.informationsystem.contexts.reference.entities.Context
public class GCubeContext extends org.gcube.informationsystem.contexts.impl.entities.ContextImplExtension of Context specific for gCube Resource Management It contains additional properties like events, information, key, availableAt- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringAVAILABLE_AT_PROPERTY{ ...protected List<String>availableAtThe list of availableAt URLsprotected SortedSet<org.gcube.informationsystem.model.reference.properties.Event>eventsThe events occurred to the Contextstatic StringEVENTS_PROPERTYThe events occurred to the Contexts.protected BasicInformationinformationThe basic information for the contextstatic StringINFORMATION_PROPERTYIt contains the basic information for the contextprotected StringkeyThe symmetric key for the contextstatic StringKEY_PROPERTYThis information is provided to allowed user only (by role) The symmetric key for the context-
Fields inherited from class org.gcube.informationsystem.contexts.impl.entities.ContextImpl
additionalProperties, allowedAdditionalKeys, children, name, parent, state
-
Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
metadata, uuid
-
Fields inherited from interface org.gcube.informationsystem.contexts.reference.entities.Context
CHILDREN_PROPERTY, NAME, NAME_PROPERTY, PARENT_PROPERTY, STATE
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGCubeContext()Default constructorGCubeContext(String name)Constructs a GCubeContext with the given nameGCubeContext(String name, UUID uuid)Constructs a GCubeContext with the given name and UUIDGCubeContext(UUID uuid)Constructs a GCubeContext with the given UUIDGCubeContext(org.gcube.informationsystem.contexts.reference.entities.Context c)Constructs a GCubeContext from a Context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(org.gcube.informationsystem.model.reference.properties.Event event)Adds an event to the Context.List<String>getAvailableAt()Gets the list of availableAt URLsSortedSet<org.gcube.informationsystem.model.reference.properties.Event>getEvents()Sets the events occurred to the ContextBasicInformationgetInformation()Gets the basic information for the contextStringgetKey()Gets the symmetric key for the contextvoidsetAvailableAt(List<String> availableAt)Sets the list of availableAt URLsvoidsetEvents(SortedSet<org.gcube.informationsystem.model.reference.properties.Event> events)Sets the events occurred to the ContextvoidsetInformation(BasicInformation information)Sets the basic information for the contextvoidsetKey(String key)Sets the symmetric key for the context-
Methods inherited from class org.gcube.informationsystem.contexts.impl.entities.ContextImpl
addChild, addChild, addChild, addChildFromJson, getAdditionalProperties, getAdditionalProperty, getChildren, getName, getParent, getState, setAdditionalProperties, setAdditionalProperty, setChildrenFromJson, setName, setParent, setParent, setParent, setParentFromJson, setState
-
Methods inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
getID, getMetadata, setID, setMetadata
-
Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toString
-
-
-
-
Field Detail
-
EVENTS_PROPERTY
public static final String EVENTS_PROPERTY
The events occurred to the Contexts. creation, renaming, parent change. Some of the event are managed by the resource-registry. Others can be added by an authorized client. This create a sort of journal. See #27707- See Also:
- Constant Field Values
-
INFORMATION_PROPERTY
public static final String INFORMATION_PROPERTY
It contains the basic information for the context- See Also:
- Constant Field Values
-
KEY_PROPERTY
public static final String KEY_PROPERTY
This information is provided to allowed user only (by role) The symmetric key for the context- See Also:
- Constant Field Values
-
AVAILABLE_AT_PROPERTY
public static final String AVAILABLE_AT_PROPERTY
{ ... "availableAt" : [ "https://i-marine.d4science.org/group/alienandinvasivespecies", "https://services.d4science.org/group/alienandinvasivespecies" ] ... } For non VRE context this field could be null or could have multiple value. For VRE it is normally one value only (but some exception could exists)- See Also:
- Constant Field Values
-
events
protected SortedSet<org.gcube.informationsystem.model.reference.properties.Event> events
The events occurred to the Context
-
information
protected BasicInformation information
The basic information for the context
-
key
protected String key
The symmetric key for the context
-
-
Constructor Detail
-
GCubeContext
public GCubeContext(org.gcube.informationsystem.contexts.reference.entities.Context c)
Constructs a GCubeContext from a Context- Parameters:
c- the Context
-
GCubeContext
protected GCubeContext()
Default constructor
-
GCubeContext
public GCubeContext(UUID uuid)
Constructs a GCubeContext with the given UUID- Parameters:
uuid- the UUID
-
GCubeContext
public GCubeContext(String name)
Constructs a GCubeContext with the given name- Parameters:
name- the name
-
-
Method Detail
-
getEvents
public SortedSet<org.gcube.informationsystem.model.reference.properties.Event> getEvents()
Sets the events occurred to the Context- Returns:
- the events
-
setEvents
public void setEvents(SortedSet<org.gcube.informationsystem.model.reference.properties.Event> events)
Sets the events occurred to the Context- Parameters:
events- the events to set
-
addEvent
public void addEvent(org.gcube.informationsystem.model.reference.properties.Event event)
Adds an event to the Context. creation, renaming, parent change. Some of the event are managed by the resource-registry. Others can be added by an authorized client. This create a sort of journal. See #27707- Parameters:
event- the event to add
-
getInformation
public BasicInformation getInformation()
Gets the basic information for the context- Returns:
- the information
-
setInformation
public void setInformation(BasicInformation information)
Sets the basic information for the context- Parameters:
information- the information to set
-
getKey
public String getKey()
Gets the symmetric key for the context- Returns:
- the key
-
setKey
public void setKey(String key)
Sets the symmetric key for the context- Parameters:
key- the key to set
-
getAvailableAt
public List<String> getAvailableAt()
Gets the list of availableAt URLs- Returns:
- the availableAt
-
-