Examples of DashHierarchy


Examples of net.sourceforge.processdash.hier.DashHierarchy

        super.setUp();
        data = new MockDataContext();
        baseTimeLog = new MockBaseTimeLog();
        timeLog = new TimeLogModifications(baseTimeLog);
        approver = new MockApprover();
        hierarchy = new DashHierarchy(null);
        hierarchy.loadXML(openFile("hier3.xml"), new DashHierarchy(null));
        recorder = new TimingMetricsRecorder(timeLog, data, hierarchy, approver);
        recorder.refreshMetrics();

        expectedTimes = new HashMap();
        for (int i = 0; i < TIMELOG3_CONTENTS.length; i++) {
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

    if (loggingModelIsTiming != isTiming) {
      printErr("We disagree with the logging model on whether or not the timer is running.");
      foundErr = true;
    }

    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (!checkTimeData(cKey.path(), expectedTimes[a][b][c]))
            foundErr = true;
        }
      }
    }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

    }
    return gvitm;
  }

  private String getPathStr(int[] newPath) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    PropertyKey key = PropertyKey.ROOT;
    for (int i = 0; i < newPath.length; i++)
      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }

  private int[] getPathFor(String path) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (path.equals(cKey.path()))
            return new int[] { a, b, c };
        }
      }
    }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

        long newTimestamp = hierarchyFile.lastModified();
        if (newTimestamp == 0 || newTimestamp == hierarchyTimestamp)
            return;

        // load the new data from the hierarchy file
        DashHierarchy newHier = new DashHierarchy(hierarchy.dataPath);
        newHier.loadXML(hierarchyFile.getPath(), templates);
        // alter our current hierarchy to match the new changes
        DashController.getHierarchyAlterer().mergeChangesFrom(newHier);
        // update the timestamp to indicate success
        hierarchyTimestamp = newTimestamp;
    }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

        while (row < tree.getRowCount())
            tree.expandRow(row++);
    }

    private DashHierarchy getHierarchyToDisplay() {
        DashHierarchy result = new DashHierarchy("");
        result.copy(ctx.getHierarchy());
        pruneForDisplay(result, PropertyKey.ROOT);
        maybeCreateDefaultHierarchy(result);
        return result;
    }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

        }

        private void findNodeToMoveUp() {
            nodeParent = null;

            DashHierarchy hier = ctx.getHierarchy();
            PropertyKey selectedNode = getSelectedTreeNode();
            if (!StringUtils.hasValue(hier.getID(selectedNode)))
                return;

            Prop parent = hier.pget(selectedNode.getParent());
            int pos = parent.getChildPos(selectedNode) + nodeOffset;
            if (pos > 0 && pos < parent.getNumChildren()) {
                nodeParent = parent;
                childPosToMoveUp = pos;
            }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

                dataDirectory,
                ExternalResourceManager.INITIALIZATION_MODE_ARCHIVE);

        // create the data repository.
        data = new DataRepository();
        DashHierarchy templates = TemplateLoader.loadTemplates(data);
        data.setDatafileSearchURLs(TemplateLoader.getTemplateURLs());

        // open and load the the user's work breakdown structure
        hierarchy = new DashHierarchy(null);
        String hierFilename = dataDirPath + Settings.getFile("stateFile");
        hierarchy.loadXML(hierFilename, templates);
        data.setNodeComparator(hierarchy);

        // create the time log
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

                    "psp data directory:\n" + brokenData.getCorruptFileStr());
            System.exit(0);
        }

        // open and load the the user's work breakdown structure
        props = new DashHierarchy(property_directory);
        Vector v = null;
        Exception saxException = null;
        if (prop_file.exists()) {
            try {
                // try to load the user's existing properties file.
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy

        if (prefix == null) return null;
       
        try {
            ListData hierItem = (ListData) context
                    .get(DashHierarchy.DATA_REPOSITORY_NAME);
            DashHierarchy hier = (DashHierarchy) hierItem.get(0);
           
            PropertyKey key = hier.findExistingKey(prefix);
            if (key == null) return null;
           
            String templateID = hier.getID(key);
            return StringData.create(templateID);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.