Package org.patika.mada.algorithm

Examples of org.patika.mada.algorithm.LocalPoIQuery


    Set<Node> targetSet = new HashSet<Node>();
    targetSet.addAll(main.getRootGraph().getRelatedStates(selectedNodePair.getNodeB()));

    // PoI will be run from the first node in NodePair to the second one
    // with shortest+0 length limit and not strict type
    LocalPoIQuery poi = new LocalPoIQuery(sourceSet, targetSet, LocalPoIQuery.SHORTEST_PLUS_K,
      0, false);
    Set<GraphObject> resultSet = poi.run();

    if (resultSet.size() == 0)
         {
             MessageDialog.openWarning(main.getShell(),
                 "No result!",
View Full Code Here


    /**
     * To find the paths between compartments, PoI will be run from
     * the nodes in the source compartment to the nodes in the target
     * compartment
     */
    LocalPoIQuery poi;
        Set<GraphObject> result = new HashSet<GraphObject>();

        //if length limit is selected and strict is unchecked.
        if (options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), false);
        }
        //if length limit is selected and strict is checked.
        else if (options.getLimitType() && options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), true);
        }
        //if shortest+k is selected and strict is unchecked.
        else if (!options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), false);
        }
        //if shortest+k is selected and strict is checked.
        else
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), true);
        }

        //Run PoI and add result of PoI to the result set
        result.addAll(poi.run());

        //if no result can be found, open dialog to warn.
        if (result.size() == 0)
        {
            MessageDialog.openWarning(main.getShell(),
View Full Code Here

   
    /**
         * To add the missing paths between the source set and the result set
         * to the query result, PoI must be performed.
         */
        LocalPoIQuery poi = null;
       
        //if downsteam, PoI from source to result
        if (options.isDownstream())
        {
            poi = new LocalPoIQuery(sourceNodesSet,
              streamResult,
                true,
                options.getLengthLimit(),
                false);
        }
        //if upstream, PoI from result to source
        else
        {
            poi = new LocalPoIQuery(streamResult,
              sourceNodesSet,
                true,
                options.getLengthLimit(),
                false);
        }

        //View result of query and Highlight it
        viewAndHighlightResult(poi.run(),
          options.isCurrentView(),
          "Common Stream");
  }
View Full Code Here

        /**
         * GoI finds the paths between a set of nodes, thus running GoI is equal
         * to giving the source nodes to PoI as both source set and target set.
         */
        LocalPoIQuery poi = new LocalPoIQuery(sourceNodes, sourceNodes,
            true, options.getLengthLimit(), false);
        result.addAll(poi.run());

        viewAndHighlightResult(result,
            options.isCurrentView(),
            "Graph of Interest");
    }
View Full Code Here

   
    /**
         * To add the missing paths between the source set and the result set
         * to the query result, PoI must be performed.
         */
        LocalPoIQuery poi = null;
       
        //if downsteam, PoI from source to result
        if (options.isDownstream())
        {
            poi = new LocalPoIQuery(sourceNodesSet,
              streamResult,
                true,
                options.getLengthLimit(),
                false);
        }
        //if upstream, PoI from result to source
        else
        {
            poi = new LocalPoIQuery(streamResult,
              sourceNodesSet,
                true,
                options.getLengthLimit(),
                false);
        }

        //View result of query and Highlight it
        viewAndHighlightResult(poi.run(),
          options.isCurrentView(),
          "Common Stream");
  }
View Full Code Here

            {
                targetNodes.add((Node) go);
            }
        }

        LocalPoIQuery poi = null;
        Set<GraphObject> result = new HashSet<GraphObject>();

        //if length limit is selected and strict is unchecked.
        if (options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), false);
        }
        //if length limit is selected and strict is checked.
        else if (options.getLimitType() && options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), true);
        }
        //if shortest+k is selected and strict is unchecked.
        else if (!options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), false);
        }
        //if shortest+k is selected and strict is checked.
        else
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), true);
        }

        //Add result of PoI to the result set
        result.addAll(poi.run());

        //if no result can be found, open dialog to warn.
        if (result.size() == 0)
        {
            MessageDialog.openWarning(main.getShell(),
View Full Code Here

        /**
         * GoI finds the paths between a set of nodes, thus running GoI is equal
         * to giving the source nodes to PoI as both source set and target set.
         */
        LocalPoIQuery poi = new LocalPoIQuery(sourceNodes, sourceNodes,
            true, options.getLengthLimit(), false);
        result.addAll(poi.run());

        viewAndHighlightResult(result,
            options.isCurrentView(),
            "Graph of Interest");
    }
View Full Code Here

            {
                targetNodes.add((Node) go);
            }
        }

        LocalPoIQuery poi;
        Set<GraphObject> result = new HashSet<GraphObject>();

        //if length limit is selected and strict is unchecked.
        if (options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), false);
        }
        //if length limit is selected and strict is checked.
        else if (options.getLimitType() && options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                true, options.getLengthLimit(), true);
        }
        //if shortest+k is selected and strict is unchecked.
        else if (!options.getLimitType() && !options.isStrict())
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), false);
        }
        //if shortest+k is selected and strict is checked.
        else
        {
            poi = new LocalPoIQuery(sourceNodes, targetNodes,
                false, options.getShortestPlusKLimit(), true);
        }

        //Add result of PoI to the result set
        result.addAll(poi.run());

        //if no result can be found, open dialog to warn.
        if (result.size() == 0)
        {
            MessageDialog.openWarning(main.getShell(),
View Full Code Here

TOP

Related Classes of org.patika.mada.algorithm.LocalPoIQuery

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.