Interface Event
-
- All Superinterfaces:
Comparable<Event>,Element,ModelElement,Property,PropertyElement,SchemaMixedElement,Serializable
- All Known Implementing Classes:
EventImpl
@TypeMetadata(name="Event", description="This type provides information regarding an event using the Five Ws (checklist) https://en.wikipedia.org/wiki/Five_Ws", version="1.0.0") @Change(version="1.0.0", description="First Version") public interface Event extends Property, Comparable<Event>
A property type that describes an event using the "Five Ws" checklist (What, When, Who, Where, Why) and "How".This provides a structured way to record information about significant occurrences. For more details, see the Five Ws on Wikipedia.
- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
Property
-
-
Field Summary
Fields Modifier and Type Field Description static StringHOW_PROPERTYThe property name for how the event occurred.static StringNAMEThe name of the Event property type.static StringWHAT_PROPERTYThe property name for what happened.static StringWHEN_PROPERTYThe property name for when the event occurred.static StringWHERE_PROPERTYThe property name for where the event occurred.static StringWHO_PROPERTYThe property name for who triggered the event.static StringWHY_PROPERTYThe property name for why the event occurred.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetHow()Returns how the event occurred.StringgetWhat()Returns a description of what happened.DategetWhen()Returns when the event occurred.StringgetWhere()Returns where the event occurred.StringgetWho()Returns who triggered the event.StringgetWhy()Returns the reason why the event occurred.voidsetHow(String how)Sets how the event occurred.voidsetWhat(String what)Sets the description of what happened.voidsetWhen(Date when)Sets when the event occurred.voidsetWhere(String where)Sets where the event occurred.voidsetWho(String who)Sets who triggered the event.voidsetWhy(String why)Sets the reason why the event occurred.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypes
-
Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name of the Event property type.- See Also:
- Constant Field Values
-
WHAT_PROPERTY
static final String WHAT_PROPERTY
The property name for what happened.- See Also:
- Constant Field Values
-
WHEN_PROPERTY
static final String WHEN_PROPERTY
The property name for when the event occurred.- See Also:
- Constant Field Values
-
WHO_PROPERTY
static final String WHO_PROPERTY
The property name for who triggered the event.- See Also:
- Constant Field Values
-
WHERE_PROPERTY
static final String WHERE_PROPERTY
The property name for where the event occurred.- See Also:
- Constant Field Values
-
WHY_PROPERTY
static final String WHY_PROPERTY
The property name for why the event occurred.- See Also:
- Constant Field Values
-
HOW_PROPERTY
static final String HOW_PROPERTY
The property name for how the event occurred.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWhat
@ISProperty(name="what", description="WHAT happened.", readonly=true, mandatory=true, nullable=false) String getWhat()
Returns a description of what happened.- Returns:
- The event description.
-
setWhat
void setWhat(String what)
Sets the description of what happened.- Parameters:
what- The event description.
-
getWhen
@ISProperty(name="when", description="WHEN the event occured. It is represented in the format yyyy-MM-dd HH:mm:ss.SSS Z.", readonly=true, mandatory=true, nullable=false) Date getWhen()
Returns when the event occurred.- Returns:
- The date and time of the event.
-
setWhen
void setWhen(Date when)
Sets when the event occurred.- Parameters:
when- The date and time of the event.
-
getWho
@ISProperty(name="who", description="WHO triggered the event.", readonly=true, mandatory=false, nullable=false) String getWho()
Returns who triggered the event.- Returns:
- The identifier of the actor.
-
setWho
void setWho(String who)
Sets who triggered the event.- Parameters:
who- The identifier of the actor.
-
getWhere
@ISProperty(name="where", description="The location (can be virtual) WHERE the event occurred.", readonly=true, mandatory=false, nullable=false) String getWhere()
Returns where the event occurred.- Returns:
- The location (physical or virtual).
-
setWhere
void setWhere(String where)
Sets where the event occurred.- Parameters:
where- The location.
-
getWhy
@ISProperty(name="why", description="The reason WHY the event occurred.", readonly=true, mandatory=false, nullable=false) String getWhy()
Returns the reason why the event occurred.- Returns:
- The reason.
-
setWhy
void setWhy(String why)
Sets the reason why the event occurred.- Parameters:
why- The reason.
-
getHow
@ISProperty(name="how", description="How the event occurred.", readonly=true, mandatory=false, nullable=false) String getHow()
Returns how the event occurred.- Returns:
- The manner in which the event occurred.
-
setHow
void setHow(String how)
Sets how the event occurred.- Parameters:
how- The manner in which the event occurred.
-
-