Class FacetImpl
- java.lang.Object
-
- org.gcube.informationsystem.base.impl.ElementImpl
-
- org.gcube.informationsystem.base.impl.entities.EntityElementImpl
-
- org.gcube.informationsystem.model.impl.entities.EntityImpl
-
- org.gcube.informationsystem.model.impl.entities.FacetImpl
-
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,SchemaMixedElement,Entity,Facet,ERElement,ModelElement
- Direct Known Subclasses:
DummyFacet
public abstract class FacetImpl extends EntityImpl implements Facet
The default abstract implementation of theFacetinterface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>additionalPropertiesAdditional properties of the facet.protected Set<String>allowedAdditionalKeysA set of keys that are allowed as additional properties, even if they start with '_' or '@'.-
Fields inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl
contexts, expectedtype, supertypes
-
Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
metadata, uuid
-
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.model.reference.ERElement
CONTEXTS_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFacetImpl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllowedAdditionalKey(String allowedAdditionalKey)Adds a key to the set of allowed additional keys.Map<String,Object>getAdditionalProperties()Returns a map of all additional properties not defined in the schema.ObjectgetAdditionalProperty(String key)Retrieves a single additional property by its key.voidsetAdditionalProperties(Map<String,Object> additionalProperties)Sets the map of additional properties for the element.voidsetAdditionalProperty(String key, Object value)Sets a single additional property.-
Methods inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl
getContexts, getExpectedtype, getSupertypes, setContexts
-
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
-
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
getID, getMetadata, setID, setMetadata
-
Methods inherited from interface org.gcube.informationsystem.model.reference.ERElement
getContexts
-
Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypes
-
-
-
-
Method Detail
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
Returns a map of all additional properties not defined in the schema.This method allows retrieving all additional properties of the facet that are not part of its defined schema.
- Specified by:
getAdditionalPropertiesin interfaceFacet- Specified by:
getAdditionalPropertiesin interfaceSchemaMixedElement- Returns:
- A
Mapcontaining the additional properties, where the key is the property name and the value is the property value.
-
setAdditionalProperties
public void setAdditionalProperties(Map<String,Object> additionalProperties)
Sets the map of additional properties for the element.- Specified by:
setAdditionalPropertiesin interfaceFacet- Specified by:
setAdditionalPropertiesin interfaceSchemaMixedElement- Parameters:
additionalProperties- AMapof additional properties.
-
getAdditionalProperty
public Object getAdditionalProperty(String key)
Retrieves a single additional property by its key.- Specified by:
getAdditionalPropertyin interfaceFacet- Specified by:
getAdditionalPropertyin interfaceSchemaMixedElement- Parameters:
key- The name of the additional property to retrieve.- Returns:
- The value of the property, or
nullif the key is not found.
-
setAdditionalProperty
public void setAdditionalProperty(String key, Object value)
Sets a single additional property.This method allows setting additional properties on the facet that are not part of its defined schema.
- Specified by:
setAdditionalPropertyin interfaceFacet- Specified by:
setAdditionalPropertyin interfaceSchemaMixedElement- Parameters:
key- The name of the additional property.value- The value of the additional property.
-
addAllowedAdditionalKey
public void addAllowedAdditionalKey(String allowedAdditionalKey)
Adds a key to the set of allowed additional keys.- Parameters:
allowedAdditionalKey- The key to add.
-
-