Package com.projity.grouping.core.model

Examples of com.projity.grouping.core.model.NodeModel.search()


      return ((double) calcSummedActualWork()) / work;
  }

  private long calcSummedWork() {
    NodeModel nodeModel = getProject().getTaskOutline();
    Node node = nodeModel.search(this);
    if (node == null)
      return 0;
    Number value = (Number) Configuration.getFieldFromId("Field.work")
        .getValue(node, nodeModel, null);
    return value.longValue();
View Full Code Here


    return value.longValue();
  }

  private long calcSummedActualWork() {
    NodeModel nodeModel = getProject().getTaskOutline();
    Node node = nodeModel.search(this);
    Number value = (Number) Configuration
        .getFieldFromId("Field.actualWork").getValue(node, nodeModel,
            null);
    return value.longValue();
  }
View Full Code Here

  }
  public long getParentId(int outlineNumber) {
    NodeModel model= getResourcePool().getResourceOutline(outlineNumber);
    if (model == null)
      return 0;
    Node node = model.getParent(model.search(this));
    Object impl = node.getImpl();
    if (impl != null && impl instanceof HasKey)
      return ((HasKey)impl).getId();
    return 0;
  }
View Full Code Here

    return 0;
  }

  public boolean isParent() {
    NodeModel model= getResourcePool().getResourceOutline();
    return model.hasChildren(model.search(this));
  }
  public double getCustomCost(int i) {
    return globalResource.getCustomCost(i);
  }
  public long getCustomDate(int i) {
View Full Code Here

   
    int topRow = Integer.MAX_VALUE;
    Object topResource = null;
    for (int i = 0; i < selectedResourcesOnTree.size(); i++) {
      resource = selectedResourcesOnTree.get(i);
      int row = nodeModel.getHierarchy().getIndexOfNode(nodeModel.search(resource),false);
      sel[i] = row;
      if (row < topRow) {
        topRow = row;
        topResource = resource;
      }
View Full Code Here

  public static final Resource findResource(String name) {
    return findResourceByName(name, globalPool);
  }
  public List getChildrenResoures(Resource parent) {
    NodeModel resourceModel = getResourceOutline();
    Node node = resourceModel.search(parent);
    return NodeList.nodeListToImplList(resourceModel.getChildren(node));
  }
  public Resource getRbsParentResource(Resource child) {
    NodeModel resourceModel = getResourceOutline();
    Node node = resourceModel.search(child);
View Full Code Here

    Node node = resourceModel.search(parent);
    return NodeList.nodeListToImplList(resourceModel.getChildren(node));
  }
  public Resource getRbsParentResource(Resource child) {
    NodeModel resourceModel = getResourceOutline();
    Node node = resourceModel.search(child);
    Node parent = resourceModel.getParent(node);
    if (parent == null || parent.isVoid())
      return null;
    return (Resource)parent.getImpl();
  }
View Full Code Here

  public long getParentId(int outlineNumber) {
    NodeModel model= project.getTaskOutline(outlineNumber);
    if (model == null)
      return 0;
    Node node = model.getParent(model.search(this));
    Object impl = node.getImpl();
    if (impl != null && impl instanceof HasKey)
      return ((HasKey)impl).getId();
    return 0;
  }
View Full Code Here

  public int getOutlineLevel(int outlineNumber) {
    NodeModel model= project.getTaskOutline(outlineNumber);
    if (model == null)
      return 0;
    Node node = model.getParent(model.search(this));
    return model.getHierarchy().getLevel(node);
  }
  public int getOutlineLevel() {
    return getOutlineLevel(OutlineCollection.DEFAULT_OUTLINE);
  }
View Full Code Here

      return ((double) calcSummedActualWork()) / work;
  }

  private long calcSummedWork() {
    NodeModel nodeModel = getProject().getTaskOutline();
    Node node = nodeModel.search(this);
    if (node == null)
      return 0;
    Number value = (Number) Configuration.getFieldFromId("Field.work")
        .getValue(node, nodeModel, null);
    return value.longValue();
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.