/* Core section of the domain * * @author Pedro Santos (pedro.miguel.santos@ist.utl.pt) * @version $Id$ */ valueType org.joda.time.DateTime as DateTime; valueType org.joda.time.DateMidnight as DateMidnight; valueType org.joda.time.Interval as Interval; valueType org.joda.time.Duration as Duration; valueType org.joda.time.Period as Period; package pt.utl.ist.paws.domain; /////////////////////////////////////////////////////////////////////////////// // Core Section enum IterationType; enum WorkItemType; enum WorkItemSubType; class core.PawsRepository { } class core.Person { String username (REQUIRED); String password (REQUIRED); String name (REQUIRED); String email; } class core.Role { String name (REQUIRED); } relation PersonRoles { core.Person playsRole person { multiplicity *; } core.Role playsRole role; } class core.WorkDefinition { String name (REQUIRED); String description; DateTime creation (REQUIRED); DateTime lastChange (REQUIRED); } relation WorkDefinitionOwnership { core.WorkDefinition playsRole owned { multiplicity *; } core.Person playsRole owner; } class core.Comment { String text (REQUIRED); DateTime publication (REQUIRED); } class core.CommentReply extends core.Comment; relation RegisteredUsers { core.PawsRepository playsRole pawsRepository; core.Person playsRole person { multiplicity *; } } relation CommentedWorkDefinitions { core.WorkDefinition playsRole commented; core.Comment playsRole comment { multiplicity *; } } relation CommentReplies { core.Comment playsRole replied; core.CommentReply playsRole reply { multiplicity *; } } relation PersonComments { core.Person playsRole writer; core.Comment playsRole comment { multiplicity *; } } class core.Project extends core.WorkDefinition { Interval timespan (REQUIRED); } relation Projects { core.PawsRepository playsRole pawsRepository; core.Project playsRole project { multiplicity *; } } class core.Team extends core.WorkDefinition; class core.Iteration extends core.WorkDefinition { Interval timespan (REQUIRED); IterationType type (REQUIRED); } class core.WorkItem extends core.WorkDefinition { WorkItemType type; WorkItemSubType subType; } class core.Theme extends core.WorkDefinition; relation ProjectTeams { core.Project playsRole project; core.Team playsRole team { multiplicity *; } } relation TeamMembers { core.Team playsRole team; core.Person playsRole member { multiplicity *; } } relation TeamIterations { core.Team playsRole team; core.Iteration playsRole iteration { multiplicity *; } } relation IterationComposite { core.Iteration playsRole parent; core.Iteration playsRole child { multiplicity *; } } relation ProjectWorkItems { core.Project playsRole project; core.WorkItem playsRole workItem { multiplicity *; } } relation ProjectThemes { core.Project playsRole project; core.Theme playsRole theme { multiplicity *; } } /////////////////////////////////////////////////////////////////////////////// // Properties Section enum Priority; enum Value; enum Risk; class properties.MetaProperty { String name; String clazz; } class properties.Property; relation PropertyMetaInfo { properties.MetaProperty playsRole meta; properties.Property playsRole property { multiplicity *; } } class properties.StringProperty extends properties.Property { String value; } class properties.InstantProperty extends properties.Property { DateTime value; } class properties.PriorityProperty extends properties.Property { Priority value; } class properties.ValueProperty extends properties.Property { Value value; } class properties.RiskProperty extends properties.Property { Risk value; } class properties.ThemeProperty extends properties.Property; relation ProjectMetaProperties { core.Project playsRole project; properties.MetaProperty playsRole metaProperty { multiplicity *; } } relation WorkDefinitionProperties { core.WorkDefinition playsRole workDefinition; properties.Property playsRole property { multiplicity *; } } relation ThemePropertyValue { properties.ThemeProperty playsRole themeProperty; core.Theme playsRole theme; } /////////////////////////////////////////////////////////////////////////////// // Plan Section class plan.Plan { DateTime instant; Period period; } class plan.Dependency { DateTime instant; } class plan.Composition extends plan.Dependency; class plan.Precedence extends plan.Dependency; class plan.Assignment { DateTime instant; } relation PlanWorkItem { core.WorkItem playsRole workItem; plan.Plan playsRole plan { multiplicity *; } } relation DependencySource { core.WorkItem playsRole dependencySource; plan.Dependency playsRole dependency { multiplicity *; } } relation CompositionChildren { core.WorkItem playsRole child { multiplicity *; } plan.Composition playsRole childOf { multiplicity *; } } relation PrecedenceBefores { core.WorkItem playsRole before { multiplicity *; } plan.Precedence playsRole beforeOf { multiplicity *; } } relation IterationPlan { core.Iteration playsRole iteration; plan.Plan playsRole plan { multiplicity *; } } relation IterationDependencies { core.Iteration playsRole iteration; plan.Dependency playsRole dependency { multiplicity *; } } relation PersonPlans { core.Person playsRole planner; plan.Plan playsRole plan { multiplicity *; } } relation PersonDependencies { core.Person playsRole writer; plan.Dependency playsRole dependency { multiplicity *; } } relation PersonAssigner { core.Person playsRole assigner; plan.Assignment playsRole createdAssignment { multiplicity *; } } relation Assignments { core.Person playsRole assignee { multiplicity *; } plan.Assignment playsRole assignment { multiplicity *; } } /////////////////////////////////////////////////////////////////////////////// // Execution Section class execution.Activity { DateMidnight day; Duration duration; } relation WorkItemActivities { core.WorkItem playsRole workItem; execution.Activity playsRole activity { multiplicity *; } } relation IterationActivities { core.Iteration playsRole iteration; execution.Activity playsRole activity { multiplicity *; } } relation PersonActivities { core.Person playsRole developer; execution.Activity playsRole activity { multiplicity *; } }