Package com.projity.grouping.core.transform.transformer

Examples of com.projity.grouping.core.transform.transformer.NodeTransformer


        Map<GraphicNode,List<GraphicNode>> assignmentsMap=null;
        if (!transformer.isShowAssignments()) removeAssignments(list);
        if (!transformer.isShowEmptyLines()) removeVoids(list);
        if (transformer.isShowEmptyLines()&&!transformer.isShowEndEmptyLines()) removeEndVoids(list);

        NodeTransformer composition=transformer.getTransformer();

        NodeFilter hiddenFilter=transformer.getHiddenFilter();
        if (hiddenFilter instanceof BaseFilter && !((BaseFilter)hiddenFilter).isActive()) hiddenFilter=null; //to avoid useless filtering in case of BaseFilter
        NodeFilter userFilter=(transformer.isNoneFilter())?null:transformer.getUserFilter();
        boolean filtering=hiddenFilter!=null||userFilter!=null;

        NodeSorter sorter1=transformer.getHiddenSorter();
        NodeSorter sorter2=transformer.getUserSorter();
        boolean sorting=!(sorter1==null&&transformer.isNoneSorter());

        NodeGrouper grouper=transformer.getUserGrouper();
        boolean grouping=!transformer.isNoneGrouper();

        if (!filtering&&!sorting&&!grouping) return;

        if (transformer.isShowAssignments()&&preserveHierarchy&&!transformer.isTreatAssignmentsAsTasks()) assignmentsMap=extractAssignments(list);


        List localList=null;
        Stack parents=null;
        boolean alreadyExcluded;
        if (preserveHierarchy){
          localList=new ArrayList();
          parents=new Stack();
        }else localList=list;

        GraphicNode gnode,previous=null;
        Object current;
        for (Iterator i=list.iterator();i.hasNext();){
            gnode=(GraphicNode)i.next();
            gnode.setFiltered(false);
            if (!gnode.isVoid()){
              current=(composition==null)?gnode.getNode():composition.evaluate(gnode.getNode());
              alreadyExcluded=false;
               if (hiddenFilter!=null){
                   if(!hiddenFilter.evaluate(current)){
                      if (!gnode.isSummary() || !preserveHierarchy){
                        i.remove();
View Full Code Here

TOP

Related Classes of com.projity.grouping.core.transform.transformer.NodeTransformer

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.