Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.DashHierarchy$Event


        }

        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


                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

                    "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

        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

    protected void writeContents() throws IOException {
        String prefix = getPrefix();
        if (prefix == null) prefix = "";

        DashHierarchy props = getPSPProperties();
        PropertyKey key = props.findExistingKey(prefix);

        out.write("<HTML><HEAD>");
        out.write("<link rel=stylesheet type='text/css' href='/style.css'>");
        out.write("<TITLE>Hierarchy");
        if (prefix.length() > 0) {
            out.write(" - ");
            out.write(prefix);
        }
        out.write("</TITLE></HEAD><BODY>");
        if (prefix.length() > 0) {
            out.write("<B>");
            out.write(prefix);
            out.write("</B><BR>");
        }

        for (int i=0;   i < props.getNumChildren(key);   i++)
            writeNode(props, props.getChildKey(key, i));

        List<ScriptID> scripts = ScriptEnumerator.getScripts(
            getDashboardContext(), key);
        if (scripts != null && scripts.size() != 0) {
            out.write("<hr>");
View Full Code Here

        List result = new ArrayList();
       
        Enumeration leafNames = getInheritedPhaseList(defectPath, context
                .getData());
        if (leafNames == null) {
            DashHierarchy hier = context.getHierarchy();
            PropertyKey defectPathKey = hier.findExistingKey(defectPath);
            if (defectPathKey == null)
                return result;
            leafNames = hier.getLeafNames(defectPathKey);
            prefixLength = defectPath.length() + 1;
        }
       
        while (leafNames.hasMoreElements()) {
            String item = (String) leafNames.nextElement();
View Full Code Here

            return taskPath.substring(prefixLength);
   
        // no luck so far.  Look at the task in question, and see if it only
        // includes a single phase child (typical for old-style team projects
        // with phase stubs).
        DashHierarchy hier = context.getHierarchy();
        PropertyKey defectPathKey = hier.findExistingKey(defectPath);
        if (defectPathKey != null) {
            Enumeration leafNames = hier.getLeafNames(defectPathKey);
            List possibleMatches = new ArrayList();
            while (leafNames.hasMoreElements()) {
                String oneLeaf = (String) leafNames.nextElement();
                if (oneLeaf.length() > prefixLength) {
                    String leafTail = oneLeaf.substring(prefixLength);
View Full Code Here

    }

    private DashHierarchy getAugmentedHierarchy() {

        // create a copy of the standard hierarchy
        DashHierarchy result = new DashHierarchy(getPSPProperties().dataPath);
        result.copy(getPSPProperties());

        // find the leaves in the hierarchy, and augment each leaf with
        // supplementary children provided from data element specifications
        DataRepository data = getDataRepository();
        Enumeration<PropertyKey> leaves = result.getLeaves(PropertyKey.ROOT);
        while (leaves.hasMoreElements()) {
            PropertyKey leaf = leaves.nextElement();
            augmentHierarchy(result, leaf, data);
        }
View Full Code Here

            unit = units;
        }
        HTMLUtils.appendQuery(uri, "Unit", unit);
        HTMLUtils.appendQuery(uri, "Units", units);

        DashHierarchy props = getPSPProperties();
        PropertyKey self = props.findExistingKey(getPrefix());
        int numPhases = props.getNumChildren(self);
        for (int i = 0;  i < numPhases;  i++)
            HTMLUtils.appendQuery(uri, "Phases",
                props.getChildKey(self, i).name());

        String text = getRequestAsString(uri.toString());
        out.write(text);
    }
View Full Code Here

    private boolean prefixNamesTeamProjectStub() {
        return pathNamesTeamProjectStub(getPrefix());
    }

    private boolean pathNamesTeamProjectStub(String path) {
        DashHierarchy hierarchy = getPSPProperties();
        PropertyKey key = hierarchy.findExistingKey(path);
        String templateID = hierarchy.getID(key);
        return TEAM_STUB_ID.equals(templateID);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.hier.DashHierarchy$Event

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.