Interface ModelElement
-
- All Superinterfaces:
Element,Serializable
- All Known Subinterfaces:
ConsistsOf<S,T>,Encrypted,Entity,ERElement,Event,Facet,IsRelatedTo<S,T>,Metadata,PropagationConstraint,Property,QueryTemplateReference,Relation<S,T>,Resource
- All Known Implementing Classes:
ConsistsOfImpl,DummyFacet,DummyIsRelatedTo,DummyResource,EncryptedImpl,EntityImpl,EventImpl,FacetImpl,IsRelatedToImpl,LinkedEntityImpl,MetadataImpl,PropagationConstraintImpl,PropertyElementImpl,PropertyImpl,QueryTemplateReferenceImpl,RelationImpl,ResourceImpl,TemplateVariableImpl
public interface ModelElement extends Element
A base interface for elements that are part of the core Information System model.This interface provides support for type hierarchies by including properties for supertypes and the expected type during deserialization.
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXPECTED_TYPE_PROPERTYThe property name used by the deserializer to indicate the originally expected type when a more generic supertype had to be used for deserialization.static StringSUPERTYPES_PROPERTYThe property name for the list of supertypes of the element.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetExpectedtype()Returns the name of the expected type.List<String>getSupertypes()Returns the list of supertypes for this element.-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
-
-
-
Field Detail
-
SUPERTYPES_PROPERTY
static final String SUPERTYPES_PROPERTY
The property name for the list of supertypes of the element.- See Also:
- Constant Field Values
-
EXPECTED_TYPE_PROPERTY
static final String EXPECTED_TYPE_PROPERTY
The property name used by the deserializer to indicate the originally expected type when a more generic supertype had to be used for deserialization.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupertypes
List<String> getSupertypes()
Returns the list of supertypes for this element.This list is included in JSON serialization only if it is not empty.
- Returns:
- A
Listof supertype names.
-
getExpectedtype
String getExpectedtype()
Returns the name of the expected type.This is used during deserialization to indicate the original type when a fallback to a supertype was necessary. It is included in JSON serialization only if it is not empty.
- Returns:
- The expected type name.
-
-