Package org.palo.api

Examples of org.palo.api.ElementNode


   
    public void visit(ElementNode elementNode, ElementNode parent) {
      if (elementNode.getElement().getId().equals(elementId) && path == null) {
        path = new StringBuffer();
        path.append(elementNode.getElement().getId());
        ElementNode par = elementNode.getParent();
        while (par != null) {
          path.insert(0, "/");
          path.insert(0, par.getElement().getId());
          par = par.getParent();
        }
      }
    }
View Full Code Here


    }
   
    public void visit(ElementNode elementNode, ElementNode parent) {
      if (elementNode.getElement().getId().equals(elementId) && result == -1) {
        result = 0;
        ElementNode par = elementNode.getParent();
        while (par != null) {         
          result += par.getChildren().length;
          par = par.getParent();
        }
      }
    }
View Full Code Here

      axisHierarchy.setLocalFilter(null);
    else {
      Hierarchy hierarchy = axisHierarchy.getHierarchy();     
      LocalFilter filter = new LocalFilterImpl();
      for (XElementNode xElement : visibleElements) {
        ElementNode elementNode = createElementNode(xElement, hierarchy);
        filter.addVisibleElement(elementNode);
      }
      axisHierarchy.setLocalFilter(filter);
    }
  }
View Full Code Here

    XElement xElement = xElNode.getElement();
    if(xElement.getElementType().equals(XElementType.VIRTUAL)) {
      element = new VirtualElementImpl(xElement.getName(), hierarchy);
    }else
      element = hierarchy.getElementById(xElNode.getElement().getId());
    ElementNode node = new ElementNode(element);
    addChildren(node, xElNode, hierarchy);
    return node;
  }
View Full Code Here

    addChildren(node, xElNode, hierarchy);
    return node;
  }
  private static final void addChildren(ElementNode parent, XElementNode xParent, Hierarchy hierarchy) {
    for(XElementNode xElNode : xParent.getChildren()) {
      ElementNode node = createElementNode(xElNode, hierarchy);
      parent.forceAddChild(node);
    }
  }
View Full Code Here

TOP

Related Classes of org.palo.api.ElementNode

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.