// // * (non-Javadoc) // * // * @see org.cip4.jdflib.core.JDFElement#getInvalidAttributes(org.cip4.jdflib. core.KElement.EnumValidationLevel, // * boolean, int) // public override VString getInvalidAttributes(EnumValidationLevel level, bool bIgnorePrivate, int nMax) { VString v = base.getInvalidAttributes(level, bIgnorePrivate, nMax); JDFResourceLink rl = (JDFResourceLink)getDeepParentChild(ElementName.RESOURCELINKPOOL); if (rl != null) { JDFAttributeMap rlMap = rl.getAttributeMap(); if (rlMap != null) { JDFAttributeMap map = getAttributeMap(); if (map != null) { IEnumerator <string> it = map.getKeyIterator(); while (it.MoveNext()) { string s = it.Current; if (rlMap.ContainsKey(s)) { v.Add(s); } } } } } return(v); }
/// /// <summary> * overlapMap - identical keys must have the same values in both maps<br> /// * similar to JDFAttribute.overlapMap, but uses matchesPart instead of equals for the comparison /// * </summary> /// * <param name="subMap"> the map to compare /// * </param> /// * <returns> boolean: true if identical keys have the same values in both maps </returns> /// public static bool overlapPartMap(JDFAttributeMap resourceMap, JDFAttributeMap linkMap) { if ((resourceMap == null) || (linkMap == null)) { return(true); // null always overlaps with anything } IEnumerator <string> subMapEnum = linkMap.getKeyIterator(); while (subMapEnum.MoveNext()) { string key = (string)subMapEnum.Current; string resVal = resourceMap.get(key); if (resVal != null) { string linkVal = linkMap.get(key); if (!matchesPart(key, resVal, linkVal)) { return(false); } } } return(true); }