public virtual void testInsertPageSet() { JDFDoc d = new JDFDoc("PRItem"); JDFPRItem pi = (JDFPRItem)d.getRoot(); pi.insertPageSet(3); Assert.AreEqual("3", pi.getAttribute(AttributeName.PAGESET)); pi.insertPageSet(3); Assert.AreEqual("3", pi.getAttribute(AttributeName.PAGESET)); pi.insertPageSet(5); Assert.AreEqual("3 5", pi.getAttribute(AttributeName.PAGESET)); pi.insertPageSet(2); Assert.AreEqual("2 ~ 3 5", pi.getAttribute(AttributeName.PAGESET)); pi.insertPageSet(4); Assert.AreEqual("2 ~ 5", pi.getAttribute(AttributeName.PAGESET)); }
public virtual JDFPRItem setPR(JDFAction action, int pageSet, JDFAttributeMap prMap, VString groupBy) { JDFAttributeMap groupMap = null; JDFAttributeMap instanceMap = null; if (prMap != null) { groupMap = new JDFAttributeMap(prMap); SupportClass.SetSupport <string> @set = groupBy.getSet(); groupMap.reduceMap(@set); instanceMap = new JDFAttributeMap(prMap); instanceMap.removeKeys(@set); } JDFPRItem pi = getCreatePRItem(action, groupMap); JDFPRGroup pg = pi.getCreatePRGroup(groupMap); JDFPROccurrence pgInstance = pg.getCreatePROccurrence(instanceMap); pgInstance.addOccurrences(1, action.getSeverity()); pi.insertPageSet(pageSet); return(pi); }