コード例 #1
0
        public void Add(GoalRelaxedTo annotation)
        {
            if (GoalRelaxedToAnnotations.ContainsKey(annotation.Identifier))
            {
                throw new ArgumentException(string.Format("Goal RelaxedTo annotation identifier already exist: {0}", annotation.Identifier));
            }

            GoalRelaxedToAnnotations.Add(annotation.Identifier, annotation);
        }
コード例 #2
0
        public override void Handle(Goal element, ParsedRelaxedToAttribute attribute, KAOSModel model)
        {
            var relaxedTo = new GoalRelaxedTo(model,
                                              element.Identifier,
                                              attribute.ObstacleIdentifier,
                                              fb.BuildFormula(attribute.Formula));

            if (!model.obstacleRepository.ObstacleExists(attribute.ObstacleIdentifier))
            {
                model.Add(new Obstacle(model)
                {
                    Identifier = attribute.ObstacleIdentifier,
                    Implicit   = true
                });
            }
            model.Add(relaxedTo);
        }
コード例 #3
0
 public void Add(GoalRelaxedTo providedNotAnnotation)
 {
     this.goalRepository.Add(providedNotAnnotation);
 }