From: <mcu...@us...> - 2008-08-13 00:57:01
|
Revision: 1318 http://orm.svn.sourceforge.net/orm/?rev=1318&view=rev Author: mcurland Date: 2008-08-13 00:57:10 +0000 (Wed, 13 Aug 2008) Log Message: ----------- Fixed a couple of exclusion constraint verbalization data errors from [1315]. refs #286 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2008-08-13 00:57:10 UTC (rev 1318) @@ -2814,12 +2814,6 @@ <strong>Not Available</strong> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListClose</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListFinalSeparator" class="snippet"> <span class="snippetHeader"> @@ -2837,12 +2831,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListFinalSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListOpen" class="snippet"> <span class="snippetHeader"> @@ -2860,12 +2848,6 @@ <strong>Not Available</strong> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListOpen</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListPairSeparator" class="snippet"> <span class="snippetHeader"> @@ -2883,12 +2865,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListPairSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListSeparator" class="snippet"> <span class="snippetHeader"> @@ -2906,12 +2882,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalOrListClose" class="snippet"> <span class="snippetHeader"> Modified: trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2008-08-13 00:57:10 UTC (rev 1318) @@ -941,9 +941,7 @@ <unformattedSnippet></unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListFinalSeparator" replacementCount="0"> <statement> @@ -952,9 +950,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListOpen" replacementCount="0"> <statement> @@ -963,9 +959,7 @@ <unformattedSnippet></unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListPairSeparator" replacementCount="0"> <statement> @@ -974,9 +968,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListSeparator" replacementCount="0"> <statement> @@ -985,9 +977,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalOrListClose" replacementCount="0"> <statement> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-13 00:57:10 UTC (rev 1318) @@ -8529,28 +8529,28 @@ CoreVerbalizationSnippetType listSnippet; if (RoleIter1 == 0) { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListOpen; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListOpen; } else if (RoleIter1 == columnArity - 1) { if (RoleIter1 == 1) { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListPairSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListPairSeparator; } else { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListFinalSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListFinalSeparator; } } else { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListSeparator; } sbTemp.Append(snippets.GetSnippet(listSnippet, isDeontic, isNegative)); sbTemp.Append(basicRoleReplacements[unaryReplacements[contextBasicReplacementIndex] ? 0 : FactType.IndexOfRole(factRoles, primaryRole)]); if (RoleIter1 == columnArity - 1) { - sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.IndentedLogicalAndListClose, isDeontic, isNegative)); + sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.SimpleLogicalAndListClose, isDeontic, isNegative)); } } snippet1Replace1Replace1 = sbTemp.ToString(); @@ -9153,30 +9153,29 @@ } snippet1Replace1Replace1 = sbTemp.ToString(); } - snippet1Replace1 = string.Format(writer.FormatProvider, snippet1ReplaceFormat1, snippet1Replace1Replace1); - string snippet1Replace2 = null; - string snippet1ReplaceFormat2 = snippets.GetSnippet(CoreVerbalizationSnippetType.GroupExclusion, isDeontic, isNegative); - string snippet1Replace2Replace1 = null; - int snippet1Replace2ReplaceSequenceIter1; - int snippet1Replace2ReplaceCompositeCount1 = 0; - int snippet1Replace2ReplaceCompositeIterator1; - FactType[] snippet1Replace2Replace1ItemUniqueFactTypes1 = new FactType[columnArity]; - FactType snippet1Replace2Replace1ItemTestUniqueFactType1; - for (snippet1Replace2ReplaceSequenceIter1 = 0; snippet1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace2ReplaceSequenceIter1) + string snippet1Replace1Replace2 = null; + string snippet1Replace1ReplaceFormat2 = snippets.GetSnippet(CoreVerbalizationSnippetType.GroupExclusion, isDeontic, isNegative); + string snippet1Replace1Replace2Replace1 = null; + int snippet1Replace1Replace2ReplaceSequenceIter1; + int snippet1Replace1Replace2ReplaceCompositeCount1 = 0; + int snippet1Replace1Replace2ReplaceCompositeIterator1; + FactType[] snippet1Replace1Replace2Replace1ItemUniqueFactTypes1 = new FactType[columnArity]; + FactType snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; + for (snippet1Replace1Replace2ReplaceSequenceIter1 = 0; snippet1Replace1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace1Replace2ReplaceSequenceIter1) { - IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace2ReplaceSequenceIter1]; - for (snippet1Replace2ReplaceCompositeIterator1 = 0; snippet1Replace2ReplaceCompositeIterator1 < columnArity; ++snippet1Replace2ReplaceCompositeIterator1) + IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace1Replace2ReplaceSequenceIter1]; + for (snippet1Replace1Replace2ReplaceCompositeIterator1 = 0; snippet1Replace1Replace2ReplaceCompositeIterator1 < columnArity; ++snippet1Replace1Replace2ReplaceCompositeIterator1) { - RoleBase primaryRole = includedSequenceRoles[snippet1Replace2ReplaceCompositeIterator1]; - if (Array.IndexOf(snippet1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) + RoleBase primaryRole = includedSequenceRoles[snippet1Replace1Replace2ReplaceCompositeIterator1]; + if (Array.IndexOf(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) { - snippet1Replace2Replace1ItemUniqueFactTypes1[snippet1Replace2ReplaceCompositeIterator1] = snippet1Replace2Replace1ItemTestUniqueFactType1; - ++snippet1Replace2ReplaceCompositeCount1; + snippet1Replace1Replace2Replace1ItemUniqueFactTypes1[snippet1Replace1Replace2ReplaceCompositeIterator1] = snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; + ++snippet1Replace1Replace2ReplaceCompositeCount1; } } - Array.Clear(snippet1Replace2Replace1ItemUniqueFactTypes1, 0, snippet1Replace2Replace1ItemUniqueFactTypes1.Length); + Array.Clear(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, 0, snippet1Replace1Replace2Replace1ItemUniqueFactTypes1.Length); } - snippet1Replace2ReplaceCompositeIterator1 = 0; + snippet1Replace1Replace2ReplaceCompositeIterator1 = 0; if (sbTemp == null) { sbTemp = new StringBuilder(); @@ -9185,10 +9184,10 @@ { sbTemp.Length = 0; } - for (snippet1Replace2ReplaceSequenceIter1 = 0; snippet1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace2ReplaceSequenceIter1) + for (snippet1Replace1Replace2ReplaceSequenceIter1 = 0; snippet1Replace1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace1Replace2ReplaceSequenceIter1) { - IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace2ReplaceSequenceIter1]; - string snippet1Replace2Replace1Item1; + IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace1Replace2ReplaceSequenceIter1]; + string snippet1Replace1Replace2Replace1Item1; for (int RoleIter1 = 0; RoleIter1 < columnArity; ++RoleIter1) { RoleBase primaryRole = includedSequenceRoles[RoleIter1]; @@ -9196,17 +9195,17 @@ allReadingOrders = parentFact.ReadingOrderCollection; factRoles = allReadingOrders.Count != 0 ? allReadingOrders[0].RoleCollection : parentFact.RoleCollection; factArity = factRoles.Count; - if (Array.IndexOf(snippet1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) + if (Array.IndexOf(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) { - snippet1Replace2Replace1ItemUniqueFactTypes1[RoleIter1] = snippet1Replace2Replace1ItemTestUniqueFactType1; + snippet1Replace1Replace2Replace1ItemUniqueFactTypes1[RoleIter1] = snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; CoreVerbalizationSnippetType listSnippet; - if (snippet1Replace2ReplaceCompositeIterator1 == 0) + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == 0) { listSnippet = CoreVerbalizationSnippetType.MultilineIndentedCompoundListOpen; } - else if (snippet1Replace2ReplaceCompositeIterator1 == snippet1Replace2ReplaceCompositeCount1 - 1) + else if (snippet1Replace1Replace2ReplaceCompositeIterator1 == snippet1Replace1Replace2ReplaceCompositeCount1 - 1) { - if (snippet1Replace2ReplaceCompositeIterator1 == 1) + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == 1) { listSnippet = CoreVerbalizationSnippetType.MultilineIndentedCompoundListPairSeparator; } @@ -9222,11 +9221,11 @@ sbTemp.Append(snippets.GetSnippet(listSnippet, isDeontic, isNegative)); reading = parentFact.GetMatchingReading(allReadingOrders, null, primaryRole, null, false, false, false, factRoles, true); hyphenBinder = new VerbalizationHyphenBinder(reading, factRoles, unaryRoleIndex, snippets.GetSnippet(CoreVerbalizationSnippetType.HyphenBoundPredicatePart, isDeontic, isNegative)); - for (int snippet1Replace2Replace1ItemFactRoleIter1 = 0; snippet1Replace2Replace1ItemFactRoleIter1 < factArity; ++snippet1Replace2Replace1ItemFactRoleIter1) + for (int snippet1Replace1Replace2Replace1ItemFactRoleIter1 = 0; snippet1Replace1Replace2Replace1ItemFactRoleIter1 < factArity; ++snippet1Replace1Replace2Replace1ItemFactRoleIter1) { - RoleBase currentRole = factRoles[snippet1Replace2Replace1ItemFactRoleIter1]; + RoleBase currentRole = factRoles[snippet1Replace1Replace2Replace1ItemFactRoleIter1]; string roleReplacement = null; - string basicReplacement = hyphenBinder.HyphenBindRoleReplacement(allBasicRoleReplacements[allFacts.IndexOf(includedSequenceRoles[RoleIter1].FactType)][snippet1Replace2Replace1ItemFactRoleIter1], snippet1Replace2Replace1ItemFactRoleIter1); + string basicReplacement = hyphenBinder.HyphenBindRoleReplacement(allBasicRoleReplacements[allFacts.IndexOf(includedSequenceRoles[RoleIter1].FactType)][snippet1Replace1Replace2Replace1ItemFactRoleIter1], snippet1Replace1Replace2Replace1ItemFactRoleIter1); if (includedSequenceRoles.Contains(currentRole.Role)) { roleReplacement = string.Format(writer.FormatProvider, snippets.GetSnippet(CoreVerbalizationSnippetType.DefiniteArticle, isDeontic, isNegative), basicReplacement); @@ -9239,21 +9238,22 @@ { roleReplacement = basicReplacement; } - roleReplacements[snippet1Replace2Replace1ItemFactRoleIter1] = roleReplacement; + roleReplacements[snippet1Replace1Replace2Replace1ItemFactRoleIter1] = roleReplacement; } - snippet1Replace2Replace1Item1 = hyphenBinder.PopulatePredicateText(reading, factRoles, roleReplacements, false); - sbTemp.Append(snippet1Replace2Replace1Item1); - if (snippet1Replace2ReplaceCompositeIterator1 == snippet1Replace2ReplaceCompositeCount1 - 1) + snippet1Replace1Replace2Replace1Item1 = hyphenBinder.PopulatePredicateText(reading, factRoles, roleReplacements, false); + sbTemp.Append(snippet1Replace1Replace2Replace1Item1); + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == snippet1Replace1Replace2ReplaceCompositeCount1 - 1) { sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.MultilineIndentedCompoundListClose, isDeontic, isNegative)); } - ++snippet1Replace2ReplaceCompositeIterator1; + ++snippet1Replace1Replace2ReplaceCompositeIterator1; } } } - snippet1Replace2Replace1 = sbTemp.ToString(); - snippet1Replace2 = string.Format(writer.FormatProvider, snippet1ReplaceFormat2, snippet1Replace2Replace1); - FactType.WriteVerbalizerSentence(writer, string.Format(writer.FormatProvider, snippetFormat1, snippet1Replace1, snippet1Replace2), snippets.GetSnippet(CoreVerbalizationSnippetType.CloseVerbalizationSentence, isDeontic, isNegative)); + snippet1Replace1Replace2Replace1 = sbTemp.ToString(); + snippet1Replace1Replace2 = string.Format(writer.FormatProvider, snippet1Replace1ReplaceFormat2, snippet1Replace1Replace2Replace1); + snippet1Replace1 = string.Format(writer.FormatProvider, snippet1ReplaceFormat1, snippet1Replace1Replace1, snippet1Replace1Replace2); + FactType.WriteVerbalizerSentence(writer, string.Format(writer.FormatProvider, snippetFormat1, snippet1Replace1), snippets.GetSnippet(CoreVerbalizationSnippetType.CloseVerbalizationSentence, isDeontic, isNegative)); } #endregion // Pattern Matches #region Error report Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-13 00:57:10 UTC (rev 1318) @@ -1160,7 +1160,7 @@ <Snippet ref="ImpliedModalNecessityOperator"> <Snippet ref="ForEachCompactQuantifier"> <IterateSequences listStyle="null" pass="first"> - <IterateRoles match="constraintRoles" listStyle="IndentedLogicalAndList"/> + <IterateRoles match="constraintRoles" listStyle="SimpleLogicalAndList"/> </IterateSequences> <ConditionalSnippet> <Snippet ref="GroupExclusiveOr" conditionalMatch="ExclusionIsExclusiveOrConstraint"/> @@ -1255,21 +1255,21 @@ <IterateSequences listStyle="null" pass="first"> <IterateRoles match="constraintRoles" listStyle="SimpleLogicalAndList"/> </IterateSequences> + <Snippet ref="GroupExclusion"> + <IterateSequences listStyle="MultilineIndentedCompoundList" compositeList="true"> + <IterateRoles match="constraintRoles" listStyle="null" uniqueFactType="true"> + <Fact readingChoice="PreferPrimaryLeadReading"> + <PredicateReplacement match="included"> + <Snippet ref="DefiniteArticle"/> + </PredicateReplacement> + <PredicateReplacement> + <Snippet ref="ExistentialQuantifier"/> + </PredicateReplacement> + </Fact> + </IterateRoles> + </IterateSequences> + </Snippet> </Snippet> - <Snippet ref="GroupExclusion"> - <IterateSequences listStyle="MultilineIndentedCompoundList" compositeList="true"> - <IterateRoles match="constraintRoles" listStyle="null" uniqueFactType="true"> - <Fact readingChoice="PreferPrimaryLeadReading"> - <PredicateReplacement match="included"> - <Snippet ref="DefiniteArticle"/> - </PredicateReplacement> - <PredicateReplacement> - <Snippet ref="ExistentialQuantifier"/> - </PredicateReplacement> - </Fact> - </IterateRoles> - </IterateSequences> - </Snippet> </Snippet> </ConstrainedRoles> </Constraint> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-15 15:07:42
|
Revision: 1321 http://orm.svn.sourceforge.net/orm/?rev=1321&view=rev Author: mcurland Date: 2008-08-15 15:07:50 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Equality constraint double stating FactType in second sequence. Data entry fix from [1315]. refs #286 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-14 21:36:23 UTC (rev 1320) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-15 15:07:50 UTC (rev 1321) @@ -8079,7 +8079,7 @@ { sbTemp.Length = 0; } - for (int RoleIter2 = 0; RoleIter2 < columnArity; ++RoleIter2) + for (int RoleIter2 = 0; RoleIter2 < 1; ++RoleIter2) { RoleBase primaryRole = includedSequenceRoles[RoleIter2]; parentFact = primaryRole.FactType; Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-14 21:36:23 UTC (rev 1320) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-15 15:07:50 UTC (rev 1321) @@ -1112,7 +1112,7 @@ </IterateRoles> </IterateSequences> <IterateSequences listStyle="null" pass="notFirst"> - <IterateRoles match="constraintRoles" listStyle="null"> + <IterateRoles match="constraintRoles" listStyle="null" pass="first"> <Fact readingChoice="PreferPrimaryLeadReading"> <PredicateReplacement match="included"> <Snippet ref="DefiniteArticle"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-11-16 06:30:33
|
Revision: 1333 http://orm.svn.sourceforge.net/orm/?rev=1333&view=rev Author: mcurland Date: 2008-11-16 06:30:27 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Preverify FactType state before verbalizing in associated FactTypes list on ObjectType selection. Fixes verbalization crash introduced with [1331] selecting an ObjectType attached to a role on a FactType with no reading. refs #376 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Verbalization.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd trunk/ORMModel/ObjectModel/VerbalizationGenerator.xslt Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2008-11-16 06:30:27 UTC (rev 1333) @@ -1004,6 +1004,10 @@ /// </summary> public static void WriteVerbalizerSentence(TextWriter writer, string body, string closeSentenceWith) { + if (string.IsNullOrEmpty(body)) + { + return; + } Match match = FirstBodyCharacterPatternLower.Match(body); if (match.Success) { Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-11-16 06:30:27 UTC (rev 1333) @@ -1788,7 +1788,7 @@ for (snippet8ReplaceFilteredIter1 = 0; snippet8ReplaceFilteredIter1 < playedRoleCount; ++snippet8ReplaceFilteredIter1) { RoleBase primaryRole = playedRoles[snippet8ReplaceFilteredIter1]; - if (Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) + if (primaryRole.FactType.ReadingRequiredError == null && Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) { snippet8ReplaceUniqueFactTypes1[snippet8ReplaceFilteredIter1] = snippet8ReplaceTestUniqueFactType1; ++snippet8ReplaceFilteredCount1; @@ -1827,7 +1827,7 @@ } basicRoleReplacements[i] = basicReplacement; } - if (Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) + if (primaryRole.FactType.ReadingRequiredError == null && Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) { snippet8ReplaceUniqueFactTypes1[RoleIter1] = snippet8ReplaceTestUniqueFactType1; CoreVerbalizationSnippetType listSnippet; Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-11-16 06:30:27 UTC (rev 1333) @@ -82,7 +82,7 @@ <PortableDataType/> </Snippet> <Snippet ref="SelfReference" conditionalMatch="VerbalizeFactTypesWithBrowserObjectType"> - <IterateRoles match="playedRoles" listStyle="FactTypeList" uniqueFactType="true"> + <IterateRoles match="playedRoles" listStyle="FactTypeList" verifyCanVerbalizeFactType="true" uniqueFactType="true"> <Fact subtypeMetaReading="true" closeSentence="true"/> </IterateRoles> </Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd 2008-11-16 06:30:27 UTC (rev 1333) @@ -1047,6 +1047,11 @@ <xs:documentation>Set to true if a visited FactTypes should be tracked. If this is set, then a later role with the same FactType will be ignored.</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="verifyCanVerbalizeFactType" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Set to true if the FactType has not already been verified as have sufficient state to support verbalization.</xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> <xs:complexType name="IterateRolesType"> <xs:complexContent> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xslt =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2009-02-06 20:18:21
|
Revision: 1357 http://orm.svn.sourceforge.net/orm/?rev=1357&view=rev Author: mcurland Date: 2009-02-06 20:18:17 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Make 'occurs in population' snippets more specific for unary and spanning uniqueness constraints. fixes #384 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2009-02-05 20:37:06 UTC (rev 1356) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2009-02-06 20:18:17 UTC (rev 1357) @@ -63,8 +63,8 @@ <Snippet type="OneQuantifier" sign="negative"><![CDATA[<span class="quantifier">more than one</span> {0}]]></Snippet> - <Snippet type="OccursInPopulation" sign="positive"><![CDATA[{0} <span class="quantifier">occurs at most once in the population of</span> {1}]]></Snippet> - <Snippet type="OccursInPopulation" sign="negative"><![CDATA[{0} <span class="quantifier">occurs more than once in the population of</span> {1}]]></Snippet> + <Snippet type="OccursInPopulation" sign="positive"><![CDATA[<span class="quantifier">in each population of</span> {1}<span class="quantifier">, </span>{0} <span class="quantifier">occurs at most once</span>]]></Snippet> + <Snippet type="OccursInPopulation" sign="negative"><![CDATA[{0} <span class="quantifier">occurs more than once in the same population of</span> {1}]]></Snippet> <Snippet type="ModalPossibilityOperator" modality="alethic" sign="positive"><![CDATA[<span class="quantifier">it is possible that</span> {0}]]></Snippet> <Snippet type="ModalPossibilityOperator" modality="deontic" sign="positive"><![CDATA[<span class="quantifier">it is permitted that</span> {0}]]></Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd 2009-02-05 20:37:06 UTC (rev 1356) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd 2009-02-06 20:18:17 UTC (rev 1357) @@ -733,8 +733,8 @@ <xs:annotation> <xs:documentation> Description: Verbalizes that an object occurs at most once or more than once in a given population. - Format positive: {0} occurs at most once in the population of {1} - Format negative: {0} occurs more than once in the population of {1} + Format positive: in each population of {1}, {0} occurs at most once + Format negative: {0} occurs more than once in the same population of {1} </xs:documentation> </xs:annotation> </xs:enumeration> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2009-02-05 20:37:06 UTC (rev 1356) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2009-02-06 20:18:17 UTC (rev 1357) @@ -484,7 +484,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub>{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub>{2}</sub></a>", - @"{0} <span class=""quantifier"">occurs at most once in the population of</span> {1}", + @"<span class=""quantifier"">in each population of</span> {1}<span class=""quantifier"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", @"<span class=""quantifier"">at most one</span> {0}", @"{0}<span class=""listSeparator"">.</span>{1}", @"<span class=""quantifier"">who</span> {0}", @@ -675,7 +675,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub>{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub>{2}</sub></a>", - @"{0} <span class=""quantifier"">occurs at most once in the population of</span> {1}", + @"<span class=""quantifier"">in each population of</span> {1}<span class=""quantifier"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", @"<span class=""quantifier"">at most one</span> {0}", @"{0}<span class=""listSeparator"">.</span>{1}", @"<span class=""quantifier"">who</span> {0}", @@ -866,7 +866,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub>{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub>{2}</sub></a>", - @"{0} <span class=""quantifier"">occurs more than once in the population of</span> {1}", + @"{0} <span class=""quantifier"">occurs more than once in the same population of</span> {1}", @"<span class=""quantifier"">more than one</span> {0}", @"{0}<span class=""listSeparator"">.</span>{1}", @"<span class=""quantifier"">who</span> {0}", @@ -1057,7 +1057,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub>{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub>{2}</sub></a>", - @"{0} <span class=""quantifier"">occurs more than once in the population of</span> {1}", + @"{0} <span class=""quantifier"">occurs more than once in the same population of</span> {1}", @"<span class=""quantifier"">more than one</span> {0}", @"{0}<span class=""listSeparator"">.</span>{1}", @"<span class=""quantifier"">who</span> {0}", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2009-08-10 21:07:01
|
Revision: 1401 http://orm.svn.sourceforge.net/orm/?rev=1401&view=rev Author: mcurland Date: 2009-08-10 21:06:54 +0000 (Mon, 10 Aug 2009) Log Message: ----------- PathedRole marked as a bag relationship in the DSL model, but not the serialization extensions. Paths with duplicate roles do not reload properly. refs #395 Modified Paths: -------------- trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml Modified: trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs 2009-08-07 18:29:00 UTC (rev 1400) +++ trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs 2009-08-10 21:06:54 UTC (rev 1401) @@ -7842,7 +7842,7 @@ { childElementMappings = new Dictionary<string, CustomSerializedElementMatch>(); CustomSerializedElementMatch match = new CustomSerializedElementMatch(); - match.InitializeRoles(PathedRole.RoleDomainRoleId); + match.InitializeRoles(true, PathedRole.RoleDomainRoleId); childElementMappings.Add("||http://schemas.neumont.edu/ORM/2006-04/ORMCore|PathedRoles||PathedRole", match); match.InitializeRoles(RoleSubPathIsContinuationOfRolePath.SubPathDomainRoleId); childElementMappings.Add("||http://schemas.neumont.edu/ORM/2006-04/ORMCore|SubPaths||", match); Modified: trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml 2009-08-07 18:29:00 UTC (rev 1400) +++ trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml 2009-08-10 21:06:54 UTC (rev 1401) @@ -1024,7 +1024,7 @@ <se:Container Name="SubPaths"> <se:Embed RelationshipName="RoleSubPathIsContinuationOfRolePath" RoleName="SubPath"/> </se:Container> - <se:Link RelationshipName="PathedRole" RoleName="Role" Name="PathedRole" WriteStyle="PrimaryLinkElement"/> + <se:Link RelationshipName="PathedRole" RoleName="Role" Name="PathedRole" WriteStyle="PrimaryLinkElement" AllowDuplicates="true"/> </se:Element> <se:Element Class="RoleSubPath" Name="SubPath" Override="true"/> <se:Element Class="PathedRole"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2009-08-26 19:32:24
|
Revision: 1405 http://orm.svn.sourceforge.net/orm/?rev=1405&view=rev Author: mcurland Date: 2009-08-26 19:32:11 +0000 (Wed, 26 Aug 2009) Log Message: ----------- Added rule support for automatically collapsing splits in a role path when only one non-empty split is left. refs #395 Modified Paths: -------------- trunk/ORMModel/ObjectModel/ORMCore.AttachRules.cs trunk/ORMModel/ObjectModel/ORMCore.AttachRules.xml trunk/ORMModel/ObjectModel/RolePath.cs Modified: trunk/ORMModel/ObjectModel/ORMCore.AttachRules.cs =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.AttachRules.cs 2009-08-25 16:48:47 UTC (rev 1404) +++ trunk/ORMModel/ObjectModel/ORMCore.AttachRules.cs 2009-08-26 19:32:11 UTC (rev 1405) @@ -253,6 +253,10 @@ typeof(Role).GetNestedType("RolePlayerRequiredForNewRoleAddRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(Role).GetNestedType("UpdatedRolePlayerRequiredErrorsDeleteRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(Role).GetNestedType("UniquenessConstraintChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(RolePath).GetNestedType("PathedRoleDeletedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(RolePath).GetNestedType("PathedRoleRolePlayerChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(RolePath).GetNestedType("SubPathDeletedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(RolePath).GetNestedType("SubPathRolePlayerChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(SetComparisonConstraint).GetNestedType("ConstraintHasRoleSequenceAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(SetComparisonConstraint).GetNestedType("ConstraintRoleSequenceHasRoleAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(SetComparisonConstraint).GetNestedType("EnforceRoleSequenceCardinalityForConstraintAddRuleClass", BindingFlags.Public | BindingFlags.NonPublic), @@ -353,7 +357,7 @@ { Microsoft.VisualStudio.Modeling.RuleManager ruleManager = store.RuleManager; Type[] disabledRuleTypes = ORMCoreDomainModel.CustomDomainModelTypes; - for (int i = 0; i < 285; ++i) + for (int i = 0; i < 289; ++i) { ruleManager.EnableRule(disabledRuleTypes[i]); } @@ -6169,6 +6173,115 @@ } } #endregion // Rule classes for Role + #region Rule classes for RolePath + partial class RolePath + { + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(PathedRole), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.LocalCommit, Priority=ORMSolutions.ORMArchitect.Framework.FrameworkDomainModel.BeforeDelayValidateRulePriority)] + private sealed class PathedRoleDeletedRuleClass : Microsoft.VisualStudio.Modeling.DeleteRule + { + [System.Diagnostics.DebuggerStepThrough()] + public PathedRoleDeletedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath + /// /// <summary> + /// /// DeleteRule: typeof(PathedRole), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// /// </summary> + /// private static void PathedRoleDeletedRule(ElementDeletedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void ElementDeleted(Microsoft.VisualStudio.Modeling.ElementDeletedEventArgs e) + { + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleStart(e.ModelElement.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.PathedRoleDeletedRule"); + RolePath.PathedRoleDeletedRule(e); + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.PathedRoleDeletedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(PathedRole), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.LocalCommit, Priority=ORMSolutions.ORMArchitect.Framework.FrameworkDomainModel.BeforeDelayValidateRulePriority)] + private sealed class PathedRoleRolePlayerChangedRuleClass : Microsoft.VisualStudio.Modeling.RolePlayerChangeRule + { + [System.Diagnostics.DebuggerStepThrough()] + public PathedRoleRolePlayerChangedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath + /// /// <summary> + /// /// RolePlayerChangeRule: typeof(PathedRole), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// /// </summary> + /// private static void PathedRoleRolePlayerChangedRule(RolePlayerChangedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void RolePlayerChanged(Microsoft.VisualStudio.Modeling.RolePlayerChangedEventArgs e) + { + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleStart(e.ElementLink.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.PathedRoleRolePlayerChangedRule"); + RolePath.PathedRoleRolePlayerChangedRule(e); + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleEnd(e.ElementLink.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.PathedRoleRolePlayerChangedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(RoleSubPathIsContinuationOfRolePath), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.LocalCommit, Priority=ORMSolutions.ORMArchitect.Framework.FrameworkDomainModel.BeforeDelayValidateRulePriority)] + private sealed class SubPathDeletedRuleClass : Microsoft.VisualStudio.Modeling.DeleteRule + { + [System.Diagnostics.DebuggerStepThrough()] + public SubPathDeletedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath + /// /// <summary> + /// /// DeleteRule: typeof(RoleSubPathIsContinuationOfRolePath), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// /// </summary> + /// private static void SubPathDeletedRule(ElementDeletedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void ElementDeleted(Microsoft.VisualStudio.Modeling.ElementDeletedEventArgs e) + { + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleStart(e.ModelElement.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.SubPathDeletedRule"); + RolePath.SubPathDeletedRule(e); + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.SubPathDeletedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(RoleSubPathIsContinuationOfRolePath), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.LocalCommit, Priority=ORMSolutions.ORMArchitect.Framework.FrameworkDomainModel.BeforeDelayValidateRulePriority)] + private sealed class SubPathRolePlayerChangedRuleClass : Microsoft.VisualStudio.Modeling.RolePlayerChangeRule + { + [System.Diagnostics.DebuggerStepThrough()] + public SubPathRolePlayerChangedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath + /// /// <summary> + /// /// RolePlayerChangeRule: typeof(RoleSubPathIsContinuationOfRolePath), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// /// </summary> + /// private static void SubPathRolePlayerChangedRule(RolePlayerChangedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void RolePlayerChanged(Microsoft.VisualStudio.Modeling.RolePlayerChangedEventArgs e) + { + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleStart(e.ElementLink.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.SubPathRolePlayerChangedRule"); + RolePath.SubPathRolePlayerChangedRule(e); + ORMSolutions.ORMArchitect.Framework.Diagnostics.TraceUtility.TraceRuleEnd(e.ElementLink.Store, "ORMSolutions.ORMArchitect.Core.ObjectModel.RolePath.SubPathRolePlayerChangedRule"); + } + } + } + #endregion // Rule classes for RolePath #region Rule classes for SetComparisonConstraint partial class SetComparisonConstraint { Modified: trunk/ORMModel/ObjectModel/ORMCore.AttachRules.xml =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.AttachRules.xml 2009-08-25 16:48:47 UTC (rev 1404) +++ trunk/ORMModel/ObjectModel/ORMCore.AttachRules.xml 2009-08-26 19:32:11 UTC (rev 1405) @@ -763,6 +763,20 @@ <arg:RuleOn targetType="UniquenessConstraint"/> </arg:ChangeRule> </arg:RuleContainer> + <arg:RuleContainer class="RolePath"> + <arg:DeleteRule methodName="PathedRoleDeletedRule"> + <arg:RuleOn targetType="PathedRole" fireTime="LocalCommit" priority="BeforeDelayValidateRulePriority"/> + </arg:DeleteRule> + <arg:RolePlayerChangeRule methodName="PathedRoleRolePlayerChangedRule"> + <arg:RuleOn targetType="PathedRole" fireTime="LocalCommit" priority="BeforeDelayValidateRulePriority"/> + </arg:RolePlayerChangeRule> + <arg:DeleteRule methodName="SubPathDeletedRule"> + <arg:RuleOn targetType="RoleSubPathIsContinuationOfRolePath" fireTime="LocalCommit" priority="BeforeDelayValidateRulePriority"/> + </arg:DeleteRule> + <arg:RolePlayerChangeRule methodName="SubPathRolePlayerChangedRule"> + <arg:RuleOn targetType="RoleSubPathIsContinuationOfRolePath" fireTime="LocalCommit" priority="BeforeDelayValidateRulePriority"/> + </arg:RolePlayerChangeRule> + </arg:RuleContainer> <arg:RuleContainer class="SetComparisonConstraint"> <arg:AddRule methodName="ConstraintHasRoleSequenceAddedRule" fireBefore="true"> <!-- Fire before so the SetComparisonConstraint.FactTypeCollection is populated for other rules--> Modified: trunk/ORMModel/ObjectModel/RolePath.cs =================================================================== --- trunk/ORMModel/ObjectModel/RolePath.cs 2009-08-25 16:48:47 UTC (rev 1404) +++ trunk/ORMModel/ObjectModel/RolePath.cs 2009-08-26 19:32:11 UTC (rev 1405) @@ -120,6 +120,125 @@ return null; } #endregion // Accessors Properties + #region Delayed Validation + /// <summary> + /// Called when a subbranch is removed. If there is one remaining subbranch, + /// then move the remaining elements in a single branch to the end of the current branch. + /// </summary> + /// <param name="element">A <see cref="RoleSubPath"/></param> + private static void DelayValidatePathCollapse(ModelElement element) + { + if (element.IsDeleted) + { + return; + } + RolePath parentPath = (RolePath)element; + LinkedElementCollection<RoleSubPath> subPaths = parentPath.SplitPathCollection; + if (subPaths.Count == 1) + { + // Remove the tail split by moving all elements up one level + RolePath collapsePath = subPaths[0]; + + // Move pathed roles + foreach (PathedRole pathedRole in collapsePath.PathedRoleCollection) + { + pathedRole.RolePath = parentPath; + } + + // Move sub paths + foreach (RoleSubPathIsContinuationOfRolePath subPathLink in RoleSubPathIsContinuationOfRolePath.GetLinksToSplitPathCollection(collapsePath)) + { + subPathLink.ParentRolePath = parentPath; + } + + // Change the parent split settings to the path we just collapsed + parentPath.SplitIsNegated = collapsePath.SplitIsNegated; + parentPath.SplitCombinationOperator = collapsePath.SplitCombinationOperator; + + // We're done with it. Note that this can trigger other rules which will + // reenter this routine for the grandparent branch + collapsePath.Delete(); + } + } + #endregion // Delayed Validation + #region Rule Methods + /// <summary> + /// DeleteRule: typeof(PathedRole), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// Eliminate empty branches. + /// </summary> + private static void PathedRoleDeletedRule(ElementDeletedEventArgs e) + { + RolePath rolePath = ((PathedRole)e.ModelElement).RolePath; + if (!rolePath.IsDeleted && + rolePath.PathedRoleCollection.Count == 0 && + rolePath.SplitPathCollection.Count == 0) + { + rolePath.Delete(); + } + } + /// <summary> + /// RolePlayerChangeRule: typeof(PathedRole), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// Eliminate empty branches. + /// </summary> + private static void PathedRoleRolePlayerChangedRule(RolePlayerChangedEventArgs e) + { + if (e.DomainRole.Id == PathedRole.RolePathDomainRoleId) + { + RolePath rolePath = (RolePath)e.OldRolePlayer; + if (!rolePath.IsDeleted && + rolePath.PathedRoleCollection.Count == 0 && + rolePath.SplitPathCollection.Count == 0) + { + rolePath.Delete(); + } + } + } + /// <summary> + /// DeleteRule: typeof(RoleSubPathIsContinuationOfRolePath), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// If a subbranch is deleted, then delay validate if the parent branch should + /// attempt to collapse a remaining branch. + /// </summary> + private static void SubPathDeletedRule(ElementDeletedEventArgs e) + { + RolePath parentRolePath = ((RoleSubPathIsContinuationOfRolePath)e.ModelElement).ParentRolePath; + if (!parentRolePath.IsDeleted) + { + if (parentRolePath.PathedRoleCollection.Count == 0 && + parentRolePath.SplitPathCollection.Count == 0) + { + parentRolePath.Delete(); + } + else + { + FrameworkDomainModel.DelayValidateElement(parentRolePath, DelayValidatePathCollapse); + } + } + } + /// <summary> + /// RolePlayerChangeRule: typeof(RoleSubPathIsContinuationOfRolePath), FireTime=LocalCommit, Priority=FrameworkDomainModel.BeforeDelayValidateRulePriority; + /// Check branch collapsing for role player changes. + /// </summary> + private static void SubPathRolePlayerChangedRule(RolePlayerChangedEventArgs e) + { + if (e.DomainRole.Id == RoleSubPathIsContinuationOfRolePath.ParentRolePathDomainRoleId) + { + // The parent has lost a branch, validate if needed + RolePath parentRolePath = (RolePath)e.OldRolePlayer; + if (!parentRolePath.IsDeleted) + { + if (parentRolePath.PathedRoleCollection.Count == 0 && + parentRolePath.SplitPathCollection.Count == 0) + { + parentRolePath.Delete(); + } + else + { + FrameworkDomainModel.DelayValidateElement(parentRolePath, DelayValidatePathCollapse); + } + } + } + } + #endregion // Rule Methods } #endregion // RolePath class #region PrimaryRolePath class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2009-09-10 23:39:47
|
Revision: 1409 http://orm.svn.sourceforge.net/orm/?rev=1409&view=rev Author: mcurland Date: 2009-09-10 23:39:38 +0000 (Thu, 10 Sep 2009) Log Message: ----------- * Strip invalid file name characters from object type and fact type names when generating reports. This is not a 100% solution because file names may end up overlapping, but it is much better than not checking at all. * Reports of FactType pages generating zero-length files due to call of VerbalizeElement override (introduce in [1391]). Renamed VerbalizationHelper.VerbalizeElement in question to VerbalizationHelper.VerbalizeChildren so this won't accidentally happen again. refs #315 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Verbalization.cs trunk/ORMModel/ObjectModel/VerbalizationReport.cs trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xsd Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2009-09-10 15:31:16 UTC (rev 1408) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2009-09-10 23:39:38 UTC (rev 1409) @@ -1941,7 +1941,7 @@ /// <param name="writer">The VerbalizationCallbackWriter for verbalization output</param> /// <param name="writeSecondaryLines">True to automatically add a line between callbacks. Set to <see langword="true"/> for multi-select scenarios.</param> /// <param name="firstCallPending"></param> - public static void VerbalizeElement(IEnumerable<CustomChildVerbalizer> customChildren, IEnumerable<CustomChildVerbalizer> extensionChildren, IDictionary<Type, IVerbalizationSets> snippetsDictionary, IExtensionVerbalizerService extensionVerbalizer, string verbalizationTarget, IDictionary<IVerbalize, IVerbalize> alreadyVerbalized, IDictionary<object, object> locallyVerbalized, VerbalizationSign sign, VerbalizationCallbackWriter writer, bool writeSecondaryLines, ref bool firstCallPending) + public static void VerbalizeChildren(IEnumerable<CustomChildVerbalizer> customChildren, IEnumerable<CustomChildVerbalizer> extensionChildren, IDictionary<Type, IVerbalizationSets> snippetsDictionary, IExtensionVerbalizerService extensionVerbalizer, string verbalizationTarget, IDictionary<IVerbalize, IVerbalize> alreadyVerbalized, IDictionary<object, object> locallyVerbalized, VerbalizationSign sign, VerbalizationCallbackWriter writer, bool writeSecondaryLines, ref bool firstCallPending) { if (customChildren == null && extensionChildren == null) { Modified: trunk/ORMModel/ObjectModel/VerbalizationReport.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReport.cs 2009-09-10 15:31:16 UTC (rev 1408) +++ trunk/ORMModel/ObjectModel/VerbalizationReport.cs 2009-09-10 23:39:38 UTC (rev 1409) @@ -217,7 +217,7 @@ bool firstCall = true; IVerbalizeCustomChildren objectTypeListReport = new ObjectTypeListReport(model, objectTypeList, snippets, ReportVerbalizationSnippetType.ObjectTypeListHeader, ReportVerbalizationSnippetType.ObjectTypeListFooter, reportContent); - VerbalizationHelper.VerbalizeElement( + VerbalizationHelper.VerbalizeChildren( objectTypeListReport.GetCustomChildVerbalizations(null, sign), null, snippetsDictionary, @@ -250,12 +250,12 @@ locallyVerbalized.Clear(); ObjectType objectType = objectTypeList[i]; - fileStream = new FileStream(Path.Combine(objectTypeDir, objectType.Name + ".html"), FileMode.Create, FileAccess.ReadWrite); + fileStream = new FileStream(Path.Combine(objectTypeDir, AsFileName(objectType.Name) + ".html"), FileMode.Create, FileAccess.ReadWrite); textWriter = new StreamWriter(fileStream); writer = new VerbalizationReportCallbackWriter(snippetsDictionary, textWriter); ObjectTypePageReport objectTypePageReport = new ObjectTypePageReport(objectType, reportContent, snippets); - VerbalizationHelper.VerbalizeElement( + VerbalizationHelper.VerbalizeChildren( ((IVerbalizeCustomChildren)objectTypePageReport).GetCustomChildVerbalizations(objectTypePageReport, sign), null, snippetsDictionary, @@ -301,13 +301,14 @@ bool firstCallPending = true; alreadyVerbalized.Clear(); locallyVerbalized.Clear(); - fileStream = new FileStream(Path.Combine(factTypeDir, factTypeList[i].Name + ".html"), FileMode.Create, FileAccess.ReadWrite); + fileStream = new FileStream(Path.Combine(factTypeDir, AsFileName(factTypeList[i].Name) + ".html"), FileMode.Create, FileAccess.ReadWrite); textWriter = new StreamWriter(fileStream); writer = new VerbalizationReportCallbackWriter(snippetsDictionary, textWriter); FactTypePageReport factTypePageReport = new FactTypePageReport(factTypeList[i], reportContent, snippets); - VerbalizationHelper.VerbalizeElement( + VerbalizationHelper.VerbalizeChildren( ((IVerbalizeCustomChildren)factTypePageReport).GetCustomChildVerbalizations(factTypePageReport, sign), + null, snippetsDictionary, extensionVerbalizer, HtmlReport.HtmlReportTargetName, @@ -346,7 +347,7 @@ writer = new VerbalizationReportCallbackWriter(snippetsDictionary, textWriter); FactTypeConstraintValidationListReport factTypeConstraintValidationReport = new FactTypeConstraintValidationListReport(model, factTypeList, reportContent, snippets); - VerbalizationHelper.VerbalizeElement( + VerbalizationHelper.VerbalizeChildren( ((IVerbalizeCustomChildren)factTypeConstraintValidationReport).GetCustomChildVerbalizations(factTypeConstraintValidationReport, sign), null, snippetsDictionary, @@ -372,7 +373,24 @@ } #endregion // Public Methods #region Helper methods + private static readonly char[] InvalidFileChars = Path.GetInvalidFileNameChars(); /// <summary> + /// Normalize the name as a valid file name. + /// </summary> + /// <param name="name">Any string</param> + /// <returns>The name with invalid file characters stripped out.</returns> + /// <remarks>This is far from perfect (you can get an empty name) but + /// is better than nothing.</remarks> + protected static string AsFileName(string name) + { + string[] validNameParts = name.Split(InvalidFileChars, StringSplitOptions.RemoveEmptyEntries); + if (validNameParts.Length > 1) + { + return string.Join(null, validNameParts); + } + return name; + } + /// <summary> /// Gets the Fact Types for which the specified Object Type plays a role /// </summary> protected static IList<FactType> GetFactTypesFromObjectType(ObjectType objectType) @@ -895,17 +913,17 @@ /// </summary> protected class ObjectTypeVerbalizationWrapper : IVerbalize { - #region Memeber Variables + #region Member Variables private ReportVerbalizationSnippetType myObjectTypeSnippet; - private IVerbalize myVerbalizationObject; - #endregion // Memeber Variables + private ObjectType myVerbalizationObject; + #endregion // Member Variables #region Constructor /// <summary> /// Initializes a new instance of the <see cref="ObjectTypeVerbalizationWrapper"/> class. /// </summary> /// <param name="objectTypeSnippet">The object type snippet.</param> /// <param name="verbalizationObject">The verbalization object.</param> - public ObjectTypeVerbalizationWrapper(ReportVerbalizationSnippetType objectTypeSnippet, IVerbalize verbalizationObject) + public ObjectTypeVerbalizationWrapper(ReportVerbalizationSnippetType objectTypeSnippet, ObjectType verbalizationObject) { myObjectTypeSnippet = objectTypeSnippet; myVerbalizationObject = verbalizationObject; @@ -915,7 +933,7 @@ /// <summary> /// Access the verbalization object /// </summary> - public IVerbalize VerbalizationObject + public ObjectType VerbalizationObject { get { @@ -940,7 +958,8 @@ verbalizationContext.BeginVerbalization(VerbalizationContent.Normal); IVerbalizationSets<ReportVerbalizationSnippetType> snippets = (IVerbalizationSets<ReportVerbalizationSnippetType>)snippetsDictionary[typeof(ReportVerbalizationSnippetType)]; writer.Write(snippets.GetSnippet(ReportVerbalizationSnippetType.GenericListItemOpen)); - writer.Write(string.Format(writer.FormatProvider, snippets.GetSnippet(myObjectTypeSnippet), (myVerbalizationObject as ObjectType).Name)); + string objectTypeName = myVerbalizationObject.Name; + writer.Write(string.Format(writer.FormatProvider, snippets.GetSnippet(myObjectTypeSnippet), objectTypeName, AsFileName(objectTypeName))); writer.Write(snippets.GetSnippet(ReportVerbalizationSnippetType.GenericListItemClose)); return false; // No children to verbalize } @@ -1206,14 +1225,14 @@ protected class FactTypeVerbalizationWrapper : IVerbalize { #region Member Variables - private IVerbalize myVerbalizationObject; + private FactType myVerbalizationObject; #endregion // Member Variables #region Constructor /// <summary> /// Initializes a new instance of the <see cref="FactTypeVerbalizationWrapper"/> class. /// </summary> /// <param name="verbalizationObject">The verbalization object.</param> - public FactTypeVerbalizationWrapper(IVerbalize verbalizationObject) + public FactTypeVerbalizationWrapper(FactType verbalizationObject) { myVerbalizationObject = verbalizationObject; } @@ -1222,7 +1241,7 @@ /// <summary> /// Access the verbalization object /// </summary> - public IVerbalize VerbalizationObject + public FactType VerbalizationObject { get { @@ -1247,8 +1266,8 @@ verbalizationContext.BeginVerbalization(VerbalizationContent.Normal); IVerbalizationSets<ReportVerbalizationSnippetType> snippets = (IVerbalizationSets<ReportVerbalizationSnippetType>)snippetsDictionary[typeof(ReportVerbalizationSnippetType)]; writer.Write(snippets.GetSnippet(ReportVerbalizationSnippetType.GenericListItemOpen)); - writer.Write(string.Format(snippets.GetSnippet(ReportVerbalizationSnippetType.FactTypeRelationshipLinkOpen), (myVerbalizationObject as FactType).Name)); - myVerbalizationObject.GetVerbalization(writer, snippetsDictionary, verbalizationContext, sign); + writer.Write(string.Format(snippets.GetSnippet(ReportVerbalizationSnippetType.FactTypeRelationshipLinkOpen), AsFileName(myVerbalizationObject.Name))); + ((IVerbalize)myVerbalizationObject).GetVerbalization(writer, snippetsDictionary, verbalizationContext, sign); writer.Write(snippets.GetSnippet(ReportVerbalizationSnippetType.FactTypeRelationshipLinkClose)); writer.Write(snippets.GetSnippet(ReportVerbalizationSnippetType.GenericListItemClose)); return false; // No children to verbalize Modified: trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs 2009-09-10 15:31:16 UTC (rev 1408) +++ trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs 2009-09-10 23:39:38 UTC (rev 1409) @@ -68,8 +68,6 @@ GenericConstraintListOpen, /// <summary>The 'GenericListItemClose' simple snippet value.</summary> GenericListItemClose, - /// <summary>The 'GenericListItemLink' format string snippet. Contains 2 replacement fields.</summary> - GenericListItemLink, /// <summary>The 'GenericListItemOpen' simple snippet value.</summary> GenericListItemOpen, /// <summary>The 'GenericRelationshipsListClose' simple snippet value.</summary> @@ -92,7 +90,7 @@ ObjectTypeListFooter, /// <summary>The 'ObjectTypeListHeader' simple snippet value.</summary> ObjectTypeListHeader, - /// <summary>The 'ObjectTypeListObjectTypeValueLink' format string snippet. Contains 1 replacement field.</summary> + /// <summary>The 'ObjectTypeListObjectTypeValueLink' format string snippet. Contains 2 replacement fields.</summary> ObjectTypeListObjectTypeValueLink, /// <summary>The 'ObjectTypePageFactTypeListClose' simple snippet value.</summary> ObjectTypePageFactTypeListClose, @@ -100,9 +98,9 @@ ObjectTypePageFactTypeListOpen, /// <summary>The 'ObjectTypePageHeader' format string snippet. Contains 1 replacement field.</summary> ObjectTypePageHeader, - /// <summary>The 'ObjectTypeRelationshipValueLink' format string snippet. Contains 1 replacement field.</summary> + /// <summary>The 'ObjectTypeRelationshipValueLink' format string snippet. Contains 2 replacement fields.</summary> ObjectTypeRelationshipValueLink, - /// <summary>The 'ObjectTypeValueLink' format string snippet. Contains 1 replacement field.</summary> + /// <summary>The 'ObjectTypeValueLink' format string snippet. Contains 2 replacement fields.</summary> ObjectTypeValueLink, /// <summary>The 'ReportDocumentContents' format string snippet. Contains 1 replacement field.</summary> ReportDocumentContents, @@ -241,11 +239,6 @@ ", "</li>", - @" - - <li><a href=""{0}/{1}.html"">{1}</a></li> - - ", @"<li class=""ListLink"">", @" @@ -309,7 +302,7 @@ <ul> ", - @"<span class=""objectType""><a href=""ObjectTypes/{0}.html"">{0}</a></span>", + @"<span class=""objectType""><a href=""ObjectTypes/{1}.html"">{0}</a></span>", @" </ul> @@ -331,8 +324,8 @@ </div> ", - @"<span class=""objectType""><a href=""../ObjectTypes/{0}.html"">{0}</a></span>", - @"<span class=""objectType""><a href=""{0}.html"">{0}</a></span>", + @"<span class=""objectType""><a href=""../ObjectTypes/{1}.html"">{0}</a></span>", + @"<span class=""objectType""><a href=""{1}.html"">{0}</a></span>", @" <div id=""navBar""> Modified: trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml 2009-09-10 15:31:16 UTC (rev 1408) +++ trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml 2009-09-10 23:39:38 UTC (rev 1409) @@ -3,6 +3,7 @@ Natural Object-Role Modeling Architect for Visual Studio Copyright © Neumont University. All rights reserved. +Copyright © ORM Solutions, LLC. All rights reserved. The use and distribution terms for this software are covered by the Common Public License 1.0 (http://opensource.org/licenses/cpl) which @@ -216,17 +217,12 @@ </div> ]]> </Snippet> - <Snippet type="GenericListItemLink"> - <![CDATA[ - <li><a href="{0}/{1}.html">{1}</a></li> - ]]> - </Snippet> <Snippet type="GenericListItemOpen"><![CDATA[<li class="ListLink">]]></Snippet> <Snippet type="GenericListItemClose"><![CDATA[</li>]]></Snippet> <Snippet type="EmptyContentListItemSnippet"><![CDATA[<li class="ListLink">There are no items for this section.</li>]]></Snippet> - <Snippet type="ObjectTypeValueLink"><![CDATA[<span class="objectType"><a href="{0}.html">{0}</a></span>]]></Snippet> - <Snippet type="ObjectTypeListObjectTypeValueLink"><![CDATA[<span class="objectType"><a href="ObjectTypes/{0}.html">{0}</a></span>]]></Snippet> - <Snippet type="ObjectTypeRelationshipValueLink"><![CDATA[<span class="objectType"><a href="../ObjectTypes/{0}.html">{0}</a></span>]]></Snippet> + <Snippet type="ObjectTypeValueLink"><![CDATA[<span class="objectType"><a href="{1}.html">{0}</a></span>]]></Snippet> + <Snippet type="ObjectTypeListObjectTypeValueLink"><![CDATA[<span class="objectType"><a href="ObjectTypes/{1}.html">{0}</a></span>]]></Snippet> + <Snippet type="ObjectTypeRelationshipValueLink"><![CDATA[<span class="objectType"><a href="../ObjectTypes/{1}.html">{0}</a></span>]]></Snippet> <Snippet type="FactTypeRelationshipLinkOpen"><![CDATA[<a href="../FactTypes/{0}.html">]]></Snippet> <Snippet type="FactTypeRelationshipLinkClose"><![CDATA[</a>]]></Snippet> <Snippet type="VerbalizerNewLine"><![CDATA[<br/>]]></Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xsd 2009-09-10 15:31:16 UTC (rev 1408) +++ trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xsd 2009-09-10 23:39:38 UTC (rev 1409) @@ -11,6 +11,7 @@ Natural Object-Role Modeling Architect for Visual Studio Copyright © Neumont University. All rights reserved. + Copyright © ORM Solutions, LLC. All rights reserved. The use and distribution terms for this software are covered by the Common Public License 1.0 (http://opensource.org/licenses/cpl) which @@ -201,17 +202,17 @@ </xs:enumeration> <xs:enumeration value="ObjectTypeValueLink"> <xs:annotation> - <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any Object Type Verbalization Report Page</xs:documentation> + <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any Object Type Verbalization Report Page. Replacement fields: {0}=object type name, {1}=valid file name for object type name.</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="ObjectTypeListObjectTypeValueLink"> <xs:annotation> - <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any top-level Verbalization Report Page</xs:documentation> + <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any top-level Verbalization Report Page. Replacement fields: {0}=object type name, {1}=valid file name for object type name.</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="ObjectTypeRelationshipValueLink"> <xs:annotation> - <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any bottom-level Verbalization Report Page</xs:documentation> + <xs:documentation>Description: Snippet used to create a hyperlink from an ObjectType on any bottom-level Verbalization Report Page. Replacement fields: {0}=object type name, {1}=valid file name for object type name.</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="FactTypeRelationshipLinkOpen"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2009-11-25 18:40:53
|
Revision: 1419 http://orm.svn.sourceforge.net/orm/?rev=1419&view=rev Author: mcurland Date: 2009-11-25 18:40:43 +0000 (Wed, 25 Nov 2009) Log Message: ----------- ValueConstraintValueTypeDetachedError not generating for a PathConditionRoleValueConstraint. Bug fix for [1418]. refs #395 Modified Paths: -------------- trunk/ORMModel/ObjectModel/RolePath.cs trunk/ORMModel/ObjectModel/ValueRange.cs Modified: trunk/ORMModel/ObjectModel/RolePath.cs =================================================================== --- trunk/ORMModel/ObjectModel/RolePath.cs 2009-11-24 09:27:17 UTC (rev 1418) +++ trunk/ORMModel/ObjectModel/RolePath.cs 2009-11-25 18:40:43 UTC (rev 1419) @@ -302,6 +302,17 @@ get { RolePathComponent component = this; + // The inheritance hierarchy is artificial here so + // that a LeadRolePath can be both a RolePath and + // a RolePathComponent. This means that RoleSubPath, + // which is never directly parented by an owner or + // compositor, is also a component. Treat this as + // a special case with a supertype accessing a subtype. + RoleSubPath subPath = component as RoleSubPath; + if (subPath != null) + { + component = subPath.RootRolePath; + } RolePathOwner retVal = null; while (component != null) { Modified: trunk/ORMModel/ObjectModel/ValueRange.cs =================================================================== --- trunk/ORMModel/ObjectModel/ValueRange.cs 2009-11-24 09:27:17 UTC (rev 1418) +++ trunk/ORMModel/ObjectModel/ValueRange.cs 2009-11-25 18:40:43 UTC (rev 1419) @@ -497,7 +497,6 @@ return; } DataType dataType = this.DataType; - RoleValueConstraint roleConstraint = null; bool hasError = true; if (dataType != null) { @@ -509,7 +508,7 @@ VerifyValueMatch(ranges[i], dataType, notifyAdded); } } - else if (null == (roleConstraint = (this as RoleValueConstraint))) + else if (this is ValueTypeValueConstraint) { // UNDONE: When we allow ValueConstraints directly on entity types then // this will change @@ -522,7 +521,7 @@ { error = new ValueConstraintValueTypeDetachedError(Store); error.ValueConstraint = this; - error.Model = roleConstraint.Role.FactType.Model; + error.Model = Model; error.GenerateErrorText(); if (notifyAdded != null) { @@ -1326,6 +1325,10 @@ /// </summary> public abstract IModelErrorDisplayContext ErrorDisplayContext { get;} /// <summary> + /// Get the <see cref="ORMModel"/> for this <see cref="ValueConstraint"/> + /// </summary> + public abstract ORMModel Model { get;} + /// <summary> /// Tests if the associated data type is a text type. /// </summary> public bool IsText @@ -1405,6 +1408,17 @@ return ValueType; } } + /// <summary> + /// Get the associated <see cref="ORMModel"/> + /// </summary> + public override ORMModel Model + { + get + { + ObjectType valueType = ValueType; + return valueType != null ? valueType.Model : null; + } + } #endregion // Base overrides #region IHasIndirectModelErrorOwner Implementation private static Guid[] myIndirectModelErrorOwnerLinkRoles; @@ -1461,6 +1475,23 @@ return Role; } } + /// <summary> + /// Get the associated <see cref="ORMModel"/> + /// </summary> + public override ORMModel Model + { + get + { + Role role; + FactType factType; + if (null != (role = Role) && + null != (factType = role.FactType)) + { + return factType.Model; + } + return null; + } + } #endregion // Base overrides #region IHasIndirectModelErrorOwner Implementation private static Guid[] myIndirectModelErrorOwnerLinkRoles; @@ -1519,6 +1550,23 @@ return leadRolePath != null ? leadRolePath.RootOwner as IModelErrorDisplayContext : null; } } + /// <summary> + /// Get the associated <see cref="ORMModel"/> + /// </summary> + public override ORMModel Model + { + get + { + PathedRole pathedRole; + RolePathOwner owner; + if (null != (pathedRole = PathedRole) && + null != (owner = pathedRole.RolePath.RootOwner)) + { + return owner.Model; + } + return null; + } + } #endregion // Base overrides #region IHasIndirectModelErrorOwner Implementation private static Guid[] myIndirectModelErrorOwnerLinkRoles; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2010-02-26 01:12:44
|
Revision: 1430 http://orm.svn.sourceforge.net/orm/?rev=1430&view=rev Author: mcurland Date: 2010-02-26 01:12:38 +0000 (Fri, 26 Feb 2010) Log Message: ----------- Stop blocking join paths for ring constraints. Join paths on rings are conceptually valid. refs #395 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Constraint.cs trunk/ORMModel/ObjectModel/ORM2Core.xsd Modified: trunk/ORMModel/ObjectModel/Constraint.cs =================================================================== --- trunk/ORMModel/ObjectModel/Constraint.cs 2010-02-25 19:26:10 UTC (rev 1429) +++ trunk/ORMModel/ObjectModel/Constraint.cs 2010-02-26 01:12:38 UTC (rev 1430) @@ -4416,7 +4416,6 @@ // case ConstraintType.SimpleMandatory: // case ConstraintType.ImpliedMandatory: case ConstraintType.DisjunctiveMandatory: - case ConstraintType.Ring: return false; } } @@ -4519,7 +4518,6 @@ case ConstraintType.ImpliedMandatory: case ConstraintType.SimpleMandatory: case ConstraintType.DisjunctiveMandatory: - case ConstraintType.Ring: // These never have join paths, do not bother tracking them return; } @@ -4550,7 +4548,6 @@ case ConstraintType.ImpliedMandatory: case ConstraintType.SimpleMandatory: case ConstraintType.DisjunctiveMandatory: - case ConstraintType.Ring: // These types never have a join path, and this is enforced // by the XML schema so they cannot be present on load. return; Modified: trunk/ORMModel/ObjectModel/ORM2Core.xsd =================================================================== --- trunk/ORMModel/ObjectModel/ORM2Core.xsd 2010-02-25 19:26:10 UTC (rev 1429) +++ trunk/ORMModel/ObjectModel/ORM2Core.xsd 2010-02-26 01:12:38 UTC (rev 1430) @@ -2072,7 +2072,7 @@ <xs:documentation>A constraint specifying relationships between elements of the same type in a set population.</xs:documentation> </xs:annotation> <xs:complexContent> - <xs:extension base="SetConstraintType"> + <xs:extension base="SetConstraintWithJoinType"> <xs:sequence> <xs:element name="Extensions" type="ExtensionsType" minOccurs="0"/> </xs:sequence> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2010-03-24 06:25:48
|
Revision: 1436 http://orm.svn.sourceforge.net/orm/?rev=1436&view=rev Author: mcurland Date: 2010-03-24 06:25:42 +0000 (Wed, 24 Mar 2010) Log Message: ----------- Updated style information in report verbalization snippets to correspond to various changes in the primary snippets. Corresponds to verbalization changes [1014] [1175] [1369] [1435] refs #315 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml Modified: trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs 2010-03-24 04:09:20 UTC (rev 1435) +++ trunk/ORMModel/ObjectModel/VerbalizationReportGenerator.cs 2010-03-24 06:25:42 UTC (rev 1436) @@ -394,10 +394,15 @@ .smallIndent { left: 8px; position: relative;} .listSeparator { color: windowtext; font-weight: 200;} .logicalOperator { color: MediumBlue; font-weight: bold;} - .note { color: DarkGray; font-style: italic; font-weight: normal; } + .note { color: Black; font-style: italic; font-weight: normal; } + .definition { color: Black; font-style: italic; font-weight: normal; } .notAvailable { font-style: italic; } .instance { color: Brown; font-weight: normal; } - + + table.hidden, tr.hidden, td.hidden {{ margin: 0em; padding: 0em; border-collapse: collapse;}} + td.hidden {{ vertical-align: top; }} + table.hidden {{ display:inline; }} + div.disclaimer { font-weight:bold; Modified: trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml 2010-03-24 04:09:20 UTC (rev 1435) +++ trunk/ORMModel/ObjectModel/VerbalizationReportSnippets/VerbalizationReportSnippets.xml 2010-03-24 06:25:42 UTC (rev 1436) @@ -247,10 +247,15 @@ .smallIndent { left: 8px; position: relative;} .listSeparator { color: windowtext; font-weight: 200;} .logicalOperator { color: MediumBlue; font-weight: bold;} - .note { color: DarkGray; font-style: italic; font-weight: normal; } + .note { color: Black; font-style: italic; font-weight: normal; } + .definition { color: Black; font-style: italic; font-weight: normal; } .notAvailable { font-style: italic; } .instance { color: Brown; font-weight: normal; } - + + table.hidden, tr.hidden, td.hidden {{ margin: 0em; padding: 0em; border-collapse: collapse;}} + td.hidden {{ vertical-align: top; }} + table.hidden {{ display:inline; }} + div.disclaimer { font-weight:bold; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2010-04-14 06:53:50
|
Revision: 1438 http://orm.svn.sourceforge.net/orm/?rev=1438&view=rev Author: mcurland Date: 2010-04-14 06:53:40 +0000 (Wed, 14 Apr 2010) Log Message: ----------- * Fixed some verbalization cases with subtype navigation. refs #395 * Fixed crash changing a remote correlation target Modified Paths: -------------- trunk/ORMModel/ObjectModel/RolePath.cs trunk/ORMModel/ObjectModel/Verbalization.cs Modified: trunk/ORMModel/ObjectModel/RolePath.cs =================================================================== --- trunk/ORMModel/ObjectModel/RolePath.cs 2010-04-02 22:27:07 UTC (rev 1437) +++ trunk/ORMModel/ObjectModel/RolePath.cs 2010-04-14 06:53:40 UTC (rev 1438) @@ -1252,7 +1252,7 @@ private static void RemoteCorrelationRolePlayerChangedRule(RolePlayerChangedEventArgs e) { // This will always change within the same lead path. Just use the new role player. - AddDelayedPathValidation((RolePath)e.NewRolePlayer); + AddDelayedPathValidation(((PathedRole)e.NewRolePlayer).RolePath); } /// <summary> /// AddRule: typeof(RolePathOwner) Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2010-04-02 22:27:07 UTC (rev 1437) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2010-04-14 06:53:40 UTC (rev 1438) @@ -4054,7 +4054,7 @@ /// the same set.</remarks> public bool AddCorrelatedVariable(RolePlayerVariable variable) { - if (myPrimaryVariable == variable) + if (myPrimaryVariable == variable || variable == null) { return false; } @@ -4298,6 +4298,18 @@ explicitParent = retVal.CorrelatingParent; } } + if (retVal.Role is SubtypeMetaRole && retVal.PathedRolePurpose == PathedRolePurpose.SameFactType) + { + foreach (PathedRole precedingPathedRole in GetPrecedingPathedRoles(retVal, false)) + { + // UNDONE: Consider supporting this pattern for negation as well. + if (precedingPathedRole.Role is SupertypeMetaRole && !retVal.IsNegated) + { + retVal = GetCorrelationRootPathedRole(precedingPathedRole); + } + break; + } + } return retVal; } /// <summary> @@ -6759,11 +6771,7 @@ useMap.TryGetValue(subtypePathedRole, out subtypeVariableUse)) { currentNode.Detach(ref headChildNode); - // Note that both variables are already registered, this just modifies the settings - // and adjust or adds the the join for the subtype variable. There is no need to remove - // other parts of the registered variable information. If there is a chained subtype, then - // the middle correlations steps will just be ignored. - RegisterRolePlayerUse(subtypePathedRole.Role.RolePlayer, supertypeVariableUse.PrimaryRolePlayerVariable, subtypePathedRole, null); + // Note that the variables are already correlated, all we need to do is pull the path. } } } @@ -7025,10 +7033,22 @@ RolePlayerVariableUse existingVariableUse; if (useMap.TryGetValue(usedFor, out existingVariableUse)) { - if (existingVariableUse.JoinedToVariable != joinToVariable) + if (joinToVariable != null && existingVariableUse.JoinedToVariable != joinToVariable) { existingVariableUse.JoinedToVariable = joinToVariable; - UpdateRolePlayerVariableUse(usedFor, existingVariableUse); + if (correlateWith == usedFor) + { + // Anything in the join should be in the head list as well + existingVariableUse.AddCorrelatedVariable(joinToVariable); + } + else if (correlateWith != null && correlationRootVariableUse.AddCorrelatedVariable(joinToVariable)) + { + if (correlationRootVariableUse.AddCorrelatedVariable(joinToVariable)) + { + useMap[correlateWith] = correlationRootVariableUse; + } + } + useMap[usedFor] = existingVariableUse; } } else @@ -7038,7 +7058,7 @@ if (addNewVariableToCorrelationRoot && correlationRootVariableUse.AddCorrelatedVariable(existingVariable)) { // An external variable was found that is not in the local correlation list - UpdateRolePlayerVariableUse(correlateWith, correlationRootVariableUse); + useMap[correlateWith] = correlationRootVariableUse; } } // Track use phase during registration to see if the root variable is @@ -7096,9 +7116,21 @@ { joinToVariable = null; } - if (existingVariableUse.JoinedToVariable != joinToVariable) + if (joinToVariable != null && existingVariableUse.JoinedToVariable != joinToVariable) { existingVariableUse.JoinedToVariable = joinToVariable; + if (correlateWith == usedFor) + { + // Anything in the join should be in the head list as well + existingVariableUse.AddCorrelatedVariable(joinToVariable); + } + else if (correlateWith != null && correlationRootVariableUse.AddCorrelatedVariable(joinToVariable)) + { + if (correlationRootVariableUse.AddCorrelatedVariable(joinToVariable)) + { + useMap[correlateWith] = correlationRootVariableUse; + } + } useMap[usedFor] = existingVariableUse; } } @@ -7138,7 +7170,7 @@ } if (addNewVariableToCorrelationRoot && existingVariable != null && correlationRootVariableUse.AddCorrelatedVariable(existingVariable)) { - UpdateRolePlayerVariableUse(correlateWith, correlationRootVariableUse); + useMap[correlateWith] = correlationRootVariableUse; } if (joinToVariable != null && joinedToExternalVariable && !existingVariable.IsExternalVariable) { @@ -7163,13 +7195,6 @@ return null; } /// <summary> - /// Update the <see cref="RolePlayerVariableUse"/> registered for a given key - /// </summary> - protected void UpdateRolePlayerVariableUse(object usedFor, RolePlayerVariableUse variableUse) - { - myUseToVariableMap[usedFor] = variableUse; - } - /// <summary> /// A chance for a subtype to add path projections using the /// <see cref="AddExternalVariable"/> method. /// </summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2010-10-22 20:53:05
|
Revision: 1462 http://orm.svn.sourceforge.net/orm/?rev=1462&view=rev Author: mcurland Date: 2010-10-22 20:52:58 +0000 (Fri, 22 Oct 2010) Log Message: ----------- * Add (non-displayed) uniqueness constraint verbalization to unary fact type verbalization * Fix crashing role path scenario with objectification deletion. refs #403 Modified Paths: -------------- trunk/ORMModel/ObjectModel/FactType.cs trunk/ORMModel/ObjectModel/RolePath.cs trunk/ORMModel/ObjectModel/Verbalization.cs trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs Modified: trunk/ORMModel/ObjectModel/FactType.cs =================================================================== --- trunk/ORMModel/ObjectModel/FactType.cs 2010-10-20 20:51:14 UTC (rev 1461) +++ trunk/ORMModel/ObjectModel/FactType.cs 2010-10-22 20:52:58 UTC (rev 1462) @@ -2675,7 +2675,8 @@ bool lookForCombined = !isNegative && Shell.OptionsPage.CurrentCombineMandatoryAndUniqueVerbalization; LinkedElementCollection<RoleBase> factRoles = RoleCollection; - bool isUnaryFactType = FactType.GetUnaryRoleIndex(factRoles).HasValue; + int? unaryRoleIndex = FactType.GetUnaryRoleIndex(factRoles); + bool isUnaryFactType = unaryRoleIndex.HasValue; if (!isUnaryFactType && 2 == factRoles.Count) { Role[] roles = new Role[2]; @@ -2904,6 +2905,16 @@ } } } + else + { + // Verbalize the uniqueness constraint on the unary role + UniquenessConstraint constraint; + if (null != (constraint = factRoles[unaryRoleIndex.Value].Role.SingleRoleAlethicUniquenessConstraint) && + (filter == null || !filter.FilterChildVerbalizer(constraint, sign).IsBlocked)) + { + yield return CustomChildVerbalizer.VerbalizeInstance((IVerbalize)constraint); + } + } } // Verbalize other single-facttype set constraints Modified: trunk/ORMModel/ObjectModel/RolePath.cs =================================================================== --- trunk/ORMModel/ObjectModel/RolePath.cs 2010-10-20 20:51:14 UTC (rev 1461) +++ trunk/ORMModel/ObjectModel/RolePath.cs 2010-10-22 20:52:58 UTC (rev 1462) @@ -2932,6 +2932,7 @@ if (previousPathedRole == null) { pushFactType = currentFactType; + hasSameFactTypeWithoutJoinError = true; } else { Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2010-10-20 20:51:14 UTC (rev 1461) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2010-10-22 20:52:58 UTC (rev 1462) @@ -6229,7 +6229,7 @@ } } } - if (!sameFactType) + if (!sameFactType || contextPathNode.PathedRole == null) { // Unwind the stack roleUseBaseIndex = PopFactType(factTypeRolesStack, ref roleUseTracker); @@ -6254,8 +6254,20 @@ } if (sameFactType) { - if (currentPathedRoleIndex == 0) + if (contextPathNode.PathedRole == null) { + // Error condition, missing an entry role, push the fact type + // so the stack does not get out of balance. + currentRole = currentPathedRole.Role; + roleUseBaseIndex = PushFactType(currentRole.FactType, currentPathedRole, currentPathedRoles, currentPathedRoleIndex, factTypeRolesStack, ref roleUseTracker, pathConditions, ref processedPathConditions, ref pendingRequiredVariableKeys); + resolvedRoleIndex = ResolveRoleIndex(factTypeRolesStack.Peek(), currentRole); + if (resolvedRoleIndex != -1) // Defensive, guard against bogus path + { + roleUseTracker[roleUseBaseIndex + resolvedRoleIndex] = true; + } + } + else if (currentPathedRoleIndex == 0) + { #region Lead same fact type condition processing // Get the chain node we just pushed VerbalizationPlanNode contextChainNode = myCurrentBranchNode; Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2010-10-20 20:51:14 UTC (rev 1461) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2010-10-22 20:52:58 UTC (rev 1462) @@ -64,7 +64,7 @@ <Snippet type="OneQuantifier" sign="negative"><![CDATA[<span class="quantifier">more than one</span> {0}]]></Snippet> - <Snippet type="OccursInPopulation" sign="positive"><![CDATA[<span class="quantifier">in each population of</span> {1}<span class="quantifier">, </span>{0} <span class="quantifier">occurs at most once</span>]]></Snippet> + <Snippet type="OccursInPopulation" sign="positive"><![CDATA[<span class="quantifier">in each population of</span> {1}<span class="listSeparator">, </span>{0} <span class="quantifier">occurs at most once</span>]]></Snippet> <Snippet type="OccursInPopulation" sign="negative"><![CDATA[{0} <span class="quantifier">occurs more than once in the same population of</span> {1}]]></Snippet> <Snippet type="ModalPossibilityOperator" modality="alethic" sign="positive"><![CDATA[<span class="quantifier">it is possible that</span> {0}]]></Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2010-10-20 20:51:14 UTC (rev 1461) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2010-10-22 20:52:58 UTC (rev 1462) @@ -521,7 +521,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub style=""font-size:smaller;"">{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub style=""font-size:smaller;"">{2}</sub></a>", - @"<span class=""quantifier"">in each population of</span> {1}<span class=""quantifier"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", + @"<span class=""quantifier"">in each population of</span> {1}<span class=""listSeparator"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", @"<span class=""quantifier"">at most one</span> {0}", @"<span class=""quantifier"">+</span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"{0}<span class=""listSeparator"">.</span>{1}", @@ -730,7 +730,7 @@ @"<span class=""listSeparator"">, </span>", @"<span class=""objectTypeMissing"">Missing<sub style=""font-size:smaller;"">{0}</sub></span>", @"<a class=""objectType"" href=""elementid:{1}"">{0}<sub style=""font-size:smaller;"">{2}</sub></a>", - @"<span class=""quantifier"">in each population of</span> {1}<span class=""quantifier"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", + @"<span class=""quantifier"">in each population of</span> {1}<span class=""listSeparator"">, </span>{0} <span class=""quantifier"">occurs at most once</span>", @"<span class=""quantifier"">at most one</span> {0}", @"<span class=""quantifier"">+</span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"{0}<span class=""listSeparator"">.</span>{1}", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2013-04-23 22:05:04
|
Revision: 1516 http://orm.svn.sourceforge.net/orm/?rev=1516&view=rev Author: mcurland Date: 2013-04-23 22:04:54 +0000 (Tue, 23 Apr 2013) Log Message: ----------- * Report generation constraint report stops showing some constraints after the first constraint of that type. Fixed by changing verbalization helper objects to calculate equality on current state instead of having the same identity for all uses so that 'alreadyVerbalized' does not get triggered. * Changing derivation projection to a different pathed role crashed due to improper cast in tracking rule. * Verbalization of disjunctive mandatory constraints with multiple restricted (compatible) role players and multiple roles in the same fact type was incorrectly correlated constrained roles. Fixed by correlating the 'primary' role for each fact statement instead of the 'included' roles. * Fact type derivation path schema requires DerivationProjections before InformalRule elements, but the serializer was unordered for these element. Mark child elements as ordered for FactTypeDerivationRule serialization. Modified Paths: -------------- trunk/ORMModel/ObjectModel/Constraint.cs trunk/ORMModel/ObjectModel/FactType.cs trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml trunk/ORMModel/ObjectModel/ObjectType.cs trunk/ORMModel/ObjectModel/Role.cs trunk/ORMModel/ObjectModel/RolePath.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml Modified: trunk/ORMModel/ObjectModel/Constraint.cs =================================================================== --- trunk/ORMModel/ObjectModel/Constraint.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/Constraint.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -8184,6 +8184,25 @@ return verbalizer.myConstraint; } #endregion // Passthrough properties + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myConstraint != null ? myConstraint.GetHashCode() : 0, this.GetType().GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + return obj != null && obj.GetType() == this.GetType() && ((UniquenessVerbalizerBase)obj).myConstraint == myConstraint; + } + #endregion // Equality Overrides } private partial class UniquenessConstraintVerbalizer : UniquenessVerbalizerBase { } private partial class UniquenessPossibilityVerbalizer : UniquenessVerbalizerBase { } @@ -8451,6 +8470,25 @@ return verbalizer.myConstraint; } #endregion // Passthrough properties + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myConstraint != null ? myConstraint.GetHashCode() : 0, this.GetType().GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + return obj != null && obj.GetType() == this.GetType() && ((MandatoryVerbalizerBase)obj).myConstraint == myConstraint; + } + #endregion // Equality Overrides } private partial class SimpleMandatoryVerbalizer : MandatoryVerbalizerBase { } private partial class DisjunctiveMandatoryVerbalizer : MandatoryVerbalizerBase { } @@ -9459,6 +9497,25 @@ } } #endregion // Passthrough properties + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myConstraint != null ? myConstraint.GetHashCode() : 0, this.GetType().GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + return obj != null && obj.GetType() == this.GetType() && ((RingVerbalizerBase)obj).myConstraint == myConstraint; + } + #endregion // Equality Overrides } private partial class AcyclicRingVerbalizer : RingVerbalizerBase { } private partial class AntisymmetricRingVerbalizer : RingVerbalizerBase { } Modified: trunk/ORMModel/ObjectModel/FactType.cs =================================================================== --- trunk/ORMModel/ObjectModel/FactType.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/FactType.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -2699,23 +2699,23 @@ /// </summary> private partial class ImpliedUniqueVerbalizer { - private FactType myFact; + private FactType myFactType; private UniquenessConstraint myConstraint; - public void Initialize(FactType fact, UniquenessConstraint constraint) + public void Initialize(FactType factType, UniquenessConstraint constraint) { - myFact = fact; + myFactType = factType; myConstraint = constraint; } private void DisposeHelper() { - myFact = null; + myFactType = null; myConstraint = null; } private FactType FactType { get { - return myFact; + return myFactType; } } private LinkedElementCollection<Role> RoleCollection @@ -2739,6 +2739,26 @@ return myConstraint.IsPreferred; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myFactType != null ? myFactType.GetHashCode() : 0, myConstraint != null ? myConstraint.GetHashCode() : 0); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + ImpliedUniqueVerbalizer other; + return (null != (other = obj as ImpliedUniqueVerbalizer)) && other.myFactType == myFactType && other.myConstraint == myConstraint; + } + #endregion // Equality Overrides } #endregion // ImpliedUniqueVerbalizer class #region ImpliedMandatoryVerbalizer class @@ -2748,23 +2768,23 @@ /// </summary> private partial class ImpliedMandatoryVerbalizer { - private FactType myFact; + private FactType myFactType; private MandatoryConstraint myConstraint; - public void Initialize(FactType fact, MandatoryConstraint constraint) + public void Initialize(FactType factType, MandatoryConstraint constraint) { - myFact = fact; + myFactType = factType; myConstraint = constraint; } private void DisposeHelper() { - myFact = null; + myFactType = null; myConstraint = null; } private FactType FactType { get { - return myFact; + return myFactType; } } private LinkedElementCollection<Role> RoleCollection @@ -2781,6 +2801,26 @@ return myConstraint.Modality; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myFactType != null ? myFactType.GetHashCode() : 0, myConstraint != null ? myConstraint.GetHashCode() : 0); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + ImpliedMandatoryVerbalizer other; + return (null != (other = obj as ImpliedMandatoryVerbalizer)) && other.myFactType == myFactType && other.myConstraint == myConstraint; + } + #endregion // Equality Overrides } #endregion // ImpliedMandatoryVerbalizer class #region CombinedMandatoryUniqueVerbalizer class @@ -2790,18 +2830,18 @@ /// </summary> private partial class CombinedMandatoryUniqueVerbalizer : IModelErrorOwner { - private FactType myFact; + private FactType myFactType; private UniquenessConstraint myUniquenessConstraint; private MandatoryConstraint myMandatoryConstraint; - public void Initialize(FactType fact, UniquenessConstraint uniquenessConstraint, MandatoryConstraint mandatoryConstraint) + public void Initialize(FactType factType, UniquenessConstraint uniquenessConstraint, MandatoryConstraint mandatoryConstraint) { - myFact = fact; + myFactType = factType; myUniquenessConstraint = uniquenessConstraint; myMandatoryConstraint = mandatoryConstraint; } private void DisposeHelper() { - myFact = null; + myFactType = null; myUniquenessConstraint = null; myMandatoryConstraint = null; } @@ -2809,7 +2849,7 @@ { get { - return myFact; + return myFactType; } } private LinkedElementCollection<Role> RoleCollection @@ -2847,6 +2887,26 @@ { } #endregion // IModelErrorOwner Implementation + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myFactType != null ? myFactType.GetHashCode() : 0, myMandatoryConstraint != null ? myMandatoryConstraint.GetHashCode() : 0, myUniquenessConstraint != null ? myUniquenessConstraint.GetHashCode() : 0); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + CombinedMandatoryUniqueVerbalizer other; + return (null != (other = obj as CombinedMandatoryUniqueVerbalizer)) && other.myFactType == myFactType && other.myMandatoryConstraint == myMandatoryConstraint && other.myMandatoryConstraint == myMandatoryConstraint; + } + #endregion // Equality Overrides } #endregion // CombinedMandatoryUniqueVerbalizer class #region FactTypeInstanceVerbalizer class @@ -2856,25 +2916,25 @@ /// </summary> private partial class FactTypeInstanceVerbalizer { - private FactType myFact; + private FactType myFactType; private FactTypeInstance myInstance; private bool myDisplayIdentifier; public void Initialize(FactType factType, FactTypeInstance factInstance, bool displayIdentifier) { - myFact = factType; + myFactType = factType; myInstance = factInstance; myDisplayIdentifier = displayIdentifier; } private void DisposeHelper() { - myFact = null; + myFactType = null; myInstance = null; } private FactType FactType { get { - return myFact; + return myFactType; } } private FactTypeInstance Instance @@ -2891,6 +2951,26 @@ return myDisplayIdentifier; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myFactType != null ? myFactType.GetHashCode() : 0, myInstance != null ? myInstance.GetHashCode() : 0, myDisplayIdentifier.GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + FactTypeInstanceVerbalizer other; + return (null != (other = obj as FactTypeInstanceVerbalizer)) && other.myFactType == myFactType && other.myInstance == myInstance && other.myDisplayIdentifier == myDisplayIdentifier; + } + #endregion // Equality Overrides } #endregion // FactTypeInstanceVerbalizer class #region IVerbalizeCustomChildren Implementation @@ -3214,23 +3294,23 @@ #region DefaultBinaryMissingUniquenessVerbalizer private partial class DefaultBinaryMissingUniquenessVerbalizer { - private FactType myFact; + private FactType myFactType; private UniquenessConstraint myConstraint; - public void Initialize(FactType fact, UniquenessConstraint constraint) + public void Initialize(FactType factType, UniquenessConstraint constraint) { - myFact = fact; + myFactType = factType; myConstraint = constraint; } private void DisposeHelper() { - myFact = null; + myFactType = null; myConstraint = null; } private FactType FactType { get { - return myFact; + return myFactType; } } private LinkedElementCollection<Role> RoleCollection @@ -3247,6 +3327,26 @@ return myConstraint.Modality; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myFactType != null ? myFactType.GetHashCode() : 0, myConstraint != null ? myConstraint.GetHashCode() : 0); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + DefaultBinaryMissingUniquenessVerbalizer other; + return (null != (other = obj as DefaultBinaryMissingUniquenessVerbalizer)) && other.myFactType == myFactType && other.myConstraint == myConstraint; + } + #endregion // Equality Overrides } #endregion // DefaultBinaryMissingUniquenessVerbalizer #region IHierarchyContextEnabled Members Modified: trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -3961,7 +3961,7 @@ { get { - return base.SupportedCustomSerializedOperations | CustomSerializedElementSupportedOperations.ChildElementInfo | CustomSerializedElementSupportedOperations.ElementInfo | CustomSerializedElementSupportedOperations.PropertyInfo | CustomSerializedElementSupportedOperations.LinkInfo; + return base.SupportedCustomSerializedOperations | CustomSerializedElementSupportedOperations.ChildElementInfo | CustomSerializedElementSupportedOperations.ElementInfo | CustomSerializedElementSupportedOperations.PropertyInfo | CustomSerializedElementSupportedOperations.LinkInfo | CustomSerializedElementSupportedOperations.CustomSortChildRoles; } } CustomSerializedElementSupportedOperations ICustomSerializedElement.SupportedCustomSerializedOperations @@ -4093,6 +4093,74 @@ { return this.GetCustomSerializedLinkInfo(rolePlayedInfo, elementLink); } + private static IComparer<DomainRoleInfo> myCustomSortChildComparer; + private sealed class CustomSortChildComparer : IComparer<DomainRoleInfo> + { + private readonly Dictionary<string, int> myRoleOrderDictionary; + private IComparer<DomainRoleInfo> myBaseComparer; + public CustomSortChildComparer(Store store, IComparer<DomainRoleInfo> baseComparer) + { + this.myBaseComparer = baseComparer; + DomainDataDirectory domainDataDirectory = store.DomainDataDirectory; + Dictionary<string, int> roleOrderDictionary = new Dictionary<string, int>(); + DomainRoleInfo domainRole; + domainRole = domainDataDirectory.FindDomainRole(RoleSetDerivationProjection.RolePathDomainRoleId).OppositeDomainRole; + roleOrderDictionary[string.Concat(domainRole.DomainRelationship.ImplementationClass.FullName, ".", domainRole.Name)] = 0; + domainRole = domainDataDirectory.FindDomainRole(FactTypeDerivationRuleHasDerivationNote.DerivationNoteDomainRoleId).OppositeDomainRole; + roleOrderDictionary[string.Concat(domainRole.DomainRelationship.ImplementationClass.FullName, ".", domainRole.Name)] = 1; + domainRole = domainDataDirectory.FindDomainRole(RoleProjectedDerivationRuleHasProjectionRequiredError.ProjectionRequiredErrorDomainRoleId).OppositeDomainRole; + roleOrderDictionary[string.Concat(domainRole.DomainRelationship.ImplementationClass.FullName, ".", domainRole.Name)] = 2; + this.myRoleOrderDictionary = roleOrderDictionary; + } + int IComparer<DomainRoleInfo>.Compare(DomainRoleInfo x, DomainRoleInfo y) + { + if (this.myBaseComparer != null) + { + int baseOpinion = this.myBaseComparer.Compare(x, y); + if (0 != baseOpinion) + { + return baseOpinion; + } + } + int xPos; + if (!this.myRoleOrderDictionary.TryGetValue(string.Concat(x.DomainRelationship.ImplementationClass.FullName, ".", x.Name), out xPos)) + { + xPos = int.MaxValue; + } + int yPos; + if (!this.myRoleOrderDictionary.TryGetValue(string.Concat(y.DomainRelationship.ImplementationClass.FullName, ".", y.Name), out yPos)) + { + yPos = int.MaxValue; + } + return xPos.CompareTo(yPos); + } + } + /// <summary>Implements ICustomSerializedElement.CustomSerializedChildRoleComparer</summary> + protected new IComparer<DomainRoleInfo> CustomSerializedChildRoleComparer + { + get + { + IComparer<DomainRoleInfo> retVal = FactTypeDerivationRule.myCustomSortChildComparer; + if (null == retVal) + { + IComparer<DomainRoleInfo> baseComparer = null; + if (0 != (CustomSerializedElementSupportedOperations.CustomSortChildRoles & base.SupportedCustomSerializedOperations)) + { + baseComparer = base.CustomSerializedChildRoleComparer; + } + retVal = new CustomSortChildComparer(this.Store, baseComparer); + FactTypeDerivationRule.myCustomSortChildComparer = retVal; + } + return retVal; + } + } + IComparer<DomainRoleInfo> ICustomSerializedElement.CustomSerializedChildRoleComparer + { + get + { + return this.CustomSerializedChildRoleComparer; + } + } private static Dictionary<string, CustomSerializedElementMatch> myChildElementMappings; /// <summary>Implements ICustomSerializedElement.MapChildElement</summary> protected new CustomSerializedElementMatch MapChildElement(string elementNamespace, string elementName, string containerNamespace, string containerName, string outerContainerNamespace, string outerContainerName) Modified: trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/ORMCore.SerializationExtensions.xml 2013-04-23 22:04:54 UTC (rev 1516) @@ -678,7 +678,7 @@ </se:Element> <!-- UNDONE: File format change, remove derivation expression. --> <se:Element Class="FactTypeDerivationExpression" Name="DerivationExpression" Override="true"/> - <se:Element Class="FactTypeDerivationRule" Name="FactTypeDerivationPath" Override="true"> + <se:Element Class="FactTypeDerivationRule" Name="FactTypeDerivationPath" Override="true" SortChildElements="true"> <se:Attribute ID="DerivationCompleteness"> <se:Condition WriteStyle="NotWritten"> <plx:binaryOperator type="equality"> Modified: trunk/ORMModel/ObjectModel/ObjectType.cs =================================================================== --- trunk/ORMModel/ObjectModel/ObjectType.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/ObjectType.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -4961,26 +4961,48 @@ #region ObjectTypeInstanceVerbalizer class private partial class ObjectTypeInstanceVerbalizer { - private ObjectType myParentObject; + private ObjectType myParentObjectType; private IList<ObjectTypeInstance> myInstances; - public void Initialize(ObjectType parentObject, IList<ObjectTypeInstance> instances) + public void Initialize(ObjectType parentObjectType, IList<ObjectTypeInstance> instances) { - myParentObject = parentObject; + myParentObjectType = parentObjectType; myInstances = instances; } private void DisposeHelper() { - myParentObject = null; + myParentObjectType = null; myInstances = null; } private ObjectType ParentObject { - get { return myParentObject; } + get { return myParentObjectType; } } private IList<ObjectTypeInstance> Instances { get { return myInstances; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + // Ignore the actual instances for equality, but combine additional + // data so that we aren't exactly the same as the object type. + return Utility.GetCombinedHashCode(myParentObjectType != null ? myParentObjectType.GetHashCode() : 0, GetType().GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + ObjectTypeInstanceVerbalizer other; + return (null != (other = obj as ObjectTypeInstanceVerbalizer)) && other.myParentObjectType == myParentObjectType; + } + #endregion // Equality Overrides } #endregion // ObjectTypeInstanceVerbalizer class #region NearestValueConstraintVerbalizer class @@ -5026,6 +5048,26 @@ return myValueConstraint.ValueRangeCollection; } } + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + return Utility.GetCombinedHashCode(myParentObjectType != null ? myParentObjectType.GetHashCode() : 0, myValueConstraint != null ? myValueConstraint.GetHashCode() : 0); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + NearestValueConstraintVerbalizer other; + return (null != (other = obj as NearestValueConstraintVerbalizer)) && other.myParentObjectType == myParentObjectType && other.myValueConstraint == myValueConstraint; + } + #endregion // Equality Overrides } #endregion // NearestValueConstraintVerbalizer class } Modified: trunk/ORMModel/ObjectModel/Role.cs =================================================================== --- trunk/ORMModel/ObjectModel/Role.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/Role.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -1520,6 +1520,28 @@ { } #endregion // IModelErrorOwner Implementation + #region Equality Overrides + // Override equality operators so that muliple uses of the verbalization helper + // for this object with different values does not trigger an 'already verbalized' + // response for later verbalizations. + /// <summary> + /// Standard equality override + /// </summary> + public override int GetHashCode() + { + // Combine the role has code with a nother value so we don't get in a hash + // bucket with the role itself. + return Utility.GetCombinedHashCode(myRole != null ? myRole.GetHashCode() : 0, GetType().GetHashCode()); + } + /// <summary> + /// Standard equality override + /// </summary> + public override bool Equals(object obj) + { + ErrorReport other; + return (null != (other = obj as ErrorReport)) && other.myRole == myRole; + } + #endregion // Equality Overrides } #endregion // ErrorReport verbalizer class #endregion // IVerbalizeCustomChildren Implementation Modified: trunk/ORMModel/ObjectModel/RolePath.cs =================================================================== --- trunk/ORMModel/ObjectModel/RolePath.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/RolePath.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -5812,7 +5812,7 @@ { if (e.DomainRole.Id == DerivedRoleProjectedFromPathedRole.SourceDomainRoleId) { - DerivedRoleProjection projection = ((DerivedRoleProjectedFromRolePathRoot)e.ElementLink).RoleProjection; + DerivedRoleProjection projection = ((DerivedRoleProjectedFromPathedRole)e.ElementLink).RoleProjection; if (projection.IsAutomatic && !ChangingAutomaticProjection(projection.Store, null)) { projection.IsAutomatic = false; Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2013-04-23 22:04:54 UTC (rev 1516) @@ -7176,7 +7176,11 @@ { if (replaceRole == constraintRole.Role) { - return pathVerbalizer.RenderAssociatedRolePlayer(constraintRole, hyphenBindingFormatString, RolePathRolePlayerRenderingOptions.Quantify); + if (primaryRole == replaceRole) + { + return pathVerbalizer.RenderAssociatedRolePlayer(constraintRole, hyphenBindingFormatString, RolePathRolePlayerRenderingOptions.Quantify); + } + break; } } return pathVerbalizer.RenderAssociatedRolePlayer(replaceRole, hyphenBindingFormatString, RolePathRolePlayerRenderingOptions.Quantify); Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2013-03-18 22:49:06 UTC (rev 1515) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2013-04-23 22:04:54 UTC (rev 1516) @@ -670,7 +670,7 @@ <CompositeList listStyle="IndentedLogicalOrList"> <IterateRoles match="providedConstraintRoles" minFactArity="2"> <Fact readingChoice="PreferPrimaryLeadReadingNoFrontText"> - <ProvidedPredicateReplacement match="included" minimizeHeadSubscripting="true" quantify="true"/> + <ProvidedPredicateReplacement match="primary" minimizeHeadSubscripting="true" quantify="true"/> <ProvidedPredicateReplacement match="excluded" minimizeHeadSubscripting="true" quantify="true"/> </Fact> </IterateRoles> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2013-10-28 01:33:01
|
Revision: 1529 http://sourceforge.net/p/orm/code/1529 Author: mcurland Date: 2013-10-28 01:32:57 +0000 (Mon, 28 Oct 2013) Log Message: ----------- Ongoing derivation rule verbalization adjustments: * Add 'is by definition' to the subtype derivation rules to clarify the intent of the subtype derivation. * Fixed some variable subscripting cases during verbalization and adjusted when variables are descoped in negations. Modified Paths: -------------- trunk/ORMModel/ObjectModel/Verbalization.cs trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2013-10-28 01:32:57 UTC (rev 1529) @@ -4135,6 +4135,7 @@ private StateFlags myFlags; private ObjectType myRolePlayer; private int mySubscript; + private int mySubscriptOffset; private int myUsePhase; private int myDescopedUseCount; /// <summary> @@ -4145,6 +4146,7 @@ { myRolePlayer = rolePlayer; mySubscript = -1; + mySubscriptOffset = 0; } /// <summary> /// Get the associated role player @@ -4163,7 +4165,7 @@ /// consistent across use phases, so once a subscript /// for a variable has been set it does not change. /// </summary> - public int Subscript + public int BaseSubscript { get { @@ -4175,6 +4177,37 @@ } } /// <summary> + /// Get or set the subscript offset, which is calculated + /// from the descoped counts on variables of this type + /// when this is set. + /// </summary> + public int SubscriptOffset + { + get + { + return mySubscriptOffset; + } + set + { + mySubscriptOffset = value; + } + } + /// <summary> + /// Get the current displayed subscript for this variable. + /// </summary> + public int Subscript + { + get + { + int retVal = mySubscript; + if (retVal > 0) + { + retVal += mySubscriptOffset; + } + return retVal; + } + } + /// <summary> /// Return the current use phase for this variable /// </summary> public int UsePhase @@ -4221,6 +4254,7 @@ { myUsePhase = 0; mySubscript = -1; + mySubscriptOffset = 0; ++myDescopedUseCount; } /// <summary> @@ -4434,12 +4468,12 @@ else { RolePlayerVariable currentVariable = node.Value; - retVal = Math.Max(currentVariable.Subscript, retVal); + retVal = Math.Max(currentVariable.BaseSubscript, retVal); descopedCount += currentVariable.DescopedCount; while (nextNode != null) { currentVariable = nextNode.Value; - retVal = Math.Max(currentVariable.Subscript, retVal); + retVal = Math.Max(currentVariable.BaseSubscript, retVal); descopedCount += currentVariable.DescopedCount; nextNode = nextNode.Next; } @@ -4449,11 +4483,12 @@ } ++retVal; } + variable.BaseSubscript = retVal; + variable.SubscriptOffset = descopedCount; if (retVal != 0) { retVal += descopedCount; } - variable.Subscript = retVal; } return retVal; } @@ -7570,6 +7605,7 @@ { collapseBlockingSnippets = new CoreVerbalizationSnippetType[] { }; } + myCollapseBlockingSnippets = collapseBlockingSnippets; } switch (collapseBlockingSnippets.Length) { @@ -10665,22 +10701,71 @@ VerbalizationPlanBranchType childBranchType; VerbalizationPlanNodeType previousChildNodeType = (VerbalizationPlanNodeType)(-1); VerbalizationPlanNode previousChildNode = null; + bool pushPopPairing = true; + bool popPairingAfterOnly = false; + if (childNodeLink != null) + { + switch (renderingStyle) + { + case VerbalizationPlanBranchRenderingStyle.IsolatedList: + pushPopPairing = false; + break; + case VerbalizationPlanBranchRenderingStyle.OperatorSeparated: + switch (branchType) + { + case VerbalizationPlanBranchType.None: + case VerbalizationPlanBranchType.AndSplit: + pushPopPairing = false; + break; + case VerbalizationPlanBranchType.Chain: + VerbalizationPlanNode testLeadNegation = childNodeLink.Value; + if (testLeadNegation.NodeType == VerbalizationPlanNodeType.VariableExistence && + testLeadNegation.NegateExistence) + { + popPairingAfterOnly = true; + } + else + { + pushPopPairing = false; + } + break; + case VerbalizationPlanBranchType.NegatedAndSplit: + case VerbalizationPlanBranchType.NegatedChain: + popPairingAfterOnly = true; + break; + } + break; + } + } while (childNodeLink != null) { snippet = (CoreVerbalizationSnippetType)(-1); childNode = childNodeLink.Value; switch (renderingStyle) { - case VerbalizationPlanBranchRenderingStyle.HeaderList: - if (!first) + case VerbalizationPlanBranchRenderingStyle.IsolatedList: + BeginQuantificationUsePhase(); + break; + default: + if (pushPopPairing) { - PopPairingUsePhase(); + if (popPairingAfterOnly) + { + if (first) + { + PushPairingUsePhase(); + } + } + else + { + if (!first) + { + PopPairingUsePhase(); + } + PushPairingUsePhase(); + } } - PushPairingUsePhase(); break; - case VerbalizationPlanBranchRenderingStyle.IsolatedList: - BeginQuantificationUsePhase(); - break; } string requiredVariableContextPhrase = null; LinkedNode<object> requiredVariableUseKeyLink = childNode.RequiredContextVariableUseKeys; @@ -10994,7 +11079,7 @@ outdentPosition = nestedOutdent; } } - if (renderingStyle == VerbalizationPlanBranchRenderingStyle.HeaderList) + if (pushPopPairing) { PopPairingUsePhase(); } @@ -11452,14 +11537,17 @@ { // Skip partnering if possible. Pretend that the variables are the same variable by giving them // the same subscript. - int partnerSubscript = partnerWithVariable.Subscript; - int primarySubscript = primaryVariable.Subscript; + int partnerSubscript = partnerWithVariable.BaseSubscript; + int primarySubscript = primaryVariable.BaseSubscript; + int partnerSubscriptOffset = partnerWithVariable.SubscriptOffset; + int primarySubscriptOffset = primaryVariable.SubscriptOffset; if (primarySubscript == -1) { if (partnerSubscript != -1) { // Use the existing subscript - primaryVariable.Subscript = primarySubscript = partnerSubscript; + primaryVariable.BaseSubscript = primarySubscript = partnerSubscript; + primaryVariable.SubscriptOffset = primarySubscriptOffset = partnerSubscriptOffset; if (IsPairingUsePhaseInScope(partnerWithVariable.UsePhase)) { UseVariable(primaryVariable, CurrentQuantificationUsePhase, false); @@ -11475,7 +11563,8 @@ } if (partnerSubscript == -1) { - partnerWithVariable.Subscript = primarySubscript = partnerSubscript = primaryVariable.Subscript; // Primary subscript now reserved and set by GetSubscriptedRolePlayerName, read off new value + partnerWithVariable.BaseSubscript = primarySubscript = partnerSubscript = primaryVariable.BaseSubscript; // Primary subscript now reserved and set by GetSubscriptedRolePlayerName, read off new value + partnerWithVariable.SubscriptOffset = primarySubscriptOffset = partnerSubscriptOffset = primaryVariable.SubscriptOffset; } } else @@ -11486,7 +11575,8 @@ } if (partnerSubscript == -1) { - partnerWithVariable.Subscript = partnerSubscript = primarySubscript; + partnerWithVariable.BaseSubscript = partnerSubscript = primarySubscript; + partnerWithVariable.SubscriptOffset = partnerSubscriptOffset = primarySubscriptOffset; if (IsPairingUsePhaseInScope(primaryVariable.UsePhase)) { UseVariable(partnerWithVariable, CurrentQuantificationUsePhase, false); Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xml 2013-10-28 01:32:57 UTC (rev 1529) @@ -96,11 +96,11 @@ <Snippet type="PartialFactTypeDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">+</sup></span>{0} <span class="quantifier">if</span><br/>{1}<br/>]]></Snippet> <Snippet type="PartialFactTypeStoredDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">++</sup></span>{0} <span class="quantifier">if</span><br/>{1}<br/>]]></Snippet> <Snippet type="PartialStoredFactTypeDescription"><![CDATA[<span class="indent"><span class="quantifier">derived instances of this fact type are also stored immediately after they are derived</span></span>]]></Snippet> - <Snippet type="FullSubtypeDerivation"><![CDATA[<span class="quantifier">*Each</span> {0} <span class="quantifier">is</span> {1}]]></Snippet> - <Snippet type="FullSubtypeStoredDerivation"><![CDATA[<span class="quantifier">**Each</span> {0} <span class="quantifier">is</span> {1}]]></Snippet> + <Snippet type="FullSubtypeDerivation"><![CDATA[<span class="quantifier">*Each</span> {0} <span class="quantifier">is by definition</span> {1}]]></Snippet> + <Snippet type="FullSubtypeStoredDerivation"><![CDATA[<span class="quantifier">**Each</span> {0} <span class="quantifier">is by definition</span> {1}]]></Snippet> <Snippet type="FullStoredSubtypeDescription"><![CDATA[<span class="smallIndent"><span class="quantifier">instances of this subtype are stored immediately after they are derived</span></span>]]></Snippet> - <Snippet type="PartialSubtypeDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">+</sup>each derived</span> {0} <span class="quantifier">is</span> {1}]]></Snippet> - <Snippet type="PartialSubtypeStoredDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">++</sup>each derived</span> {0} <span class="quantifier">is</span> {1}]]></Snippet> + <Snippet type="PartialSubtypeDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">+</sup>each derived</span> {0} <span class="quantifier">is by definition</span> {1}]]></Snippet> + <Snippet type="PartialSubtypeStoredDerivation"><![CDATA[<span class="quantifier"><sup style="font-size:smaller;">++</sup>each derived</span> {0} <span class="quantifier">is by definition</span> {1}]]></Snippet> <Snippet type="PartialStoredSubtypeDescription"><![CDATA[<span class="smallIndent"><span class="quantifier">derived instances of this subtype are also stored immediately after they are derived</span></span>]]></Snippet> <Snippet type="QueryParameterContainer"><![CDATA[<span class="quantifier">given</span> {0} ]]></Snippet> <Snippet type="QueryNamedParameter"><![CDATA[{1}<span class="logicalOperator">=</span>{0}]]></Snippet> @@ -312,7 +312,7 @@ <Snippet type="RolePathHeaderListDirective"><![CDATA[!And !Or Xor !Xor]]></Snippet> <Snippet type="RolePathCollapsibleLeadDirective"><![CDATA[And Or Chain]]></Snippet> <Snippet type="RolePathCollapsibleListOpenForBackReferenceDirective"><![CDATA[And Or Chain]]></Snippet> - <Snippet type="RolePathBlockLeadCollapseForSnippetDirective"><![CDATA[AndTailListOpen OrTailListOpen]]></Snippet> + <Snippet type="RolePathBlockLeadCollapseForSnippetDirective"><![CDATA[AndTailListOpen OrTailListOpen ChainedListLocalRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListTopLevelComplexRestrictionSeparator]]></Snippet> <Snippet type="ImpersonalIdentityCorrelation"><![CDATA[{0} <span class="quantifier">that is</span> {1}]]></Snippet> <Snippet type="ImpersonalLeadIdentityCorrelation"><![CDATA[{1} <span class="quantifier">is</span> {0} <span class="quantifier">that</span>]]></Snippet> <Snippet type="PersonalIdentityCorrelation"><![CDATA[{0} <span class="quantifier">who is</span> {1}]]></Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippets/VerbalizationCoreSnippets.xsd 2013-10-28 01:32:57 UTC (rev 1529) @@ -1201,13 +1201,13 @@ <xs:enumeration value="FullSubtypeDerivation"> <xs:annotation> <xs:documentation>Description: Used to specify a fully derived subtype derivation rule. -Format: *each {0} is {1}</xs:documentation> +Format: *each {0} is by definition {1}</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="FullSubtypeStoredDerivation"> <xs:annotation> <xs:documentation>Description: Used to specify a fully derived (and stored) subtype derivation rule. -Format: **each {0} is {1}</xs:documentation> +Format: **each {0} is by definition {1}</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="FullStoredSubtypeDescription"> @@ -1219,13 +1219,13 @@ <xs:enumeration value="PartialSubtypeDerivation"> <xs:annotation> <xs:documentation>Description: Used to specify a partially derived subtype derivation rule. -Format: +each derived {0} is {1}</xs:documentation> +Format: +each derived {0} is by definition {1}</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="PartialSubtypeStoredDerivation"> <xs:annotation> <xs:documentation>Description: Used to specify a partially derived (and stored) subtype derivation rule. -Format: ++each derived {0} is {1}</xs:documentation> +Format: ++each derived {0} is by definition {1}</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="PartialStoredSubtypeDescription"> @@ -1267,7 +1267,7 @@ <xs:documentation>Description: Specify a space-separated list of snippet names to specify list snippets that would allow lead role collapsing based on the RolePathCollapsibleLeadDirective, but do not actually support this construct. This allows a final override to block the collapsing behavior for specific snippets. This is checked for the -(Negated)[And|Or|Xor][Tail|Nested]List[(Collapsed)Open|Separator] snippets. +(Negated)[Chained|And|Or|Xor][Tail|Nested]List[(Collapsed)Open|Separator] and the ChainedList*Restrction* snippets. Format: AndTailListOpen OrTailListOpen</xs:documentation> </xs:annotation> </xs:enumeration> Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2013-10-28 01:32:57 UTC (rev 1529) @@ -4401,13 +4401,13 @@ <div class="snippetStatement"> <strong>Description: </strong> Used to specify a fully derived subtype derivation rule. <br /> - <strong>Format: </strong> *each {0} is {1}</div> + <strong>Format: </strong> *each {0} is by definition {1}</div> <div class="snippetReplacementFieldCount"> <span class="reportItem">Number of replacement fields: </span>2</div> <div class="snippetUnformattedText"> <span class="reportItem">Unformatted version: </span> <div class="unformattedSnippet"> - <pre class="unformattedSnippetDecorator">*Each {0} is {1}</pre> + <pre class="unformattedSnippetDecorator">*Each {0} is by definition {1}</pre> </div> </div> </div> @@ -4418,13 +4418,13 @@ <div class="snippetStatement"> <strong>Description: </strong> Used to specify a fully derived (and stored) subtype derivation rule. <br /> - <strong>Format: </strong> **each {0} is {1}</div> + <strong>Format: </strong> **each {0} is by definition {1}</div> <div class="snippetReplacementFieldCount"> <span class="reportItem">Number of replacement fields: </span>2</div> <div class="snippetUnformattedText"> <span class="reportItem">Unformatted version: </span> <div class="unformattedSnippet"> - <pre class="unformattedSnippetDecorator">**Each {0} is {1}</pre> + <pre class="unformattedSnippetDecorator">**Each {0} is by definition {1}</pre> </div> </div> </div> @@ -7473,13 +7473,13 @@ <div class="snippetStatement"> <strong>Description: </strong> Used to specify a partially derived subtype derivation rule. <br /> - <strong>Format: </strong> +each derived {0} is {1}</div> + <strong>Format: </strong> +each derived {0} is by definition {1}</div> <div class="snippetReplacementFieldCount"> <span class="reportItem">Number of replacement fields: </span>2</div> <div class="snippetUnformattedText"> <span class="reportItem">Unformatted version: </span> <div class="unformattedSnippet"> - <pre class="unformattedSnippetDecorator">+each derived {0} is {1}</pre> + <pre class="unformattedSnippetDecorator">+each derived {0} is by definition {1}</pre> </div> </div> </div> @@ -7490,13 +7490,13 @@ <div class="snippetStatement"> <strong>Description: </strong> Used to specify a partially derived (and stored) subtype derivation rule. <br /> - <strong>Format: </strong> ++each derived {0} is {1}</div> + <strong>Format: </strong> ++each derived {0} is by definition {1}</div> <div class="snippetReplacementFieldCount"> <span class="reportItem">Number of replacement fields: </span>2</div> <div class="snippetUnformattedText"> <span class="reportItem">Unformatted version: </span> <div class="unformattedSnippet"> - <pre class="unformattedSnippetDecorator">++each derived {0} is {1}</pre> + <pre class="unformattedSnippetDecorator">++each derived {0} is by definition {1}</pre> </div> </div> </div> Modified: trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2013-10-28 01:32:57 UTC (rev 1529) @@ -1318,16 +1318,16 @@ </snippet> <snippet name="FullSubtypeDerivation" replacementCount="2"> <statement>Description: Used to specify a fully derived subtype derivation rule. -Format: *each {0} is {1}</statement> - <unformattedSnippet>*Each {0} is {1}</unformattedSnippet> +Format: *each {0} is by definition {1}</statement> + <unformattedSnippet>*Each {0} is by definition {1}</unformattedSnippet> <contains /> <containedIn /> <usedBy /> </snippet> <snippet name="FullSubtypeStoredDerivation" replacementCount="2"> <statement>Description: Used to specify a fully derived (and stored) subtype derivation rule. -Format: **each {0} is {1}</statement> - <unformattedSnippet>**Each {0} is {1}</unformattedSnippet> +Format: **each {0} is by definition {1}</statement> + <unformattedSnippet>**Each {0} is by definition {1}</unformattedSnippet> <contains /> <containedIn /> <usedBy /> @@ -2593,16 +2593,16 @@ </snippet> <snippet name="PartialSubtypeDerivation" replacementCount="2"> <statement>Description: Used to specify a partially derived subtype derivation rule. -Format: +each derived {0} is {1}</statement> - <unformattedSnippet>+each derived {0} is {1}</unformattedSnippet> +Format: +each derived {0} is by definition {1}</statement> + <unformattedSnippet>+each derived {0} is by definition {1}</unformattedSnippet> <contains /> <containedIn /> <usedBy /> </snippet> <snippet name="PartialSubtypeStoredDerivation" replacementCount="2"> <statement>Description: Used to specify a partially derived (and stored) subtype derivation rule. -Format: ++each derived {0} is {1}</statement> - <unformattedSnippet>++each derived {0} is {1}</unformattedSnippet> +Format: ++each derived {0} is by definition {1}</statement> + <unformattedSnippet>++each derived {0} is by definition {1}</unformattedSnippet> <contains /> <containedIn /> <usedBy /> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2013-10-18 03:44:19 UTC (rev 1528) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2013-10-28 01:32:57 UTC (rev 1529) @@ -422,11 +422,11 @@ FullStoredSubtypeDescription, /// <summary>The 'FullSubtypeDerivation' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to specify a fully derived subtype derivation rule. - /// Format: *each {0} is {1}</remark> + /// Format: *each {0} is by definition {1}</remark> FullSubtypeDerivation, /// <summary>The 'FullSubtypeStoredDerivation' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to specify a fully derived (and stored) subtype derivation rule. - /// Format: **each {0} is {1}</remark> + /// Format: **each {0} is by definition {1}</remark> FullSubtypeStoredDerivation, /// <summary>The 'GreaterThanOrEqualValueComparator' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to compare the two values in a value comparison constraint with a 'greater than or equal' operator. @@ -855,11 +855,11 @@ PartialStoredSubtypeDescription, /// <summary>The 'PartialSubtypeDerivation' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to specify a partially derived subtype derivation rule. - /// Format: +each derived {0} is {1}</remark> + /// Format: +each derived {0} is by definition {1}</remark> PartialSubtypeDerivation, /// <summary>The 'PartialSubtypeStoredDerivation' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to specify a partially derived (and stored) subtype derivation rule. - /// Format: ++each derived {0} is {1}</remark> + /// Format: ++each derived {0} is by definition {1}</remark> PartialSubtypeStoredDerivation, /// <summary>The 'PeriodSeparator' format string snippet. Contains 2 replacement fields.</summary> /// <remark>Description: Used to delimit two snippet replacements by a snippet. @@ -922,7 +922,7 @@ /// <remark>Description: Specify a space-separated list of snippet names to specify list snippets that /// would allow lead role collapsing based on the RolePathCollapsibleLeadDirective, but do not actually support this construct. /// This allows a final override to block the collapsing behavior for specific snippets. This is checked for the - /// (Negated)[And|Or|Xor][Tail|Nested]List[(Collapsed)Open|Separator] snippets. + /// (Negated)[Chained|And|Or|Xor][Tail|Nested]List[(Collapsed)Open|Separator] and the ChainedList*Restrction* snippets. /// Format: AndTailListOpen OrTailListOpen</remark> RolePathBlockLeadCollapseForSnippetDirective, /// <summary>The 'RolePathCollapsibleLeadDirective' simple snippet value.</summary> @@ -1282,8 +1282,8 @@ @"<span class=""quantifier"">**</span>{0} <span class=""quantifier"">if and only if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">instances of this fact type are stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">instances of this subtype are stored immediately after they are derived</span></span>", - @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""quantifier""> is greather than or equal to </span>{1}", @"{0}<span class=""quantifier""> is greater than </span>{1}", @"<span class=""quantifier"">all or none of the following hold:</span> {0}", @@ -1412,8 +1412,8 @@ @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup></span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">derived instances of this fact type are also stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">derived instances of this subtype are also stored immediately after they are derived</span></span>", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""listSeparator"">.</span>{1}", @"{0} <span class=""quantifier"">who is</span> {1}", @"{1} <span class=""quantifier"">is</span> {0} <span class=""quantifier"">who</span>", @@ -1430,7 +1430,7 @@ @"<span class=""smallIndent""><span class=""quantifier"">Reference Scheme:</span> {0}</span>", @"<span class=""quantifier"">itself</span>", @"{0} <span class=""quantifier"">itself</span>", - "AndTailListOpen OrTailListOpen", + "AndTailListOpen OrTailListOpen ChainedListLocalRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListTopLevelComplexRestrictionSeparator", "And Or Chain", "And Or Chain", "!And !Or Xor !Xor", @@ -1636,8 +1636,8 @@ @"<span class=""quantifier"">**</span>{0} <span class=""quantifier"">if and only if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">instances of this fact type are stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">instances of this subtype are stored immediately after they are derived</span></span>", - @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""quantifier""> is greather than or equal to </span>{1}", @"{0}<span class=""quantifier""> is greater than </span>{1}", @"<span class=""quantifier"">all or none of the following hold:</span> {0}", @@ -1766,8 +1766,8 @@ @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup></span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">derived instances of this fact type are also stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">derived instances of this subtype are also stored immediately after they are derived</span></span>", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""listSeparator"">.</span>{1}", @"{0} <span class=""quantifier"">who is</span> {1}", @"{1} <span class=""quantifier"">is</span> {0} <span class=""quantifier"">who</span>", @@ -1784,7 +1784,7 @@ @"<span class=""smallIndent""><span class=""quantifier"">Reference Scheme:</span> {0}</span>", @"<span class=""quantifier"">itself</span>", @"{0} <span class=""quantifier"">itself</span>", - "AndTailListOpen OrTailListOpen", + "AndTailListOpen OrTailListOpen ChainedListLocalRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListTopLevelComplexRestrictionSeparator", "And Or Chain", "And Or Chain", "!And !Or Xor !Xor", @@ -1990,8 +1990,8 @@ @"<span class=""quantifier"">**</span>{0} <span class=""quantifier"">if and only if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">instances of this fact type are stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">instances of this subtype are stored immediately after they are derived</span></span>", - @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""quantifier""> is greather than or equal to </span>{1}", @"{0}<span class=""quantifier""> is greater than </span>{1}", @"<span class=""quantifier"">all or none of the following hold:</span> {0}", @@ -2120,8 +2120,8 @@ @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup></span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">derived instances of this fact type are also stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">derived instances of this subtype are also stored immediately after they are derived</span></span>", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""listSeparator"">.</span>{1}", @"{0} <span class=""quantifier"">who is</span> {1}", @"{1} <span class=""quantifier"">is</span> {0} <span class=""quantifier"">who</span>", @@ -2138,7 +2138,7 @@ @"<span class=""smallIndent""><span class=""quantifier"">Reference Scheme:</span> {0}</span>", @"<span class=""quantifier"">itself</span>", @"{0} <span class=""quantifier"">itself</span>", - "AndTailListOpen OrTailListOpen", + "AndTailListOpen OrTailListOpen ChainedListLocalRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListTopLevelComplexRestrictionSeparator", "And Or Chain", "And Or Chain", "!And !Or Xor !Xor", @@ -2344,8 +2344,8 @@ @"<span class=""quantifier"">**</span>{0} <span class=""quantifier"">if and only if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">instances of this fact type are stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">instances of this subtype are stored immediately after they are derived</span></span>", - @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier"">*Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier"">**Each</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""quantifier""> is greather than or equal to </span>{1}", @"{0}<span class=""quantifier""> is greater than </span>{1}", @"<span class=""quantifier"">all or none of the following hold:</span> {0}", @@ -2474,8 +2474,8 @@ @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup></span>{0} <span class=""quantifier"">if</span><br/>{1}<br/>", @"<span class=""indent""><span class=""quantifier"">derived instances of this fact type are also stored immediately after they are derived</span></span>", @"<span class=""smallIndent""><span class=""quantifier"">derived instances of this subtype are also stored immediately after they are derived</span></span>", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", - @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">+</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", + @"<span class=""quantifier""><sup style=""font-size:smaller;"">++</sup>each derived</span> {0} <span class=""quantifier"">is by definition</span> {1}", @"{0}<span class=""listSeparator"">.</span>{1}", @"{0} <span class=""quantifier"">who is</span> {1}", @"{1} <span class=""quantifier"">is</span> {0} <span class=""quantifier"">who</span>", @@ -2492,7 +2492,7 @@ @"<span class=""smallIndent""><span class=""quantifier"">Reference Scheme:</span> {0}</span>", @"<span class=""quantifier"">itself</span>", @"{0} <span class=""quantifier"">itself</span>", - "AndTailListOpen OrTailListOpen", + "AndTailListOpen OrTailListOpen ChainedListLocalRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListComplexRestrictionSeparator ChainedListTopLevelComplexRestrictionSeparator", "And Or Chain", "And Or Chain", "!And !Or Xor !Xor", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |