Java 类ims.core.vo.lookups.QuestionClassification 实例源码

项目:AvoinApotti    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeCollection;
    TreeNode node;

    if(isTextAndClassSearch())
        nodeCollection = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeCollection = form.lyrSearch().tabPageClassification().treClassification().getNodes();
    for(int i=0; nodeCollection != null && i<nodeCollection.size(); i++)
    {
        node = nodeCollection.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addClassification(coll, node);
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private QuestionClassificationCollection getGridClassification(boolean addParents) 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeColl;
    TreeNode node;
    if(isTextAndClassSearch())
        nodeColl = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeColl = form.lyrSearch().tabPageClassification().treClassification().getNodes();

    for(int i=0; i<nodeColl.size(); i++)
    {
        node = nodeColl.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addGridClassification(coll, node, addParents);
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private void addGridClassification(QuestionClassificationCollection coll, TreeNode parentNode, boolean addParents) 
{
    TreeNode childNode;
    for(int i=0; parentNode != null && i<parentNode.getNodes().size(); i++)
    {
        childNode = parentNode.getNodes().get(i);
        //Use && childrenSelected(node.getNodes()) == false if you want to have parent or child selected ( as in the Prev method)
        if(childNode.isChecked())
        {
            coll.add((QuestionClassification)childNode.getValue());
            //Add the parent as well
            if(addParents)
            {
                if(coll.indexOf((QuestionClassification)parentNode.getValue()) < 0)
                    coll.add((QuestionClassification)parentNode.getValue());
            }
        }
        if(childNode.getNodes() != null && childNode.getNodes().size() > 0)
            addGridClassification(coll, childNode, addParents);
    }
}
项目:AvoinApotti    文件:Logic.java   
private grdQuestionsRow getChildSearchNode(QuestionClassification item) 
{
    grdQuestionsRow parentRow, childRow;
    //Children
    for(int i=0; i<form.lyrTrees().tabPageSearch().grdQuestions().getRows().size(); i++)
    {
        parentRow = form.lyrTrees().tabPageSearch().grdQuestions().getRows().get(i);
        for(int k=0; parentRow != null && k<parentRow.getRows().size(); k++)
        {
            childRow = parentRow.getRows().get(k);
            Object objValue = childRow.getValue();
            if(objValue instanceof QuestionClassification)
            {
                if(item.equals(objValue))
                {
                    return childRow.getRows().newRow();
                }
            }
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void getParents(QuestionClassificationCollection parents, QuestionClassificationCollection classification) 
{
    QuestionClassification parentLkp;
    //Build the parent collection
    for(int i=0; i<classification.size(); i++)
    {
        parentLkp = getParentLkp(classification.get(i));
        if(parentLkp != null)
        {
            if(parents.indexOf(parentLkp) < 0)
                parents.add(parentLkp);
        }
        else
        {
            if(parents.indexOf(classification.get(i)) < 0)
                parents.add(classification.get(i));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private QuestionClassification getParentLkp(QuestionClassification lkpItem)
{
    QuestionClassificationCollection classColl = LookupHelper.getQuestionClassification(domain.getLookupService());
    //Load top parents
    LookupInstVo[] roots = classColl.getRoots();
    for(int i=0; roots != null && i<roots.length; i++)
    {
        for(int j=0; roots[i].getChildInstances() != null && j<roots[i].getChildInstances().size(); j++)
        {
            if(roots[i].getChildInstances().get(j).equals(lkpItem))
                return (QuestionClassification)roots[i];
        }

    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateClassification(QuestionInformationVo voQInfo)
{
    if (voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for (int j = 0; j < voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
            {
                node = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
                if (qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if (node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private QuestionClassificationCollection getClassification()
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
    {
        parentNode = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
        if (parentNode.isChecked())
            coll.add((QuestionClassification) parentNode.getValue());
        for (int j = 0; parentNode != null && j < parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if (childNode.isChecked())
                coll.add((QuestionClassification) childNode.getValue());
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private void loadClassification(QuestionInformationVo voQInfo) 
{
    if(voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for(int j=0; j<voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for(int i=0; i<form.treClassification().getNodes().size(); i++)
            {
                node = form.treClassification().getNodes().get(i);
                if(qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if(node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for(int i=0; i<form.treClassification().getNodes().size(); i++)
    {
        parentNode = form.treClassification().getNodes().get(i);
        if(parentNode.isChecked())
            coll.add((QuestionClassification)parentNode.getValue());
        for(int j=0; parentNode != null && j<parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if(childNode.isChecked())
                coll.add((QuestionClassification)childNode.getValue());
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeCollection;
    TreeNode node;

    if(isTextAndClassSearch())
        nodeCollection = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeCollection = form.lyrSearch().tabPageClassification().treClassification().getNodes();
    for(int i=0; nodeCollection != null && i<nodeCollection.size(); i++)
    {
        node = nodeCollection.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addClassification(coll, node);
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getGridClassification(boolean addParents) 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeColl;
    TreeNode node;
    if(isTextAndClassSearch())
        nodeColl = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeColl = form.lyrSearch().tabPageClassification().treClassification().getNodes();

    for(int i=0; i<nodeColl.size(); i++)
    {
        node = nodeColl.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addGridClassification(coll, node, addParents);
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private void addGridClassification(QuestionClassificationCollection coll, TreeNode parentNode, boolean addParents) 
{
    TreeNode childNode;
    for(int i=0; parentNode != null && i<parentNode.getNodes().size(); i++)
    {
        childNode = parentNode.getNodes().get(i);
        //Use && childrenSelected(node.getNodes()) == false if you want to have parent or child selected ( as in the Prev method)
        if(childNode.isChecked())
        {
            coll.add((QuestionClassification)childNode.getValue());
            //Add the parent as well
            if(addParents)
            {
                if(coll.indexOf((QuestionClassification)parentNode.getValue()) < 0)
                    coll.add((QuestionClassification)parentNode.getValue());
            }
        }
        if(childNode.getNodes() != null && childNode.getNodes().size() > 0)
            addGridClassification(coll, childNode, addParents);
    }
}
项目:openMAXIMS    文件:Logic.java   
private grdQuestionsRow getChildSearchNode(QuestionClassification item) 
{
    grdQuestionsRow parentRow, childRow;
    //Children
    for(int i=0; i<form.lyrTrees().tabPageSearch().grdQuestions().getRows().size(); i++)
    {
        parentRow = form.lyrTrees().tabPageSearch().grdQuestions().getRows().get(i);
        for(int k=0; parentRow != null && k<parentRow.getRows().size(); k++)
        {
            childRow = parentRow.getRows().get(k);
            Object objValue = childRow.getValue();
            if(objValue instanceof QuestionClassification)
            {
                if(item.equals(objValue))
                {
                    return childRow.getRows().newRow();
                }
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void getParents(QuestionClassificationCollection parents, QuestionClassificationCollection classification) 
{
    QuestionClassification parentLkp;
    //Build the parent collection
    for(int i=0; i<classification.size(); i++)
    {
        parentLkp = getParentLkp(classification.get(i));
        if(parentLkp != null)
        {
            if(parents.indexOf(parentLkp) < 0)
                parents.add(parentLkp);
        }
        else
        {
            if(parents.indexOf(classification.get(i)) < 0)
                parents.add(classification.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassification getParentLkp(QuestionClassification lkpItem)
{
    QuestionClassificationCollection classColl = LookupHelper.getQuestionClassification(domain.getLookupService());
    //Load top parents
    LookupInstVo[] roots = classColl.getRoots();
    for(int i=0; roots != null && i<roots.length; i++)
    {
        for(int j=0; roots[i].getChildInstances() != null && j<roots[i].getChildInstances().size(); j++)
        {
            if(roots[i].getChildInstances().get(j).equals(lkpItem))
                return (QuestionClassification)roots[i];
        }

    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateClassification(QuestionInformationVo voQInfo)
{
    if (voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for (int j = 0; j < voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
            {
                node = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
                if (qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if (node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification()
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
    {
        parentNode = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
        if (parentNode.isChecked())
            coll.add((QuestionClassification) parentNode.getValue());
        for (int j = 0; parentNode != null && j < parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if (childNode.isChecked())
                coll.add((QuestionClassification) childNode.getValue());
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private void loadClassification(QuestionInformationVo voQInfo) 
{
    if(voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for(int j=0; j<voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for(int i=0; i<form.treClassification().getNodes().size(); i++)
            {
                node = form.treClassification().getNodes().get(i);
                if(qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if(node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for(int i=0; i<form.treClassification().getNodes().size(); i++)
    {
        parentNode = form.treClassification().getNodes().get(i);
        if(parentNode.isChecked())
            coll.add((QuestionClassification)parentNode.getValue());
        for(int j=0; parentNode != null && j<parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if(childNode.isChecked())
                coll.add((QuestionClassification)childNode.getValue());
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeCollection;
    TreeNode node;

    if(isTextAndClassSearch())
        nodeCollection = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeCollection = form.lyrSearch().tabPageClassification().treClassification().getNodes();
    for(int i=0; nodeCollection != null && i<nodeCollection.size(); i++)
    {
        node = nodeCollection.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addClassification(coll, node);
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getGridClassification(boolean addParents) 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeColl;
    TreeNode node;
    if(isTextAndClassSearch())
        nodeColl = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeColl = form.lyrSearch().tabPageClassification().treClassification().getNodes();

    for(int i=0; i<nodeColl.size(); i++)
    {
        node = nodeColl.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addGridClassification(coll, node, addParents);
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private void addGridClassification(QuestionClassificationCollection coll, TreeNode parentNode, boolean addParents) 
{
    TreeNode childNode;
    for(int i=0; parentNode != null && i<parentNode.getNodes().size(); i++)
    {
        childNode = parentNode.getNodes().get(i);
        //Use && childrenSelected(node.getNodes()) == false if you want to have parent or child selected ( as in the Prev method)
        if(childNode.isChecked())
        {
            coll.add((QuestionClassification)childNode.getValue());
            //Add the parent as well
            if(addParents)
            {
                if(coll.indexOf((QuestionClassification)parentNode.getValue()) < 0)
                    coll.add((QuestionClassification)parentNode.getValue());
            }
        }
        if(childNode.getNodes() != null && childNode.getNodes().size() > 0)
            addGridClassification(coll, childNode, addParents);
    }
}
项目:openMAXIMS    文件:Logic.java   
private grdQuestionsRow getChildSearchNode(QuestionClassification item) 
{
    grdQuestionsRow parentRow, childRow;
    //Children
    for(int i=0; i<form.lyrTrees().tabPageSearch().grdQuestions().getRows().size(); i++)
    {
        parentRow = form.lyrTrees().tabPageSearch().grdQuestions().getRows().get(i);
        for(int k=0; parentRow != null && k<parentRow.getRows().size(); k++)
        {
            childRow = parentRow.getRows().get(k);
            Object objValue = childRow.getValue();
            if(objValue instanceof QuestionClassification)
            {
                if(item.equals(objValue))
                {
                    return childRow.getRows().newRow();
                }
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void getParents(QuestionClassificationCollection parents, QuestionClassificationCollection classification) 
{
    QuestionClassification parentLkp;
    //Build the parent collection
    for(int i=0; i<classification.size(); i++)
    {
        parentLkp = getParentLkp(classification.get(i));
        if(parentLkp != null)
        {
            if(parents.indexOf(parentLkp) < 0)
                parents.add(parentLkp);
        }
        else
        {
            if(parents.indexOf(classification.get(i)) < 0)
                parents.add(classification.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassification getParentLkp(QuestionClassification lkpItem)
{
    QuestionClassificationCollection classColl = LookupHelper.getQuestionClassification(domain.getLookupService());
    //Load top parents
    LookupInstVo[] roots = classColl.getRoots();
    for(int i=0; roots != null && i<roots.length; i++)
    {
        for(int j=0; roots[i].getChildInstances() != null && j<roots[i].getChildInstances().size(); j++)
        {
            if(roots[i].getChildInstances().get(j).equals(lkpItem))
                return (QuestionClassification)roots[i];
        }

    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateClassification(QuestionInformationVo voQInfo)
{
    if (voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for (int j = 0; j < voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
            {
                node = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
                if (qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if (node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification()
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
    {
        parentNode = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
        if (parentNode.isChecked())
            coll.add((QuestionClassification) parentNode.getValue());
        for (int j = 0; parentNode != null && j < parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if (childNode.isChecked())
                coll.add((QuestionClassification) childNode.getValue());
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private void loadClassification(QuestionInformationVo voQInfo) 
{
    if(voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for(int j=0; j<voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for(int i=0; i<form.treClassification().getNodes().size(); i++)
            {
                node = form.treClassification().getNodes().get(i);
                if(qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if(node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for(int i=0; i<form.treClassification().getNodes().size(); i++)
    {
        parentNode = form.treClassification().getNodes().get(i);
        if(parentNode.isChecked())
            coll.add((QuestionClassification)parentNode.getValue());
        for(int j=0; parentNode != null && j<parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if(childNode.isChecked())
                coll.add((QuestionClassification)childNode.getValue());
        }
    }
    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeCollection;
    TreeNode node;

    if(isTextAndClassSearch())
        nodeCollection = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeCollection = form.lyrSearch().tabPageClassification().treClassification().getNodes();
    for(int i=0; nodeCollection != null && i<nodeCollection.size(); i++)
    {
        node = nodeCollection.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addClassification(coll, node);
    }
    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
private QuestionClassificationCollection getGridClassification(boolean addParents) 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNodeCollection nodeColl;
    TreeNode node;
    if(isTextAndClassSearch())
        nodeColl = form.lyrSearch().tabPageTextClass().treTextAndClass().getNodes();
    else
        nodeColl = form.lyrSearch().tabPageClassification().treClassification().getNodes();

    for(int i=0; i<nodeColl.size(); i++)
    {
        node = nodeColl.get(i);
        if(node.isChecked())
            coll.add((QuestionClassification)node.getValue());
        if(node.getNodes() != null && node.getNodes().size() > 0)
            addGridClassification(coll, node, addParents);
    }
    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
private void addGridClassification(QuestionClassificationCollection coll, TreeNode parentNode, boolean addParents) 
{
    TreeNode childNode;
    for(int i=0; parentNode != null && i<parentNode.getNodes().size(); i++)
    {
        childNode = parentNode.getNodes().get(i);
        //Use && childrenSelected(node.getNodes()) == false if you want to have parent or child selected ( as in the Prev method)
        if(childNode.isChecked())
        {
            coll.add((QuestionClassification)childNode.getValue());
            //Add the parent as well
            if(addParents)
            {
                if(coll.indexOf((QuestionClassification)parentNode.getValue()) < 0)
                    coll.add((QuestionClassification)parentNode.getValue());
            }
        }
        if(childNode.getNodes() != null && childNode.getNodes().size() > 0)
            addGridClassification(coll, childNode, addParents);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private grdQuestionsRow getChildSearchNode(QuestionClassification item) 
{
    grdQuestionsRow parentRow, childRow;
    //Children
    for(int i=0; i<form.lyrTrees().tabPageSearch().grdQuestions().getRows().size(); i++)
    {
        parentRow = form.lyrTrees().tabPageSearch().grdQuestions().getRows().get(i);
        for(int k=0; parentRow != null && k<parentRow.getRows().size(); k++)
        {
            childRow = parentRow.getRows().get(k);
            Object objValue = childRow.getValue();
            if(objValue instanceof QuestionClassification)
            {
                if(item.equals(objValue))
                {
                    return childRow.getRows().newRow();
                }
            }
        }
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void getParents(QuestionClassificationCollection parents, QuestionClassificationCollection classification) 
{
    QuestionClassification parentLkp;
    //Build the parent collection
    for(int i=0; i<classification.size(); i++)
    {
        parentLkp = getParentLkp(classification.get(i));
        if(parentLkp != null)
        {
            if(parents.indexOf(parentLkp) < 0)
                parents.add(parentLkp);
        }
        else
        {
            if(parents.indexOf(classification.get(i)) < 0)
                parents.add(classification.get(i));
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private QuestionClassification getParentLkp(QuestionClassification lkpItem)
{
    QuestionClassificationCollection classColl = LookupHelper.getQuestionClassification(domain.getLookupService());
    //Load top parents
    LookupInstVo[] roots = classColl.getRoots();
    for(int i=0; roots != null && i<roots.length; i++)
    {
        for(int j=0; roots[i].getChildInstances() != null && j<roots[i].getChildInstances().size(); j++)
        {
            if(roots[i].getChildInstances().get(j).equals(lkpItem))
                return (QuestionClassification)roots[i];
        }

    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateClassification(QuestionInformationVo voQInfo)
{
    if (voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for (int j = 0; j < voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
            {
                node = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
                if (qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if (node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private QuestionClassificationCollection getClassification()
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for (int i = 0; i < form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().size(); i++)
    {
        parentNode = form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().getNodes().get(i);
        if (parentNode.isChecked())
            coll.add((QuestionClassification) parentNode.getValue());
        for (int j = 0; parentNode != null && j < parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if (childNode.isChecked())
                coll.add((QuestionClassification) childNode.getValue());
        }
    }
    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
private void loadClassification(QuestionInformationVo voQInfo) 
{
    if(voQInfo != null && voQInfo.getClassificationIsNotNull())
    {
        QuestionClassification qClassInfo;
        TreeNode node;
        for(int j=0; j<voQInfo.getClassification().size(); j++)
        {
            qClassInfo = voQInfo.getClassification().get(j);
            for(int i=0; i<form.treClassification().getNodes().size(); i++)
            {
                node = form.treClassification().getNodes().get(i);
                if(qClassInfo.equals(node.getValue()))
                    node.setChecked(true);

                if(node.getNodes() != null && node.getNodes().size() > 0)
                    setClassificationValue(qClassInfo, node);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private QuestionClassificationCollection getClassification() 
{
    QuestionClassificationCollection coll = new QuestionClassificationCollection();
    TreeNode parentNode, childNode;
    for(int i=0; i<form.treClassification().getNodes().size(); i++)
    {
        parentNode = form.treClassification().getNodes().get(i);
        if(parentNode.isChecked())
            coll.add((QuestionClassification)parentNode.getValue());
        for(int j=0; parentNode != null && j<parentNode.getNodes().size(); j++)
        {
            childNode = parentNode.getNodes().get(j);
            if(childNode.isChecked())
                coll.add((QuestionClassification)childNode.getValue());
        }
    }
    return coll;
}