Package ch.tatool.element

Examples of ch.tatool.element.Node


     * Unique id of the element. This includes the localId of the parent elements as well
     * and has to be unique in a element/handler tree
     */
    public String getId() {
        LinkedList<Node> nodes = new LinkedList<Node>();
        Node u = this;
        while (u != null) {
            nodes.addFirst(u);
            u = u.getParent();
        }
        StringBuilder builder = new StringBuilder();
        Iterator<Node> it = nodes.iterator();
       
        // add first element (we know we have at least one!)
View Full Code Here


   *
   * @return whether the trial is complete
   */
  private boolean isCompoundDone(ExecutionContext context) {

        Node currElement = context.getActiveElement();
        boolean isDone = true;
        while (this.getParent() != null) {

            // CompoundElement
            if (currElement instanceof CompoundElement) {
                CompoundElement comp = (CompoundElement) currElement;

                for (Object handler : comp.getHandlers()) {
                    if (handler instanceof CompoundSelector) {
                        CompoundSelector selector = (CompoundSelector) handler;
                        isDone = selector.isDone();
                    }
                }

            }
           
            if (this.getParent().getId().equals(currElement.getId())) {
              return isDone;
            }
           
            if (currElement.getParent() != null) {
                currElement = currElement.getParent();
            } else {
                return true;
            }

        }
View Full Code Here

   *
   * @return whether the trial is complete
   */
  private boolean isCompoundDone(ExecutionContext context) {

    Node currElement = context.getActiveElement();
        boolean isDone = true;
        while (this.getParent() != null) {

            // CompoundElement
            if (currElement instanceof CompoundElement) {
                CompoundElement comp = (CompoundElement) currElement;

                for (Object handler : comp.getHandlers()) {
                    if (handler instanceof CompoundSelector) {
                        CompoundSelector selector = (CompoundSelector) handler;
                        isDone = selector.isDone();
                    }
                }

            }
           
            if (this.getParent().getId().equals(currElement.getId())) {
              return isDone;
            }
           
            if (currElement.getParent() != null) {
                currElement = currElement.getParent();
            } else {
                return true;
            }

        }
View Full Code Here

     * This default implementation first mirrors the points as set by the executable element,
     * followed by letting all PointAdaptors set on the executable element as aspects adapt
     * the points as they wish.
     */
    protected void processPoints(ExecutionContext context) {
      Node u = context.getActiveExecutable();

      // first copy the points from the executable element to the score and level handler
      // check whether any of the properties has been set.
      boolean avail = false;
      for (Trial trial : context.getExecutionData().getTrials()) {
View Full Code Here

   *
   * @return whether the trial is complete
   */
  private boolean isCompoundDone(ExecutionContext context, Trial trial) {

        Node currElement = context.getActiveElement();
       
        boolean isDone = true;
        while (this.getParent() != null
                && this.getParent() != currElement) {

            // CompoundElement
            if (currElement instanceof CompoundElement) {
                CompoundElement comp = (CompoundElement) currElement;

                for (Object handler : comp.getHandlers()) {
                    if (handler instanceof CompoundSelector) {
                        CompoundSelector selector = (CompoundSelector) handler;
                        isDone = selector.isDone();
                    }
                }

            }
            if (currElement.getParent() != null) {
                currElement = currElement.getParent();
            } else {
                return true;
            }

        }
View Full Code Here

   *
   * @return whether the trial is complete
   */
  private boolean isCompoundDone(ExecutionContext context, Trial trial) {

        Node currElement = context.getActiveElement();
       
        boolean isDone = true;
        while (this.getParent() != null
                && this.getParent() != currElement) {

            // CompoundElement
            if (currElement instanceof CompoundElement) {
                CompoundElement comp = (CompoundElement) currElement;

                for (Object handler : comp.getHandlers()) {
                    if (handler instanceof CompoundSelector) {
                        CompoundSelector selector = (CompoundSelector) handler;
                        isDone = selector.isDone();
                    }
                }

            }
            if (currElement.getParent() != null) {
                currElement = currElement.getParent();
            } else {
                return true;
            }

        }
View Full Code Here

     * Unique id of the element. This includes the localId of the parent elements as well
     * and has to be unique in a element/handler tree
     */
    public String getId() {
        LinkedList<Node> nodes = new LinkedList<Node>();
        Node u = this;
        while (u != null) {
            nodes.addFirst(u);
            u = u.getParent();
        }
        StringBuilder builder = new StringBuilder();
        Iterator<Node> it = nodes.iterator();
       
        // add first element (we know we have at least one!)
View Full Code Here

TOP

Related Classes of ch.tatool.element.Node

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.