class Event{ String ^id String title String summary String location String description LocalDateTime start LocalDateTime end LocalDateTime created LocalDateTime lastModified String status String source } type LocalDateTime wraps LocalDateTime create{ LocalDateTime.parse(it, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) }convert{ if( it !== null ) DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(it) }
[Event returns Event: {Event} 'Event' '(' ('start' start=LocalDateTime)? ('end' end=LocalDateTime)? ('title' title=EString)? ('location' location=EString)? ')'; EIntegerObject returns ecore::EIntegerObject: '-'? INT; LocalDateTime returns LocalDateTime: 'LocalDateTime' /* TODO: implement this rule and an appropriate IValueConverter */;