Package edu.indiana.extreme.xbaya.component.gui

Examples of edu.indiana.extreme.xbaya.component.gui.ComponentTreeNode


      String urlString = url.toString();
      String name = urlString.substring(urlString.lastIndexOf('/') + 1);
      URLComponentReference componentReference = new URLComponentReference(
          name, components);
      this.treeLeaf = new ComponentTreeNode(componentReference);

    } catch (ComponentException e) {
      e.printStackTrace();
    } catch (WsdlException e) {
      e.printStackTrace();
View Full Code Here


   *
   * @return The ComponentTree
   */
  @Override
  public ComponentTreeNode getComponentTree() {
    ComponentTreeNode tree = new ComponentTreeNode(this);
    /*
     * for (String name : this.componentMap.keySet()) { Component component
     * = this.componentMap.get(name); WSComponentReference
     * componentReference = new WSComponentReference( name, component);
     * tree.add(new ComponentTreeNode(componentReference)); }
     */

    tree.add(this.treeLeaf);
    return tree;
  }
View Full Code Here

     * @see edu.indiana.extreme.xbaya.component.registry.ComponentRegistry#getComponentTree()
     */
    @Override
    public ComponentTreeNode getComponentTree()
            throws ComponentRegistryException {
        this.tree = new ComponentTreeNode(this);
        parse();
        return this.tree;
    }
View Full Code Here

    private void addComponents(String name, List<WSComponent> components) {
        this.componentsMap.put(name, components);
        WebComponentReference componentReference = new WebComponentReference(
                name, components);
        ComponentTreeNode treeLeaf = new ComponentTreeNode(componentReference);
        this.tree.add(treeLeaf);
    }
View Full Code Here

  /**
   * @see edu.indiana.extreme.xbaya.component.registry.ComponentRegistry#getComponentTree()
   */
  @Override
  public ComponentTreeNode getComponentTree() {
    ComponentTreeNode tree = new ComponentTreeNode(this);
    for (String name : this.componentMap.keySet()) {
      Component component = this.componentMap.get(name);
      SystemComponentReference componentReference = new SystemComponentReference(name, component);
      tree.add(new ComponentTreeNode(componentReference));
    }
    return tree;
  }
View Full Code Here

     */
    @Override
    public ComponentTreeNode getComponentTree()
            throws ComponentRegistryException {
        try {
            ComponentTreeNode componentTree = getComponentTree(this.directory);
            componentTree.setComponentRegistry(this);
            return componentTree;
        } catch (RuntimeException e) {
            throw new ComponentRegistryException(e);
        }
    }
View Full Code Here

        if (!dir.isDirectory()) {
            throw new XBayaRuntimeException(dir + "is not a directory.");
        }

        boolean found = false;
        ComponentTreeNode tree = new ComponentTreeNode(dir.getName());
        for (File file : dir.listFiles()) {
            String fileName = file.getName();
            if (file.isDirectory()) {
                ComponentTreeNode subTree = getComponentTree(file);
                if (subTree != null) {
                    found = true;
                    tree.add(subTree);
                }
            } else if (fileName.endsWith(XBayaConstants.XML_SUFFIX)
                    || fileName.endsWith(XBayaConstants.WSDL_SUFFIX)
                    || fileName.endsWith(XBayaConstants.WSDL_SUFFIX2)) {
                found = true;
                LocalComponentReference componentReference = new LocalComponentReference(
                        file.getName(), file, this);
                ComponentTreeNode treeLeaf = new ComponentTreeNode(
                        componentReference);
                treeLeaf.setAllowsChildren(false);
                tree.add(treeLeaf);
            }
        }
        if (!found) {
            // Doesn't show a directory that doesn't have any components.
View Full Code Here

        if (this.xregistryClient == null) {
            connect();
        }

        try {
            ComponentTreeNode tree = new ComponentTreeNode(this);

            List<QName> qnames = new ArrayList<QName>();
            if (this.type == Type.CONCRETE) {
                // "" returns all CWSDLs.
                WsdlData[] datas = this.xregistryClient.findServiceInstance("");
                if (datas != null) {
                    for (WsdlData wsdlData : datas) {
                        qnames.add(wsdlData.getName());
                    }
                }
            } else {
                ServiceDescData[] datas = this.xregistryClient.findServiceDesc("");
                if (datas != null) {
                    for (ServiceDescData wsdlData : datas) {
                        qnames.add(wsdlData.getName());
                    }
                }
            }

            Map<String, ComponentTreeNode> namespaceMap = new HashMap<String, ComponentTreeNode>();

            for (QName qname : qnames) {
                logger.finest("qname: " + qname);
                XRegistryComponentReference componentRef = new XRegistryComponentReference(
                        this, qname);
                String namespace = qname.getNamespaceURI();
                ComponentTreeNode namespaceNode = namespaceMap.get(namespace);
                if (namespaceNode == null) {
                    namespaceNode = new ComponentTreeNode(namespace);
                    namespaceMap.put(namespace, namespaceNode);
                    tree.add(namespaceNode);
                }
                ComponentTreeNode treeLeaf = new ComponentTreeNode(componentRef);
                namespaceNode.add(treeLeaf);
            }
            return tree;
        } catch (XRegistryClientException e) {
            throw new ComponentRegistryException(e);
View Full Code Here

     * @param registry
     */
    private void runInThread(ComponentRegistry registry) {
        logger.entering();
        try {
            ComponentTreeNode componentTree = registry.getComponentTree();
            if (this.canceled) {
                return;
            }
            this.engine.getGUI().getComponentSelector().addComponentTree(
                    componentTree);
View Full Code Here

     *
     * @param url
     */
    public URLComponentRegistry(URI url) {
        this.url = url;
        this.tree = new ComponentTreeNode(this);
    }
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.component.gui.ComponentTreeNode

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.