Examples of Branch


Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch

        assertThat(gerritProjects.size(), equalTo(1));
        GerritProject gerritProject = gerritProjects.get(0);
        assertThat(gerritProject.getPattern(), equalTo("project"));
        List<Branch> branches = gerritProject.getBranches();
        assertThat(branches.size(), equalTo(1));
        Branch branch = branches.get(0);
        assertThat(branch.getPattern(), equalTo("bra.*"));
        List<PluginGerritEvent> triggerOnEvents = trigger.getTriggerOnEvents();
        assertThat(triggerOnEvents.size(), equalTo(2));
        assertEquals(triggerOnEvents.get(0).getCorrespondingEventClass(), PatchsetCreated.class);
        assertEquals(triggerOnEvents.get(1).getCorrespondingEventClass(), DraftPublished.class);
    }
View Full Code Here

Examples of flash.swf.actions.Branch

        return a;
    }

    private Branch decodeBranch(int code, ActionFactory factory) throws IOException
    {
        Branch a = new Branch(code);
        int offset = reader.readSI16();
        int target = offset + reader.getOffset();
        a.target = factory.getLabel(target);
        return a;
    }
View Full Code Here

Examples of forestry.core.genetics.Branch

    butterflyInterface.registerTemplate(ButterflyTemplates.getLeopardLacewingTemplate());

  }

  private IClassification createButterflyBranch(IClassification family, String scientific) {
    IClassification branch = new Branch("moth." + scientific.toLowerCase(Locale.ENGLISH), scientific);
    branch.setParent(family);
    return branch;
  }
View Full Code Here

Examples of hudson.plugins.git.Branch

        // reason to poll for a commit
        if (!isPollCall && singleBranch.matches("[0-9a-f]{6,40}")) {
            try {
                ObjectId sha1 = git.revParse(singleBranch);
                Revision revision = new Revision(sha1);
                revision.getBranches().add(new Branch("detached", sha1));
                verbose(listener, "Will build the detached SHA1 {0}", sha1);
                return Collections.singletonList(revision);
            } catch (GitException e) {
                // revision does not exist, may still be a branch
                // for example a branch called "badface" would show up here
                verbose(listener, "Not a valid SHA1 {0}", singleBranch);
            }
        }

        // if it doesn't contain '/' then it could be either a tag or an unqualified branch
        if (!singleBranch.contains("/")) {
            // the 'branch' could actually be a tag:
            Set<String> tags = git.getTagNames(singleBranch);
            if (tags.size() == 0) {
                // its not a tag, so lets fully qualify the branch
                String repository = gitSCM.getRepositories().get(0).getName();
                singleBranch = repository + "/" + singleBranch;
                verbose(listener, "{0} is not a tag. Qualifying with the repository {1} a a branch", singleBranch,
                    repository);
            }
        }

        try {
            ObjectId sha1 = git.revParse(singleBranch);
            verbose(listener, "rev-parse {0} -> {1}", singleBranch, sha1);

            // if polling for changes don't select something that has
            // already been built as a build candidate
            if (isPollCall && data.hasBeenBuilt(sha1)) {
                verbose(listener, "{0} has already been built", sha1);
                return emptyList();
            }

            verbose(listener, "Found a new commit {0} to be built on {1}", sha1, singleBranch);

            Revision revision = new Revision(sha1);
            revision.getBranches().add(new Branch(singleBranch, sha1));
            return Collections.singletonList(revision);
        } catch (GitException e) {
            // branch does not exist, there is nothing to build
            verbose(listener, "Failed to rev-parse: {0}", singleBranch);
            return emptyList();
View Full Code Here

Examples of hudson.plugins.git.Branch

        for (Iterator<Revision> i = revs.iterator(); i.hasNext();) {
            Revision r = i.next();

            // filter out uninteresting branches
            for (Iterator<Branch> j = r.getBranches().iterator(); j.hasNext();) {
                Branch b = j.next();
                boolean keep = false;
                for (BranchSpec bspec : gitSCM.getBranches()) {
                    if (bspec.matches(b.getName())) {
                        keep = true;
                        break;
                    }
                }
View Full Code Here

Examples of ket.math.Branch

  public static Argument[] toRow(Argument argument) {
    // TODO: Does the function type matter: currently commas, vectors, and anything are allowed, but this means that a*b*c -> [a,b,c].
    if (argument==null || argument instanceof Token) {
      return null;
    }
    Branch rowBranch = (Branch) argument;
    if (rowBranch.size()==0) {
      return null
    }
    Argument[] row = new Argument[rowBranch.size()];
    for (int i=0; i<row.length; i++) {
      row[i] = rowBranch.getChild(i);
    }
    return row;
  }
View Full Code Here

Examples of net.anzix.fsz.voxelworld.features.components.Branch

        FloatBuffer textureCoordBuffer = BufferUtils.createVector2Buffer(numOfNonVoxelBranches * numOfSegments * 2);
        IntBuffer indexBuffer = BufferUtils.createIntBuffer(numOfNonVoxelBranches * (numOfSegments + 1) * 2);
        FloatBuffer normalBuffer = BufferUtils.createVector3Buffer(numOfNonVoxelBranches * numOfSegments * 2);
             
        for (int i = 0; i<branches.size(); i++) {
            Branch branch = branches.get(i);
            FszMatrix4 transform = branch.getTransform();
            double startRadius = branch.getStartRadius();
            double endRadius = branch.getEndRadius();
            double length = branch.getLength();
           
            int ii = i* numOfSegments * 2;
            Vector3 startPoint = branch.getStartPoint();

            for (int s = 0; s<numOfSegments; s++) {
                double angle = s * Math.PI * 2 /numOfSegments ;
                float texCoordX = s/(float)numOfSegments;
               
View Full Code Here

Examples of net.anzix.fsz.voxelworld.features.components.Branch

        position.multiplyLocal(rotation);
      
        if (startRadius > 0.75) { //voxel branmch
           
            double endRadius = startRadius * factor;
            Branch branch = new Branch(position, length, startRadius, endRadius);
            branches.add(branch);
       
            numOfNonVoxelBranches++;
       
            branch.shiftPositionToEndpoint(position);
           
            FszMatrix4 position2 = new FszMatrix4 (position);
            double divisionFactor = Math.random();
            AddBranch(position2, divisionFactor, length, endRadius)
View Full Code Here

Examples of net.opentsdb.tree.Branch

      } else {
        branch_id = Branch.stringToId(branch_hex);
      }
     
      // fetch it
      final Branch branch = Branch.fetchBranch(tsdb, branch_id, true)
        .joinUninterruptibly();
      if (branch == null) {
        throw new BadRequestException(HttpResponseStatus.NOT_FOUND,
            "Unable to locate branch '" + Branch.idToString(branch_id) +
            "' for tree '" + Tree.bytesToId(branch_id) + "'");
View Full Code Here

Examples of nexj.core.meta.workflow.Branch

         public void handleElement(Element eventElement, String sEventName)
         {
            Node child = eventElement.getFirstChild();
            String sElement = eventElement.getNodeName();
            Concurrent activity = new Concurrent();
            Branch branch = null;

            activity.setFork(fork);

            if (sElement.equals("TimerEvent"))
            {
               if (m_bTimer)
               {
                  throw new MetadataException("err.meta.workflow.multipleQueueTimers",
                     new Object[]{assignment.getName()});
               }

               Timeout timeout = new Timeout();

               timeout.setActivity(activity);
               timeout.setValue(m_helper.parse(XMLUtil.getReqStringAttr(eventElement, "value"),
                  false, activity.getFlow().getPosMap(), null, m_metadata.getGlobalEnvironment()));
               activity.addStep(timeout);

               Wait wait = new Wait(timeout);

               timeout.setNext(wait);
               activity.addStep(wait);

               m_bTimer = true;
            }
            else if (sElement.equals("ClassEvent"))
            {
               AutoCompletion completion = new AutoCompletion(assignment);

               loadWorkflowHandler(eventElement, completion, activity.getFlow());
               activity.addStep(completion);
            }
            else if (sElement.equals("ManualEvent"))
            {
               Object condition = m_helper.parse(XMLUtil.getStringAttr(eventElement, "condition"),
                  false, assignment.getActivity().getFlow().getPosMap(),
                  Boolean.TRUE, m_metadata.getGlobalEnvironment());
               boolean bTarget = loadTarget(eventElement, assignment, condition, sEventName, false);
               Element first = XMLUtil.findFirstElement(child);

               if (first != null && first.getNodeName().equals("UIAction"))
               {
                  loadTarget(first, assignment, condition, sEventName, bTarget);
                  child = first.getNextSibling();
               }

               if (assignment.getManualCompletion() == null)
               {
                  ManualCompletion completion = new ManualCompletion(assignment);

                  activity.addStep(completion);
               }
               else
               {
                  activity = null;
               }
            }
            else if (sElement.equals("ProcessEvent"))
            {
               branch = new Branch();
               decision.addBranch(branch);

               assignment.setSemaphore(true);

               Semaphore semaphore = new Semaphore(assignment.getName() + ":Semaphore", assignment);

               semaphore.setActivity(activity);
               activity.addStep(semaphore);

               Block block = new Block();

               block.setActivity(branch);
               branch.addStep(block);
               loadActivity(child, block.getContainedActivity());
               block.setCleanupCode(semaphore.getExitCode());
            }
            else
            {
               throw new MetadataException("err.meta.workflow.invalidQueueElement",
                  new Object[]{sElement, assignment.getName()});
            }

            if (eventMap.put(sEventName, Boolean.TRUE) != null)
            {
               throw new MetadataException("err.meta.workflow.queueEventDup",
                  new Object[]{sEventName, assignment.getName()});
            }

            Variable var = assignment.getActivity().getFlow().findVariable(assignment.getName());

            if (var == null)
            {
               var = new Variable(assignment.getName());
               assignment.getActivity().getFlow().addVariable(var);
            }

            if (activity != null)
            {
               Object code;

               if (activity.getStep(0) instanceof ManualCompletion)
               {
                  // ((:state'bind ('<assignment>'targetFunction)) '() (:flow'getToken <step>))
                  code =
                     Pair.list(
                        Pair.list(Symbol._STATE, Pair.quote(Symbol.BIND),
                           Pair.list(Pair.quote(assignment), Pair.quote(Symbol.TARGETFUNCTION))),
                        null,
                        Pair.list(Symbol._FLOW, Pair.quote(Symbol.GETTOKEN), Pair.quote(activity.getStep(0))));
               }
               else
               {
                  code = sEventName;
               }

               Script script = new Script();

               script.setBody(Pair.list(Pair.list(Symbol.SET, var.getSymbol(), code)));
               activity.addStep(script);
               fork.addConcurrent(activity);
            }

            if (branch == null)
            {
               branch = new Branch();
               decision.addBranch(branch);
               loadActivity(child, branch);
            }

            branch.setCondition(Pair.list(Symbol.EQUAL_P, var.getSymbol(), sEventName));
         }
      });

      if (fork.getConcurrentCount() == 0)
      {
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.