public void ExportDomainProperty(DomainProperty domprop) { var name = new StringBuilder (domprop.Name); if (name.Length > 30) { var midspace = domprop.Name.IndexOf (' ', (domprop.Name.Length / 2) - 1); name.Replace (" ", @"\n", midspace, 1); } writer.WriteLine (@"""{0}"" [shape=trapezium,label=""{1}"",style=filled,fillcolor=""{2}"",fontname=""HelveticaNeue"",fontsize=9,margin=""-.2,0""];", domprop.Identifier, name, "#e8fdcb"); }
public static MvcHtmlString GetLink(this HtmlHelper helper, DomainProperty domprop) { return helper.ActionLink (domprop.FriendlyName, "GoalModel"); }
private static void AddElementsFor(this IList<string> alphabet, DomainProperty domprop) { alphabet.AddElementsFor (domprop.FormalSpec); }
public void Add(DomainProperty domProp) { this.DomainPropertyIdentifiers.Add (domProp.Identifier); }
public void Remove(DomainProperty domProp) { this.DomainPropertyIdentifiers.Remove (domProp.Identifier); }
public void Add(DomainProperty agent) { DomainProperties.Add (agent); }
public static IEncodedString GetPartialDomPropDiagram(DomainProperty domprop) { var view = new PartialModelView (); view.Add (domprop); foreach (var r in domprop.GoalRefinements ()) { view.Add (r); view.Add (r.ParentGoal ()); foreach (var gg in r.SubGoals ()) { view.Add (gg); } foreach (var gg in r.DomainProperties ()) { view.Add (gg); } foreach (var gg in r.DomainHypotheses ()) { view.Add (gg); } } foreach (var r in domprop.ObstacleRefinements ()) { view.Add (r); view.Add (r.ParentObstacle ()); foreach (var gg in r.SubObstacles ()) { view.Add (gg); } } var stream1 = new MemoryStream(); var ser = new DataContractJsonSerializer(typeof(PartialModelView)); ser.WriteObject(stream1, view); stream1.Position = 0; StreamReader sr = new StreamReader(stream1); return new RawString (sr.ReadToEnd()); }
protected void Render(DomainProperty domProp) { AddHomeShape (domProp.Identifier, domProp.FriendlyName, 1, 0.895214, 1, 0.72515); }