Esempio n. 1
0
        ///
        ///	 * <param name="groupMap">
        ///	 * @return </param>
        ///
        public virtual JDFPRGroup getCreatePRGroup(JDFAttributeMap groupMap)
        {
            JDFPRGroup pg = getPRGroup(groupMap);

            if (pg == null)
            {
                pg = appendPRGroup();
                pg.appendPRGroupOccurrence().setAttributes(groupMap);
            }
            return(pg);
        }
Esempio n. 2
0
        ///
        ///	 * <param name="action">
        ///	 * @return </param>
        ///
        private JDFPRItem getPRItem(JDFAction action, JDFAttributeMap groupMap)
        {
            string          id  = action == null ? null : action.getID();
            JDFAttributeMap map = (id == null) ? null : new JDFAttributeMap("ActionRef", id);
            JDFPRItem       pi  = (JDFPRItem)getChildByTagName(ElementName.PRITEM, null, 0, map, true, true);

            if (groupMap != null && pi != null)
            {
                JDFPRGroup pg = pi.getPRGroup(groupMap);
                if (pg == null)
                {
                    return(null);
                }
            }
            return(pi);
        }
Esempio n. 3
0
        ///
        ///	 * <param name="groupMap">
        ///	 * @return </param>
        ///
        public virtual JDFPRGroup getPRGroup(JDFAttributeMap groupMap)
        {
            VElement v = getChildElementVector(ElementName.PRGROUP, null, null, true, -1, false);

            for (int i = 0; i < v.Count; i++)
            {
                JDFPRGroup           pg  = (JDFPRGroup)v[i];
                JDFPRGroupOccurrence pgo = pg.getPRGroupOccurrence();
                if (pgo == null)
                {
                    continue;
                }
                JDFAttributeMap map = pgo.getAttributeMap();
                if (map.subMap(groupMap))
                {
                    return(pg);
                }
            }
            return(null);
        }
Esempio n. 4
0
        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);
        }