Class ContextImpl
- java.lang.Object
-
- org.gcube.informationsystem.base.impl.ElementImpl
-
- org.gcube.informationsystem.base.impl.entities.EntityElementImpl
-
- org.gcube.informationsystem.contexts.impl.entities.ContextImpl
-
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,Context
public final class ContextImpl extends EntityElementImpl implements Context
- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<IsParentOf>childrenprotected Stringnameprotected IsParentOfparentprotected UUIDuuid-
Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
metadata
-
Fields inherited from interface org.gcube.informationsystem.contexts.reference.entities.Context
CHILDREN_PROPERTY, NAME, NAME_PROPERTY, PARENT_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
NAME
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedContextImpl()ContextImpl(String name)ContextImpl(String name, UUID uuid)ContextImpl(UUID uuid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(UUID uuid)voidaddChild(Context child)voidaddChild(IsParentOf isParentOf)protected voidaddChildFromJson(IsParentOf isParentOf)List<IsParentOf>getChildren()UUIDgetID()StringgetName()IsParentOfgetParent()protected voidsetChildrenFromJson(List<IsParentOf> children)voidsetID(UUID uuid)voidsetName(String name)voidsetParent(UUID uuid)voidsetParent(Context context)voidsetParent(IsParentOf isParentOf)protected voidsetParentFromJson(IsParentOf isParentOf)-
Methods inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
getMetadata, setMetadata, toString
-
Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getMetadata, setMetadata
-
-
-
-
Field Detail
-
uuid
protected UUID uuid
-
name
protected String name
-
parent
protected IsParentOf parent
-
children
protected List<IsParentOf> children
-
-
Method Detail
-
getID
public UUID getID()
- Specified by:
getIDin interfaceEntityElement- Specified by:
getIDin interfaceIdentifiableElement- Overrides:
getIDin classEntityElementImpl- Returns:
- the uuid
-
setID
public void setID(UUID uuid)
- Specified by:
setIDin interfaceEntityElement- Specified by:
setIDin interfaceIdentifiableElement- Overrides:
setIDin classEntityElementImpl
-
getParent
public IsParentOf getParent()
-
setParentFromJson
protected void setParentFromJson(IsParentOf isParentOf) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException
- Throws:
org.gcube.com.fasterxml.jackson.core.JsonProcessingException
-
setParent
public void setParent(IsParentOf isParentOf)
-
getChildren
public List<IsParentOf> getChildren()
- Specified by:
getChildrenin interfaceContext
-
setChildrenFromJson
protected void setChildrenFromJson(List<IsParentOf> children) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException
- Throws:
org.gcube.com.fasterxml.jackson.core.JsonProcessingException
-
addChildFromJson
protected void addChildFromJson(IsParentOf isParentOf) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException
- Throws:
org.gcube.com.fasterxml.jackson.core.JsonProcessingException
-
addChild
public void addChild(IsParentOf isParentOf)
-
-