Package lupos.gui.operatorgraph.visualeditor.util

Examples of lupos.gui.operatorgraph.visualeditor.util.SimpleOperatorGraphVisitor


          final LinkedHashSet<Operator> hop = new LinkedHashSet<Operator>();

          for (final Operator op : tc.getOperators()) {
            hop.add(op);

            op.visit(new SimpleOperatorGraphVisitor() {
              private static final long serialVersionUID = -350730291684630002L;

              public Object visit(final Operator basicOperator) {
                hop.add(basicOperator);
View Full Code Here


   * This method sets the preceding operators recursively in the whole
   * operator graph: If A has the succeeding operator B, then A is added to
   * the list of preceding operators in B.
   */
  public void setParents() {
    final SimpleOperatorGraphVisitor sogv = new SimpleOperatorGraphVisitor() {
      private static final long serialVersionUID = -3649188246478511485L;

      public Object visit(Operator operator) {
        if(operator instanceof OperatorContainer) {
          for(Operator op : ((OperatorContainer) operator).getOperators()) {
View Full Code Here

      panel.getQueryGraph().removeFromRootList(new GraphWrapperOperator(op));

    final LinkedHashSet<Operator> allOps = new LinkedHashSet<Operator>();

    for(final Operator rootNode : this.operators) {
      final SimpleOperatorGraphVisitor sogv = new SimpleOperatorGraphVisitor() {
        private static final long serialVersionUID = -3649188246478511485L;

        public Object visit(final Operator operator) {
          allOps.add(operator);
View Full Code Here

      int i = 0;

      for(Operator notVisitedOp : operators) {
        final int count = i;

        final SimpleOperatorGraphVisitor sogv = new SimpleOperatorGraphVisitor() {
          private static final long serialVersionUID = -3649188246478511485L;

          public Object visit(Operator operator) {
            numberReachable[count]++;

            return null;
          }
        };

        notVisitedOp.visit(sogv);

        i++;
      }

      int max = 0;

      for(int c = 1; c < numberReachable.length; ++c) {
        if(numberReachable[max] < numberReachable[c]) {
          max = c;
        }
      }

      result.add(operators[max]);


      final SimpleOperatorGraphVisitor sogv = new SimpleOperatorGraphVisitor() {
        private static final long serialVersionUID = -3649188246478511485L;

        public Object visit(Operator operator) {
          notVisitedOperators.remove(operator);
View Full Code Here

  @SuppressWarnings("unchecked")
  private static LinkedHashSet<Operator> nodeNotVisited(LinkedHashSet<Operator> nodeList, LinkedHashSet<Operator> rootNodes) {
    final LinkedHashSet<Operator> notVisitedNodes = (LinkedHashSet<Operator>) nodeList.clone();

    for(Operator rootNode : rootNodes) {
      final SimpleOperatorGraphVisitor sogv = new SimpleOperatorGraphVisitor() {
        private static final long serialVersionUID = -3649188246478511485L;

        public Object visit(Operator operator) {
          notVisitedNodes.remove(operator);
View Full Code Here

TOP

Related Classes of lupos.gui.operatorgraph.visualeditor.util.SimpleOperatorGraphVisitor

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.