Exemplo n.º 1
0
        public void Add(GoalProvidedNot annotation)
        {
            if (GoalProvidedNotAnnotations.ContainsKey(annotation.Identifier))
            {
                throw new ArgumentException(string.Format("Goal ProvidedNot annotation identifier already exist: {0}", annotation.Identifier));
            }

            GoalProvidedNotAnnotations.Add(annotation.Identifier, annotation);
        }
        public override void Handle(Goal element, ParsedProvidedNotAttribute attribute, KAOSModel model)
        {
            var providedNot = new GoalProvidedNot(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(providedNot);
        }
Exemplo n.º 3
0
 public void Add(GoalProvidedNot providedNotAnnotation)
 {
     this.goalRepository.Add(providedNotAnnotation);
 }