Class Instance
java.lang.Object
org.gcube.resourcemanagement.resource.Instance
- All Implemented Interfaces:
Comparable<Instance>
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<org.gcube.informationsystem.model.reference.ERElement>The elements that have been added to the context.protected Set<DerivatedRelatedResourceGroup<Instance>>protected UUIDUUID of the instanceprotected org.gcube.com.fasterxml.jackson.databind.ObjectMapperprotected List<org.gcube.informationsystem.base.reference.IdentifiableElement>Properties which describe the instance.protected StringThe type of the instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddedElement(org.gcube.informationsystem.model.reference.ERElement addedElement) voidaddAddedElements(List<org.gcube.informationsystem.model.reference.ERElement> addedElements) voidaddAddedElements(org.gcube.informationsystem.model.reference.ERElement... addedElements) voidaddDerivatedRelatedResource(DerivatedRelatedResourceGroup<Instance> derivatedRelatedResource) voidaddDerivatedRelatedResources(Set<DerivatedRelatedResourceGroup<Instance>> derivatedRelatedResources) voidaddMandatoryRelatedResource(Instance instance) voidaddMandatoryRelatedResources(Set<Instance> instances) voidaddNewInstance(org.gcube.informationsystem.base.reference.IdentifiableElement newInstance) voidaddNewInstances(List<org.gcube.informationsystem.base.reference.IdentifiableElement> newInstances) voidaddProperty(String key, org.gcube.com.fasterxml.jackson.databind.JsonNode value) intbooleanList<org.gcube.informationsystem.model.reference.ERElement>All the ERElement added as result of addToContext The added element are got from the return of the addToContext operation from the resource registry.getAsInstances(Class<I> iClass, Collection<org.gcube.informationsystem.model.reference.entities.Resource> resources) getAsInstances(Class<I> iClass, org.gcube.informationsystem.model.reference.entities.Resource... resources) getID()List<org.gcube.informationsystem.base.reference.IdentifiableElement>getType()inthashCode()voidsetAddedElements(List<org.gcube.informationsystem.model.reference.ERElement> addedElements) voidsetDerivatedRelatedResources(Set<DerivatedRelatedResourceGroup<Instance>> derivatedRelatedResources) voidprotected abstract voidsetIdentifingProperties(org.gcube.informationsystem.model.reference.entities.Resource r) voidsetMandatoryRelatedResources(Set<Instance> mandatoryRelatedResources) voidsetNewInstances(List<org.gcube.informationsystem.base.reference.IdentifiableElement> newInstances) voidsetProperties(Map<String, org.gcube.com.fasterxml.jackson.databind.JsonNode> properties) voidsetResource(org.gcube.informationsystem.model.reference.entities.Resource r) voidtoString()
-
Field Details
-
excludedFacetKeys
-
mapper
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper mapper -
id
UUID of the instance -
type
The type of the instance -
properties
Properties which describe the instance. For example for any GCubeResource all the properties of the Facet which identify the instance. e.g. EService -- isIdentifiedBy --> SoftwareFacet All the properties (mandatory or not) defined in the SoftwareFacet instance identifiyng the EService -
mandatoryRelatedResources
-
derivatedRelatedResources
-
newInstances
-
addedElements
The elements that have been added to the context. It is used to keep track of the elements that have been added to the context to inform the clinet of the result of add to context. It is not used when we read an instace ofr add to context operation.
-
-
Constructor Details
-
Instance
public Instance()
-
-
Method Details
-
getAsInstances
public static <I extends Instance> Set<I> getAsInstances(Class<I> iClass, Collection<org.gcube.informationsystem.model.reference.entities.Resource> resources) throws jakarta.ws.rs.WebApplicationException - Throws:
jakarta.ws.rs.WebApplicationException
-
getAsInstances
public static <I extends Instance> Set<I> getAsInstances(Class<I> iClass, org.gcube.informationsystem.model.reference.entities.Resource... resources) throws jakarta.ws.rs.WebApplicationException - Throws:
jakarta.ws.rs.WebApplicationException
-
setIdentifingProperties
protected abstract void setIdentifingProperties(org.gcube.informationsystem.model.reference.entities.Resource r) throws jakarta.ws.rs.WebApplicationException - Throws:
jakarta.ws.rs.WebApplicationException
-
setResource
public void setResource(org.gcube.informationsystem.model.reference.entities.Resource r) throws jakarta.ws.rs.WebApplicationException - Throws:
jakarta.ws.rs.WebApplicationException
-
getID
-
setID
-
getType
-
setType
-
getProperties
-
setProperties
-
addProperty
-
getMandatoryRelatedResources
-
setMandatoryRelatedResources
-
addMandatoryRelatedResource
-
addMandatoryRelatedResources
-
getDerivatedRelatedResources
-
setDerivatedRelatedResources
public void setDerivatedRelatedResources(Set<DerivatedRelatedResourceGroup<Instance>> derivatedRelatedResources) -
addDerivatedRelatedResource
public void addDerivatedRelatedResource(DerivatedRelatedResourceGroup<Instance> derivatedRelatedResource) -
addDerivatedRelatedResources
public void addDerivatedRelatedResources(Set<DerivatedRelatedResourceGroup<Instance>> derivatedRelatedResources) -
getNewInstances
-
setNewInstances
public void setNewInstances(List<org.gcube.informationsystem.base.reference.IdentifiableElement> newInstances) -
addNewInstance
public void addNewInstance(org.gcube.informationsystem.base.reference.IdentifiableElement newInstance) -
addNewInstances
public void addNewInstances(List<org.gcube.informationsystem.base.reference.IdentifiableElement> newInstances) -
toString
-
getAddedElements
All the ERElement added as result of addToContext The added element are got from the return of the addToContext operation from the resource registry.- Returns:
-
setAddedElements
public void setAddedElements(List<org.gcube.informationsystem.model.reference.ERElement> addedElements) -
addAddedElement
public void addAddedElement(org.gcube.informationsystem.model.reference.ERElement addedElement) -
addAddedElements
public void addAddedElements(List<org.gcube.informationsystem.model.reference.ERElement> addedElements) -
addAddedElements
public void addAddedElements(org.gcube.informationsystem.model.reference.ERElement... addedElements) -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Instance>
-