Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.Prop


                             ? resources.getString("Time_Card.Daily_Total")
                             : key.name());
                this.fullname = key.path();
                this.time = new double[32];
                this.children = new ArrayList();
                Prop prop = props.pget(key);
                for (int i = 0;   i < prop.getNumChildren();   i++)
                    children.add(new TimeCardNode(this, props,
                                                  prop.getChild(i)));
            }
View Full Code Here


     * @param t An analysis task to perform.  Every defect encountered will
     *    be passed to the task, in turn.
     */
    public static void run(DashHierarchy props, PropertyKey pKey,
            boolean includeChildren, Task t) {
        Prop prop = props.pget (pKey);
        String path = pKey.path();
        String defLogName = prop.getDefectLog ();

        // If this node has a defect log,
        if (defLogName != null && defLogName.length() != 0) {
            DefectLog dl = new DefectLog
                (dataDirectory + defLogName, path, null);
            // read all the defects in that log, and
            Defect[] defects = dl.readDefects();
            for (int d=0;  d < defects.length;  d++)
                if (defects[d] != null)   // pass them to the analyzer task.
                    t.analyze(path, defects[d]);
        }

        // recursively analyze all the children of this node.
        if (includeChildren)
            for (int i = 0; i < prop.getNumChildren(); i++)
                run(props, prop.getChild(i), includeChildren, t);
    }
View Full Code Here

        run(ctx, PropertyKey.ROOT, dataDirectory);
    }

    private static void run(DashboardContext ctx, PropertyKey pKey,
            String dataDirectory) {
        Prop prop = ctx.getHierarchy().pget(pKey);
        String path = pKey.path();
        String defLogName = prop.getDefectLog();

        // If this node has a defect log,
        if (defLogName != null && defLogName.length() != 0) {
            DefectLog dl = new DefectLog(dataDirectory + defLogName, path,
                ctx.getData());
            // read all the defects in that log, and
            Defect[] defects = dl.readDefects();
            // recalculate the associated data.
            dl.recalculateData(defects, ctx);
        }

        // recursively analyze all the children of this node.
        for (int i = 0; i < prop.getNumChildren(); i++)
            run(ctx, prop.getChild(i), dataDirectory);
    }
View Full Code Here

        }
    }

    private void augmentHierarchy(DashHierarchy hier, PropertyKey parentNode,
            Element parentXml) {
        Prop parentProp = (Prop) hier.get(parentNode);
        if (parentProp == null)
            return;

        for (Element childXml : XMLUtils.getChildElements(parentXml)) {
            String childName = childXml.getAttribute("name");
            PropertyKey childNode = new PropertyKey(parentNode, childName);
            parentProp.addChild(childNode, -1);
            hier.put(childNode, new Prop());
            augmentHierarchy(hier, childNode, childXml);
        }
    }
View Full Code Here

        Set<String> templateIDs = getTeamProcessIDs();

        Set<String> result = new HashSet<String>();
        DashHierarchy hier = dashboardContext.getHierarchy();
        for (Iterator i = hier.values().iterator(); i.hasNext();) {
            Prop prop = (Prop) i.next();
            String oneID = prop.getID();
            if (oneID != null && oneID.endsWith("Root")) {
                int slashPos = oneID.indexOf('/');
                if (slashPos != -1) {
                    String oneProcessID = oneID.substring(0, slashPos);
                    if (templateIDs.contains(oneProcessID))
View Full Code Here

        brokenIDs.put("pspForEng/8A/script.htm", "PSP2.1-PFE-8A");
        brokenIDs.put("pspForMSE/2A/script.htm", "PSP0.1-MSE-2A");
        brokenIDs.put("pspForMSE/3B/script.htm", "PSP1-MSE-3B");
        brokenIDs.put("pspForMSE/4B/script.htm", "PSP1.0.1-MSE-4B");

        Prop        value;
        String      s;
        for (Iterator i = hierarchy.entrySet().iterator(); i.hasNext();) {
            Map.Entry e = (Map.Entry) i.next();
            value = (Prop)e.getValue();
            if (! Prop.hasValue(value.getID())) continue;
            if (! Prop.hasValue(s = value.getScriptFile ())) continue;
            s = (String) brokenIDs.get(s);
            if (s != null) value.setID(s);
        }
    }
View Full Code Here

        return result;
    }

    private static void buildWbsIdMap(Map result, DashHierarchy props,
            PropertyKey pKey, DataRepository data) {
        Prop prop = props.pget(pKey);
        String path = pKey.path();

        // Get the WBS ID of this node in the hierarchy.
        String wbsId = getWbsId(data, path);
        if (!result.containsKey(wbsId))
            result.put(wbsId, path);

        // Check to see if this node supplies subcomponent info
        Map componentInfo = getWbsSubcomponentInfo(data, path, wbsId);
        if (componentInfo != null)
            result.putAll(componentInfo);

        // recursively scan all the children of this node.
        for (int i = 0; i < prop.getNumChildren(); i++)
            buildWbsIdMap(result, props, prop.getChild(i), data);
    }
View Full Code Here

                processes.add(key);
        }

        if (processes.size() > 0) {
            Collections.sort(processes);
            Prop p = new Prop();
            while (processes.size() > 0)
                p.addChild((PropertyKey)processes.remove(0), -1);
            templates.put(PropertyKey.ROOT, p);
        }
    }
View Full Code Here

        }
    }
    private static void addScriptMaps(DashHierarchy templates,
                                      PropertyKey key, String ID,
                                      Vector v) {
        Prop val = (Prop) templates.get(key);
        if (val == null) return;
        if (Prop.hasValue(val.getID())) {
            ID = val.getID();
            v = (Vector) scriptMaps.get(ID);
            if (v == null)
                scriptMaps.put(ID, (v = new Vector()));
        }

        val.setScriptFile(processScriptFlag(v, val.getScriptFile()));

        for (int i = 0;   i < val.getNumChildren();   i++)
            addScriptMaps(templates, val.getChild(i), ID, v);
    }
View Full Code Here

                       DefaultMutableTreeNode node,
                       PropertyKey            key) {
    DefaultMutableTreeNode child;
    int childIndex = 0;
    //set the current node name
    Prop value = props.pget (key);
    if (!key.name().equals(node.getUserObject())) {
        node.setUserObject(key.name());
        nodeChanged(node);
    }
    int numPropChildren = value.getNumChildren();
    while (numPropChildren > childIndex) {
      if (getChildCount (node) <= childIndex) {
        child = new DefaultMutableTreeNode ("changeMeLater");
        insertNodeInto(child, node, childIndex);
      } else
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.hier.Prop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.