Package com.google.code.apis.rest.client.Wadl

Examples of com.google.code.apis.rest.client.Wadl.RepresentationNode


            treatParam(referencedParam);           
            return;
          }
        }
        else if (referenceNode instanceof RepresentationNode) {
          RepresentationNode referencedRepresentation = (RepresentationNode) allObjectsIterator.next();
          if (referencedRepresentation.getId().equals(href)) {
            treatRepresentation(referencedRepresentation);
            return;
          }
        }       
      }
View Full Code Here


    else if (parentNode instanceof ApplicationNode) {
      allRepresentations = ((ApplicationNode) parentNode).getAllRepresentations();           
    }   
    Iterator allRepresentationsIterator = allRepresentations.iterator();
    while (allRepresentationsIterator.hasNext()) {
      RepresentationNode representation = (RepresentationNode) allRepresentationsIterator.next();
      RepresentationItem representationItem = new RepresentationItem(representation, parentNode, parentTreeItem);
      TreeItem representationTreeItem = new TreeItem(representationItem);
      representationTreeItem.setUserObject(WadlXml.representationNode);
      parentTreeItem.addItem(representationTreeItem);     
     
      if (representation.getHref() == null) {
        String requestString = "";
        if (representation.getApplication() != null) {
          requestString = representation.getApplication().getAnalyzer().getRequestString();
        }
        ParamItem.listParams(
            representation,
            representationTreeItem,
            requestString);    
     
        // close representation item
        GenericClosingItem representationCloseItem = new GenericClosingItem(WadlXml.representationNode);
        TreeItem representationCloseTreeItem = new TreeItem(representationCloseItem);
        representationCloseTreeItem.setUserObject(WadlXml.representationNode);
        parentTreeItem.addItem(representationCloseTreeItem);
      }
    }
   
    if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.representationNode)) {
      // add representation button           
      HorizontalPanel addRepresentationPanel = new HorizontalPanel();     
      Button addRepresentationButton = new Button(GuiFactory.strings.addRepresentation());
      addRepresentationButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof RequestNode) {
            ((RequestNode) parentNode).addRepresentation(new RepresentationNode(GuiFactory.strings.newRepresentation(), application_xml, (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));           
          }
          else if (parentNode instanceof ResponseNode) {
            ((ResponseNode) parentNode).addRepresentation(new RepresentationNode(GuiFactory.strings.newRepresentation(), application_xml, (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));           
          }
          else if (parentNode instanceof ApplicationNode) {
            RepresentationNode representation = new RepresentationNode(GuiFactory.strings.newRepresentation(), application_xml, (GenericNode) parentNode, ((GenericNode) parentNode).getApplication());
            representation.setId(GuiFactory.strings.newId());
            ((ApplicationNode) parentNode).addRepresentation(representation);           
          }       
          listRepresentations(parentNode, parentTreeItem);               
        }
      });
View Full Code Here

TOP

Related Classes of com.google.code.apis.rest.client.Wadl.RepresentationNode

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.