Period CISE Core Vocabulary Specification

Table of Contents

Model Element Type
PeriodClass

UML Conceptual Model



Elements defined in the Core Vocabulary

Period Datatype

The class Period is used to define a time interval which can be expressed by:

  • only a duration (i.e. one month),
  • a duration and a start (resp. end) date [ex.: a period of ten days starting (resp. ending) on December 10th, 2002], in this case the period is assumed to start (resp. end) on December 10th at 0:00 (resp. 23:59).
  • a duration and a start (resp. end) time [ex.: a period of ten days starting (resp. ending) at 10am],
  • a duration and start (resp. end) date and time (ex.: a period of ten days starting (resp. ending) on December 10th, 2002, 10am),
  • a start Date and an end Date (ex.: December 3rd, 2002 & January 24th 2010),
  • a start Time and an end Time (ex.: 9am and 10pm),
  • a start date and start time following by an end date and end time (ex.: December 3rd, 2002 at 10pm and January 24th, 2010 at 9am).

Attributes for Period

UML Name Data type Description Example
Duration XSD::Duration

The Duration attribute is used to define a time interval. It is from the standard XML schema Duration type (XSD:Duration).

The time interval is specified in the following form "PnYnMnDTnHnMnS" where:

•P indicates the period (required)

•nY indicates the number of years

•nM indicates the number of months

•nD indicates the number of days

•T indicates the start of a time section (required if you are going to specify hours, minutes, or seconds)

•nH indicates the number of hours

•nM indicates the number of minutes

•nS indicates the number of seconds.

To specify a negative duration, enter a minus sign before the P.

“P5Y” for a period of five years.

“PT15H” for a period of 15 hours.

“-P10D” for a period of -10 days (useful when combined to an End Date.

EndDate XSD::Date

The EndDate attribute is used to specify the end date of something located in time. It is from the standard XML Schema Date type (XSD:Date).

2002-09-24

EndTime XSD::Time

The EndTime attribute is used to specify the end time of something located in time. It is from the standard XML Schema Time type (XSD:Time).

09:00:00

StartDate XSD::Date

The StartDate attribute is used to specify a starting date. It is from the standard XML Schema Date type (XSD:Date).

The start date is specified in the following form "YYYY-MM-DD" where:

•YYYY indicates the year

•MM indicates the month

•DD indicates the day

Note: All components are required!

2002-09-24

StartTime XSD::Time

The StartTime attribute is used to specify a starting time. . It is from the standard XML Schema Time type (XSD:Time).

The time is specified in the following form "hh:mm:ss" where:

•hh indicates the hour

•mm indicates the minute

•ss indicates the second

Note: All components are required!

09:00:00

Constraints for Period

Name Description OCL constraint
Coherent Duration

StartDate + StartTime plus Duration equals EndDate + Endtime

context Period::Duration(): Float

post: result = self.EndDate + self.EndTime - (self.StartDate + self.StartTime)

Earlier EndDate

EndDate can not be earlier than StartDate

context Period

inv: self.EndDate.DateTimeAsFloat > self.StartDate.DateTimeAsFloat

Earlier EndTime

EndTime can not be earlier than StartTime

context Period

inv: self.EndTime > self.StartTime

Mandatory Fields

StartDate or EndDate or Duration must be filled

context: Period

inv: ( self.StartDate.isNull=true and self.EndDate.isNull=true and self.Duration.isNull=true ) = false