From: <mcu...@us...> - 2007-07-31 23:47:05
|
Revision: 1075 http://orm.svn.sourceforge.net/orm/?rev=1075&view=rev Author: mcurland Date: 2007-07-31 16:47:02 -0700 (Tue, 31 Jul 2007) Log Message: ----------- Added mechanism for ObjectType filtering. refs #327 Modified Paths: -------------- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs Modified: trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs =================================================================== --- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-07-24 18:16:18 UTC (rev 1074) +++ trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-07-31 23:47:02 UTC (rev 1075) @@ -138,8 +138,12 @@ #endregion #region ORM Error Filtering Methods - private static bool ShouldIgnoreFactType(FactType factType) + private bool ShouldIgnoreObjectType(ObjectType objectType) { + return false; + } + private bool ShouldIgnoreFactType(FactType factType) + { // Subtype facts are always binarized, and never missing role players if (factType is SubtypeFact) { @@ -155,8 +159,8 @@ // Ignore fact types that contain roles that are missing role players foreach (RoleBase roleBase in roles) { - // UNDONE: Should we just be checking RolePlayer == null instead? - if (roleBase.Role.RolePlayerRequiredError != null) + ObjectType rolePlayer = roleBase.Role.RolePlayer; + if (rolePlayer != null || ShouldIgnoreObjectType(rolePlayer)) { return true; } @@ -579,6 +583,10 @@ // For each ValueType in the model... foreach (ObjectType valueType in modelValueTypes) { + if (ShouldIgnoreObjectType(valueType)) + { + continue; + } // Create InformationTypeFormat. PropertyAssignment namePropertyAssignment = new PropertyAssignment(InformationTypeFormat.NameDomainPropertyId, valueType.Name); InformationTypeFormat informationTypeFormat = new InformationTypeFormat(Store, namePropertyAssignment); @@ -604,6 +612,10 @@ // For each object type in the model... foreach (ObjectType objectType in modelObjectTypes) { + if (ShouldIgnoreObjectType(objectType)) + { + continue; + } // If it should have a conctpt type... if (ObjectTypeIsConceptType(objectType, factTypeMappings)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-08-15 01:50:02
|
Revision: 1086 http://orm.svn.sourceforge.net/orm/?rev=1086&view=rev Author: mcurland Date: 2007-08-14 18:50:00 -0700 (Tue, 14 Aug 2007) Log Message: ----------- Fixed issue with uniqueness constraints never being found if all of the roles they constrained had proxies. refs #327 Modified Paths: -------------- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs Modified: trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs =================================================================== --- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-08-15 01:48:13 UTC (rev 1085) +++ trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-08-15 01:50:00 UTC (rev 1086) @@ -798,18 +798,13 @@ // For each role played by its object type... foreach (Role role in objectType.PlayedRoleCollection) { - if (ShouldIgnoreFactType(role.FactType)) + if (ShouldIgnoreFactType(role.BinarizedFactType)) { continue; } - Role oppositeRole = role.OppositeRoleAlwaysResolveProxy as Role; + Role oppositeRole = role.OppositeRoleAlwaysResolveProxy.Role; - if (oppositeRole == null) - { - continue; - } - // For each constraint on the opposite role... foreach (ConstraintRoleSequence constraintRoleSequence in oppositeRole.ConstraintRoleSequenceCollection) { @@ -1017,7 +1012,7 @@ foreach (Role role in ObjectTypePlaysRole.GetPlayedRoleCollection(objectType)) { - FactType factType = role.FactType; + FactType factType = role.BinarizedFactType; if (ShouldIgnoreFactType(factType)) { continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-09-10 22:55:44
|
Revision: 1115 http://orm.svn.sourceforge.net/orm/?rev=1115&view=rev Author: mcurland Date: 2007-09-10 15:55:47 -0700 (Mon, 10 Sep 2007) Log Message: ----------- Removed assertion (yes, it can be something other than 1). refs #327 Modified Paths: -------------- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs Modified: trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs =================================================================== --- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-09-10 22:54:09 UTC (rev 1114) +++ trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-09-10 22:55:47 UTC (rev 1115) @@ -1033,8 +1033,6 @@ LinkedElementCollection<ConceptTypeChild> childrenForFactType = ConceptTypeChildHasPathFactType.GetConceptTypeChild(factType); - Debug.Assert(childrenForFactType.Count == 1, "Can this not be 1?"); - associationChildren.AddRange(ConceptTypeChildHasPathFactType.GetConceptTypeChild(factType)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 05:27:52
|
Revision: 1145 http://orm.svn.sourceforge.net/orm/?rev=1145&view=rev Author: mcurland Date: 2007-10-14 22:27:49 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Changed a section that was improperly casting a Role and thus preventing the generation of a spanning uniqueness on a relationship played by an objectified fact type with a spanning uniqueness. refs #327. Modified Paths: -------------- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs Modified: trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs =================================================================== --- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-09-20 20:57:41 UTC (rev 1144) +++ trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-10-15 05:27:49 UTC (rev 1145) @@ -1185,7 +1185,7 @@ { continue; } - Role oppositeRole = (Role)role.OppositeRoleAlwaysResolveProxy; + Role oppositeRole = role.OppositeRoleAlwaysResolveProxy.Role; // Recursivly call this for each of objectType's preferred identifier object types. foreach (ConstraintRoleSequence constraintRoleSequence in oppositeRole.ConstraintRoleSequenceCollection) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |