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); }
public void Add(GoalProvidedNot providedNotAnnotation) { this.goalRepository.Add(providedNotAnnotation); }