Examples of Branch


Examples of cascading.lingual.optiq.meta.Branch

    return new CascadingJoinRel( getCluster(), traitSet, left, right, conditionExpr, this.joinType, this.variablesStopped, this.hash );
    }

  public Branch visitChild( Stack stack )
    {
    Branch lhsBranch = ( (CascadingRelNode) left ).visitChild( stack );
    Branch rhsBranch = ( (CascadingRelNode) right ).visitChild( stack );

    Pipe leftPipe = new Pipe( "lhs", lhsBranch.current );
    leftPipe = stack.addDebug( this, leftPipe, "lhs" );

    Pipe rightPipe = new Pipe( "rhs", rhsBranch.current );
    rightPipe = stack.addDebug( this, rightPipe, "rhs" );

    Fields lhsGroup = createTypedFieldsSelectorFor( getCluster(), leftKeys, left.getRowType(), true );
    Fields rhsGroup = createTypedFieldsSelectorFor( getCluster(), rightKeys, right.getRowType(), true );

    NullNotEquivalentComparator comparator = new NullNotEquivalentComparator();
    for( int i = 0; i < lhsGroup.size(); i++ )
      lhsGroup.setComparator( i, comparator );

    Joiner joiner = getJoiner();

    Fields declaredFields = RelUtil.createTypedFieldsFor( this, false );

    // need to parse lhs rhs fields from condition
    String name = stack.getNameFor( CoGroup.class, leftPipe, rightPipe );
    Pipe coGroup = new CoGroup( name, leftPipe, lhsGroup, rightPipe, rhsGroup, declaredFields, joiner );

    coGroup = stack.addDebug( this, coGroup );

    return new Branch( coGroup, lhsBranch, rhsBranch );
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.testing.operator.ExOperatorFactory.Branch

    @Override
    protected void describe() {
        ExOperatorFactory f = new ExOperatorFactory();
        CoreOperatorFactory core = new CoreOperatorFactory();
        Branch branch = f.branch(in);
        out1.add(branch.yes);
        out2.add(branch.yes);
        out2.add(branch.no);
        out3.add(branch.no);
        core.stop(branch.cancel);
View Full Code Here

Examples of com.asakusafw.compiler.flow.testing.operator.ExOperatorFactory.Branch

    @Override
    protected void describe() {
        ExOperatorFactory f = new ExOperatorFactory();
        CoreOperatorFactory core = new CoreOperatorFactory();
        Update update = f.update(in1, 10);
        Branch bra = f.branch(update.out);
        Cogroup cog = f.cogroup(core.confluent(bra.yes, bra.cancel), in2);
        core.stop(bra.no);
        out1.add(cog.r1);
        out2.add(cog.r2);
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.testing.operator.ExOperatorFactory.Branch

            protected void describe() {
                ExOperatorFactory f = new ExOperatorFactory();
                CoreOperatorFactory c = new CoreOperatorFactory();
                Cogroup cog1 = f.cogroup(pIn1, c.empty(Ex2.class));
                c.stop(cog1.r2);
                Branch bra = f.branch(cog1.r1);
                c.stop(bra.cancel);
                c.stop(bra.no);
                Cogroup cog2 = f.cogroup(bra.yes, c.empty(Ex2.class));
                c.stop(cog2.r2);
                pOut1.add(cog2.r1);
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Branch

      b.closeElement("b");

      b.openElement("p");
      final HashSet<Branch.NameKey> ids = new HashSet<Branch.NameKey>();
      for (int row = 1; row < table.getRowCount(); row++) {
        final Branch k = getRowItem(row);
        if (k != null && table.getWidget(row, 1) instanceof CheckBox
            && ((CheckBox) table.getWidget(row, 1)).getValue()) {
          if (!ids.isEmpty()) {
            b.append(",").br();
          }
          b.append(k.getName());
          ids.add(k.getNameKey());
        }
      }
      b.closeElement("p");
      if (ids.isEmpty()) {
        return;
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Branch

      Util.PROJECT_SVC.deleteBranch(getProjectKey(), branchIds,
          new GerritCallback<Set<Branch.NameKey>>() {
            public void onSuccess(final Set<Branch.NameKey> deleted) {
              if (!deleted.isEmpty()) {
                for (int row = 1; row < table.getRowCount();) {
                  final Branch k = getRowItem(row);
                  if (k != null && deleted.contains(k.getNameKey())) {
                    table.removeRow(row);
                  } else {
                    row++;
                  }
                }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Branch

    final ProjectControl pctl = projectControlFactory.validateFor( //
        projectName, //
        ProjectControl.OWNER | ProjectControl.VISIBLE);

    final List<Branch> branches = new ArrayList<Branch>();
    Branch headBranch = null;
    Branch configBranch = null;
    final Set<String> targets = new HashSet<String>();

    final Repository db;
    try {
      db = repoManager.openRepository(projectName);
    } catch (RepositoryNotFoundException noGitRepository) {
      return new ListBranchesResult(branches, false, true);
    }
    try {
      final Map<String, Ref> all = db.getAllRefs();

      if (!all.containsKey(Constants.HEAD)) {
        // The branch pointed to by HEAD doesn't exist yet, so getAllRefs
        // filtered it out. If we ask for it individually we can find the
        // underlying target and put it into the map anyway.
        //
        try {
          Ref head = db.getRef(Constants.HEAD);
          if (head != null) {
            all.put(Constants.HEAD, head);
          }
        } catch (IOException e) {
          // Ignore the failure reading HEAD.
        }
      }

      for (final Ref ref : all.values()) {
        if (ref.isSymbolic()) {
          targets.add(ref.getTarget().getName());
        }
      }

      for (final Ref ref : all.values()) {
        if (ref.isSymbolic()) {
          // A symbolic reference to another branch, instead of
          // showing the resolved value, show the name it references.
          //
          String target = ref.getTarget().getName();
          RefControl targetRefControl = pctl.controlForRef(target);
          if (!targetRefControl.isVisible()) {
            continue;
          }
          if (target.startsWith(Constants.R_HEADS)) {
            target = target.substring(Constants.R_HEADS.length());
          }

          Branch b = createBranch(ref.getName());
          b.setRevision(new RevId(target));

          if (Constants.HEAD.equals(ref.getName())) {
            b.setCanDelete(false);
            headBranch = b;
          } else {
            b.setCanDelete(targetRefControl.canDelete());
            branches.add(b);
          }
          continue;
        }

        final RefControl refControl = pctl.controlForRef(ref.getName());
        if (refControl.isVisible()) {
          if (ref.getName().startsWith(Constants.R_HEADS)) {
            branches.add(createBranch(ref, refControl, targets));
          } else if (GitRepositoryManager.REF_CONFIG.equals(ref.getName())) {
            configBranch = createBranch(ref, refControl, targets);
          }
        }
      }
    } finally {
      db.close();
    }
    Collections.sort(branches, new Comparator<Branch>() {
      @Override
      public int compare(final Branch a, final Branch b) {
        return a.getName().compareTo(b.getName());
      }
    });
    if (configBranch != null) {
      branches.add(0, configBranch);
    }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Branch

    return new ListBranchesResult(branches, pctl.canAddRefs(), false);
  }

  private Branch createBranch(final Ref ref, final RefControl refControl,
      final Set<String> targets) {
    final Branch b = createBranch(ref.getName());
    if (ref.getObjectId() != null) {
      b.setRevision(new RevId(ref.getObjectId().name()));
    }
    b.setCanDelete(!targets.contains(ref.getName()) && refControl.canDelete());
    return b;
  }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Branch

    b.setCanDelete(!targets.contains(ref.getName()) && refControl.canDelete());
    return b;
  }

  private Branch createBranch(final String name) {
    return new Branch(new Branch.NameKey(projectName, name));
  }
View Full Code Here

Examples of com.google.javascript.jscomp.ControlFlowGraph.Branch

  private static final class ReachablePredicate implements
      Predicate<EdgeTuple<Node, ControlFlowGraph.Branch>> {

    @Override
    public boolean apply(EdgeTuple<Node, Branch> input) {
      Branch branch = input.edge;
      if (!branch.isConditional()) {
        return true;
      }
      Node predecessor = input.sourceNode;
      Node condition = NodeUtil.getConditionExpression(predecessor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.