Package com.google.gwt.xml.client

Examples of com.google.gwt.xml.client.NodeList


        }
        ResourceTypeNode resourceType = new ResourceTypeNode(id, application);
        application.addResourceType(resourceType);       
       
        // resource_typeChildren = {paramNode, methodNode, docNode}
        NodeList childNodes = resourceTypeElement.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
          if (childNodes.item(i).getNodeName().equals(WadlXml.methodNode)) {
            if (!parseMethodNode(childNodes.item(i), resourceType, false)) {
              return false;
            }
          }
          else if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
            if (!parseParamNode(childNodes.item(i), resourceType, false)) {
              return false;
            }
          }
          else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
            if (!parseDocNode(childNodes.item(i), resourceType)) {
              return false;
            }
          }
        }       
      }
View Full Code Here


        }
        ResourcesNode resources = new ResourcesNode(base, application);
        application.addResources(resources);
       
        // resourcesChildren = {resourceNode, docNode}
        NodeList childNodes = resourcesElement.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
          if (childNodes.item(i).getNodeName().equals(WadlXml.resourceNode)) {
            if (!parseResourceNode(childNodes.item(i), resources, false)) {
              return false;
            }
          }
          else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
            if (!parseDocNode(childNodes.item(i), resources)) {
              return false;
            }
          }
        }
      }
View Full Code Here

            ResourceNode resource = null;
            if (!isReferenced) { 
              resource = new ResourceNode(pathAttribute.getNodeValue(), (GenericNode) parentNode, ((GenericNode) parentNode).getApplication());                           
             
              // resourceChildren = {paramNode, methodNode, resourceNode, docNode}
              NodeList childNodes = resourceElement.getChildNodes();
              for (int i = 0; i < childNodes.getLength(); i++) {           
                if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
                  if (!parseParamNode(childNodes.item(i), resource, false)) {
                    return false;
                  }
                }
                else if (childNodes.item(i).getNodeName().equals(WadlXml.methodNode)) {
                  if (!parseMethodNode(childNodes.item(i), resource, false)) {
                    return false;
                  }
                }
                else if (childNodes.item(i).getNodeName().equals(WadlXml.resourceNode)) {                 
                  if (!parseResourceNode(childNodes.item(i), resource, false)) {
                    return false;
                  }
                }
                else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
                  if (!parseDocNode(childNodes.item(i), resource)) {
                    return false;
                  }               
                }
              }
              Node idNode = resourceElement.getAttributes().getNamedItem(WadlXml.resource_id);
View Full Code Here

      if ((idNode != null) && (idNode.getNodeValue().equals(id))) {         
        parseFoundNode(entryNode, parentNode);
        return;
      }     
    }
    NodeList childNodes = entryNode.getChildNodes();  
    for (int i = 0; i < childNodes.getLength(); i++) {
      getElementByIdThenParse(childNodes.item(i), id, parentNode);     
    }   
  }
View Full Code Here

              if (idNode != null) {
                method.setId(idNode.getNodeValue());
              }
                           
              // methodChildren = {requestNode, responseNode, docNode}
              NodeList childNodes = methodElement.getChildNodes();
              for (int i = 0; i < childNodes.getLength(); i++) {          
                if (childNodes.item(i).getNodeName().equals(WadlXml.requestNode)) {       
                  if (!parseRequestNode(childNodes.item(i), method)) {
                    return false;
                  }       
                }
                else if (childNodes.item(i).getNodeName().equals(WadlXml.responseNode)) {       
                  if (!parseResponseNode(childNodes.item(i), method)) {
                    return false;
                  }       
                }
                else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {       
                  if (!parseDocNode(childNodes.item(i), method)) {
                    return false;
                  }       
                }
              }
            }
View Full Code Here

   * @param method
   */
  private boolean parseRequestNode(Node requestElement, MethodNode method) {   
    if (containsOnlyAllowedChildren(requestElement, WadlXml.requestChildren)) {     
      // requestChildren = {representationNode, paramNode, docNode};
      NodeList childNodes = requestElement.getChildNodes();
      RequestNode request = new RequestNode(method, method.getApplication());
      method.addRequest(request);
      for (int i = 0; i < childNodes.getLength(); i++) {
        if (childNodes.item(i).getNodeName().equals(WadlXml.representationNode)) {
          if (!parseRepresentationNode(childNodes.item(i), request, false)) {
            return false;
          }
        }
        else if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
          if (!parseParamNode(childNodes.item(i), request, false)) {
            return false;
          }
        }      
        else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
          if (!parseDocNode(childNodes.item(i), request)) {
            return false;
          }
        }
      }
    }
View Full Code Here

   * @param method
   */
  private boolean parseResponseNode(Node responseElement, MethodNode method) {           
    if (containsOnlyAllowedChildren(responseElement, WadlXml.responseChildren)) {    
      // responseChildren = {representationNode, faultNode, paramNode, docNode};
      NodeList childNodes = responseElement.getChildNodes();
      ResponseNode response = new ResponseNode(method, method.getApplication());
      method.addResponse(response);
      for (int i = 0; i < childNodes.getLength(); i++) {
        if (childNodes.item(i).getNodeName().equals(WadlXml.representationNode)) {         
          if (!parseRepresentationNode(childNodes.item(i), response, false)) {
            return false;
          }
        }
        else if (childNodes.item(i).getNodeName().equals(WadlXml.faultNode)) {       
          if (!parseFaultNode(childNodes.item(i), response, false)) {
            return false;
          }
        }
        else if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
          if (!parseParamNode(childNodes.item(i), response, false)) {
            return false;
          }
        }       
        else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
          if (!parseDocNode(childNodes.item(i), response)) {
            return false;
          }
        }
      }
    }
View Full Code Here

            if (idNode != null) {
              fault.setId(idNode.getNodeValue());
            }
           
            // faultChildren = {paramNode, docNode}
            NodeList childNodes = faultElement.getChildNodes();
            for (int i = 0; i < childNodes.getLength(); i++) {
              if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
                if (!parseParamNode(childNodes.item(i), fault, false));
              }
              else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
                if (!parseDocNode(childNodes.item(i), fault));
              }
            }
          }
          else {
            Node idNode = faultElement.getAttributes().getNamedItem(WadlXml.fault_id);           
View Full Code Here

            if (idNode != null) {
              representation.setId(idNode.getNodeValue());
            }
           
            // representationChildren = {paramNode, docNode}
            NodeList childNodes = representationElement.getChildNodes();
            for (int i = 0; i < childNodes.getLength(); i++) {
              if (childNodes.item(i).getNodeName().equals(WadlXml.paramNode)) {
                if (!parseParamNode(childNodes.item(i), representation, false));
              }         
              else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
                if (!parseDocNode(childNodes.item(i), representation));
              }
            }
          }
          else {           
            Node idNode = representationElement.getAttributes().getNamedItem(WadlXml.representation_id);           
View Full Code Here

            if (idNode != null) {
              param.setId(idNode.getNodeValue());
            }
           
            // paramChildren = {optionNode, linkNode, docNode}
            NodeList childNodes = paramElement.getChildNodes();
            for (int i = 0; i < childNodes.getLength(); i++) {
              if (childNodes.item(i).getNodeName().equals(WadlXml.optionNode)) {
                if (!parseOptionNode(childNodes.item(i), param));
              }
              else if (childNodes.item(i).getNodeName().equals(WadlXml.linkNode)) {
                if (!parseLinkNode(childNodes.item(i), param));
              }
              else if (childNodes.item(i).getNodeName().equals(WadlXml.docNode)) {
                if (!parseDocNode(childNodes.item(i), param));
              }
            }
          }
          else {
            Node idNode = paramElement.getAttributes().getNamedItem(WadlXml.param_id);
View Full Code Here

TOP

Related Classes of com.google.gwt.xml.client.NodeList

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.