Generates the graph string of the Cobweb tree

@return a <code>String</code> value
@throws Exception if an error occurs
8741
public String graph() {// throws Exception {
        StringBuffer text = new StringBuffer();

        text.append("digraph CobwebTree {\n");
        m_cobwebTree.graphTree(text);
        text.append("}\n");
        return text.toString();
    }
318259
def to_string(self):
        """"""


        # RMF: special case defaults for node, edge and graph properties.
        #
        node = quote_if_necessary(self.obj_dict['name'])

        node_attr = list()

        for attr in sorted(self.obj_dict['attributes']):
            value = self.obj_dict['attributes'][attr]
            if value == '':
                value = '""'
            if value is not None:
                node_attr.append(
                    '%s=%s' % (attr, quote_if_necessary(value) ) )
            else:
                node_attr.append( attr )


        # No point in having nodes setting any defaults if the don't set
        # any attributes...
        #
        if node in ('graph', 'node', 'edge') and len(node_attr) == 0:
            return ''

        node_attr = ', '.join(node_attr)

        if node_attr:
            node += ' [' + node_attr + ']'

        return node + ';'
164650
@Override
	public String[] getChildNodesValuesText() throws WidgetException {
		WebElement we = new Element(getByLocator()).getWebElement();
		List<WebElement> childNodes = we.findElements(By.xpath("./*"));
		String[] childText = new String[childNodes.size()];
		int i = 0;
		for (WebElement element : childNodes) {
			childText[i] = element.getText();
			i++;
		}
		return childText;
	}
598235
protected void generateIndexFile() throws IOException {
        String title = configuration.getText("doclet.Window_Single_Index");
        HtmlTree body = getBody(true, getWindowTitle(title));
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
                ? HtmlTree.HEADER()
                : body;
        addTop(htmlTree);
        addNavLinks(true, htmlTree);
        if (configuration.allowTag(HtmlTag.HEADER)) {
            body.addContent(htmlTree);
        }
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        Set<Object> keys = new TreeSet<>(Arrays.asList(indexbuilder.elements()));
        keys.addAll(configuration.tagSearchIndexKeys);
        elements = new ArrayList<>(keys);
        addLinksForIndexes(divTree);
        for (Object ch : elements) {
            Character unicode = (Character) ch;
            if (configuration.tagSearchIndexMap.get(unicode) == null) {
                addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
            } else if (indexbuilder.getMemberList(unicode) == null) {
                addSearchContents(unicode, configuration.tagSearchIndexMap.get(unicode), divTree);
            } else {
                addContents(unicode, indexbuilder.getMemberList(unicode),
                        configuration.tagSearchIndexMap.get(unicode), divTree);
            }
        }
        addLinksForIndexes(divTree);
        body.addContent((configuration.allowTag(HtmlTag.MAIN))
                ? HtmlTree.MAIN(divTree)
                : divTree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            htmlTree = HtmlTree.FOOTER();
        }
        addNavLinks(false, htmlTree);
        addBottom(htmlTree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(htmlTree);
        }
        createSearchIndexFiles();
        printHtmlDocument(null, true, body);
    }
788948
@Override
  public String doLayout(ILoggingEvent event) {

    // Format message
    String msg = super.doLayout(event).trim();
    // prevent log forging
    msg = preventLogForging(msg);

    // Formatting of exception, remove line breaks
    IThrowableProxy throwableProxy = event.getThrowableProxy();
    if (throwableProxy != null) {
      StackTraceElementProxy[] s = throwableProxy.getStackTraceElementProxyArray();
      if (s != null && s.length > 0) {
        // Performance: Initialize StringBuilder with (number of StackTrace-Elements + 1)*50 (+1 for Message)
        StringBuilder sb = new StringBuilder(s.length * BUFFER_PER_LINE);
        sb.append(msg);

        int len = s.length;
        for (int i = 0; i < len; i++) {
          sb.append(LINE_SEP).append(s[i]);
        }
        msg = sb.toString();
      }
    }
    return msg + NEWLINE;
  }
1119528
private static String exceptionToString(TryTree tree, VisitorState state) {
    if (tree.getCatches().size() != 1) {
      return "Exception";
    }
    Tree exceptionType = tree.getCatches().iterator().next().getParameter().getType();
    Type type = ASTHelpers.getType(exceptionType);
    if (type != null && type.isUnion()) {
      return "Exception";
    }
    return state.getSourceForNode(exceptionType);
  }
557004
protected final CnvIbnStringToCv
    createPutCnvIbnStringToCv() throws Exception {
    CnvIbnStringToCv convrt = new CnvIbnStringToCv();
    convrt.setIsNeedsToSqlEscape(getIsNeedsToSqlEscape());
    convrt.setSrvSqlEscape(getSrvSqlEscape());
    this.convertersMap
      .put(CnvIbnStringToCv.class.getSimpleName(), convrt);
    return convrt;
  }
1149311
public void write(Tree<?, ?> tree) throws IOException {
        this.writer.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"); //$NON-NLS-1$
        this.writer.append("<gxl>\n"); //$NON-NLS-1$

        if (tree != null) {
            this.writer.append("\t<graph id=\""); //$NON-NLS-1$
            this.writer.append(Integer.toHexString(System.identityHashCode(new Integer(tree.hashCode()))));
            this.writer.append("-"); //$NON-NLS-1$
            this.writer.append(Integer.toString(this.graphIndex++));
            this.writer.append("\" edgeids=\"true\" edgemode=\"directed\">\n"); //$NON-NLS-1$

            // Write the node attributes
            Iterator<? extends TreeNode<?, ?>> iterator = tree.broadFirstIterator();
            TreeNode<?, ?> node;
            int dataCount;
            while (iterator.hasNext()) {
                node = iterator.next();
                dataCount = node.getUserDataCount();
                final String name = "NODE" + Integer.toHexString(node.hashCode()); //$NON-NLS-1$
                final String label = Integer.toString(dataCount);

                this.writer.append("\t\t<node id=\""); //$NON-NLS-1$
                this.writer.append(name);
                this.writer.append("\">\n"); //$NON-NLS-1$

                this.writer.append("\t\t\t<attr name=\"label\">\n"); //$NON-NLS-1$
                this.writer.append("\t\t\t\t<string>"); //$NON-NLS-1$
                this.writer.append(label);
                this.writer.append("</string>\n"); //$NON-NLS-1$
                this.writer.append("\t\t\t</attr>\n"); //$NON-NLS-1$

                this.writer.append("\t\t</node>\n"); //$NON-NLS-1$
            }

            // Write the node attributes
            iterator = tree.broadFirstIterator();
            TreeNode<?, ?> child;
            String childName;
            while (iterator.hasNext()) {
                node = iterator.next();
                final String name = "NODE" + Integer.toHexString(node.hashCode()); //$NON-NLS-1$
                if (!node.isLeaf()) {
                    final int childCount = node.getChildCount();
                    for (int i = 0; i < childCount; ++i) {
                        child = node.getChildAt(i);
                        if (child != null) {
                            childName = "NODE" + Integer.toHexString(child.hashCode()); //$NON-NLS-1$

                            this.writer.append("\t\t<edge id=\""); //$NON-NLS-1$
                            this.writer.append(name);
                            this.writer.append("--"); //$NON-NLS-1$
                            this.writer.append(childName);
                            this.writer.append("\" isdirected=\"true\" from=\""); //$NON-NLS-1$
                            this.writer.append(name);
                            this.writer.append("\" to=\""); //$NON-NLS-1$
                            this.writer.append(childName);
                            this.writer.append("\">\n"); //$NON-NLS-1$

                            this.writer.append("\t\t\t<attr name=\"label\">\n"); //$NON-NLS-1$
                            this.writer.append("\t\t\t\t<string>"); //$NON-NLS-1$
                            this.writer.append(Integer.toString(i));
                            this.writer.append("</string>\n"); //$NON-NLS-1$
                            this.writer.append("\t\t\t</attr>\n"); //$NON-NLS-1$

                            this.writer.append("\t\t</edge>\n"); //$NON-NLS-1$
                        }
                    }
                }
            }

            this.writer.append("\t</graph>\n"); //$NON-NLS-1$
        }

        this.writer.append("</gxl>\n"); //$NON-NLS-1$
    }
313516
public String str()
  {
    String str = m_DTMXRTreeFrag.getDTM().getStringValue(m_dtmRoot).toString();

    return (null == str) ? "" : str;
  }
770865
def to_string(self):
        

        src = self.parse_node_ref( self.get_source() )
        dst = self.parse_node_ref( self.get_destination() )
        
        if isinstance(src, frozendict):
            edge = [ Subgraph(obj_dict=src).to_string() ]
        elif isinstance(src, (int, long)):
            edge = [ str(src) ]
        else:
            edge = [ src ]
        
        if	(self.get_parent_graph() and
            self.get_parent_graph().get_top_graph_type() and
            self.get_parent_graph().get_top_graph_type() == 'digraph' ):

            edge.append( '->' )
            
        else:
            edge.append( '--' )
            
        if isinstance(dst, frozendict):
            edge.append( Subgraph(obj_dict=dst).to_string() )
        elif isinstance(dst, (int, long)):
            edge.append( str(dst) )
        else:
            edge.append( dst )


        edge_attr = list()
        
        for attr, value in self.obj_dict['attributes'].iteritems():
        
            if value is not None:
                edge_attr.append( '%s=%s' % (attr, quote_if_necessary(value) ) )
            else:
                edge_attr.append( attr )

        edge_attr = ', '.join(edge_attr)
        
        if edge_attr:
            edge.append( ' [' + edge_attr + ']' )

        return ' '.join(edge) + ';'
646345
public String str()
  {
    int node = item(0);
    return (node != DTM.NULL) ? getStringFromNode(node).toString() : "";   
  }
216363
public String toXml() throws TwiMLException {
        try {
            Document doc = DocumentBuilderFactory
                .newInstance()
                .newDocumentBuilder()
                .newDocument();
            doc.setXmlStandalone(true);
            doc.appendChild(this.buildXmlElement(doc));

            Transformer transformer = TransformerFactory.newInstance().newTransformer();
            transformer.setOutputProperty(OutputKeys.INDENT, "no");
            DOMSource source = new DOMSource(doc);
            StreamResult output = new StreamResult(new StringWriter());
            transformer.transform(source, output);
            return output.getWriter().toString().trim();
        } catch (TransformerException te) {
            throw new TwiMLException("Exception serializing TwiML: " + te.getMessage());
        } catch (Exception e) {
            throw new TwiMLException("Unhandled exception: " + e.getMessage());
        }
    }
1213989
@Override
    public DefaultMutableTreeNode getDataAsTree() {
        HelpSet hs = getHelpSet();
        Hashtable<?, ?> params = getParameters();
        URL url;

        if (params == null || !params.containsKey("data")) {
            return new DefaultMutableTreeNode();
        }

        try {
            url = new URL(hs.getHelpSetURL(), (String) params.get("data"));
        } catch (Exception ex) {
            throw new Error("Trouble getting URL to TOC data; " + ex);
        }

        return parse(url, hs, hs.getLocale(), new TreeItemFactoryImpl(), this);
    }
685564
public String asString() {
    final StringBuilder builder = new StringBuilder();
    boolean first = true;
    for (int i = 1; i < this.nodeList.size(); i++) {
      final NodeImpl nodeImpl = (NodeImpl) this.nodeList.get(i);
      final String name = nodeImpl.asString();
      if (name.isEmpty()) {
        // skip the node if it does not contribute to the string representation of the path, eg
        // class level constraints
        continue;
      }

      if (!first) {
        builder.append(PROPERTY_PATH_SEPARATOR);
      }

      builder.append(nodeImpl.asString());

      first = false;
    }
    return builder.toString();
  }
38237
public Collection<String> getParticipantNodes() throws Exception
    {
        return LockInternals.getParticipantNodes(internals.getClient(), basePath, internals.getLockName(), internals.getDriver());
    }
109880
private static void generateToCConnectionListener(Map<String, List<TraceEvent>> events, FileWriter fw)
      throws Exception
   {
      writeString(fw, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"");
      writeEOL(fw);
      writeString(fw, "                      \"http://www.w3.org/TR/html4/loose.dtd\">");
      writeEOL(fw);

      writeString(fw, "<html>");
      writeEOL(fw);

      writeString(fw, "<head>");
      writeEOL(fw);

      writeString(fw, "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">");
      writeEOL(fw);

      writeString(fw, "<title>Reference: ConnectionListener</title>");
      writeEOL(fw);

      writeString(fw, "</head>");
      writeEOL(fw);

      writeString(fw, "<body style=\"background: #D7D7D7;\">");
      writeEOL(fw);

      writeString(fw, "<h1>Reference: ConnectionListener</h1>");
      writeEOL(fw);

      writeString(fw, "<table>");
      writeEOL(fw);
      
      writeString(fw, "<tr>");
      writeEOL(fw);

      writeString(fw, "<td><b>ConnectionListener</b></td>");
      writeEOL(fw);

      writeString(fw, "<td><b>ManagedConnectionPool</b></td>");
      writeEOL(fw);

      writeString(fw, "<td><b>Pool</b></td>");
      writeEOL(fw);

      writeString(fw, "</tr>");
      writeEOL(fw);

      for (Map.Entry<String, List<TraceEvent>> entry : events.entrySet())
      {
         TraceEvent te = entry.getValue().get(0);

         writeString(fw, "<tr>");
         writeEOL(fw);

         writeString(fw, "<td><a href=\"" + te.getPool() + "/" + te.getConnectionListener() + "/index.html\">" +
                     te.getConnectionListener() + "</a></td>");
         writeEOL(fw);
         
         writeString(fw, "<td>" + te.getManagedConnectionPool() + "</td>");
         writeEOL(fw);
      
         writeString(fw, "<td><a href=\"" + te.getPool() + "/index.html\">" + te.getPool() + "</a></td>");
         writeEOL(fw);
      
         writeString(fw, "</tr>");
         writeEOL(fw);
      }

      writeString(fw, "</table>");
      writeEOL(fw);

      writeString(fw, "<p>");
      writeEOL(fw);

      writeString(fw, "<a href=\"index.html\">Back</a>");
      writeEOL(fw);

      writeString(fw, "</body>");
      writeEOL(fw);

      writeString(fw, "</html>");
      writeEOL(fw);
   }
655252
private void displayNode(JspWriter out, ViewNode node, String url_Path, int level, int width) throws IOException {

		// ----------------------------------------显示节点本身信息，如节点名称等开始
		String encodedNodeKey = URLEncoder.encode(node.getKey(), "UTF-8");
		String action = replace(nodeAction, "${key}", encodedNodeKey);
		StringBuilder url = new StringBuilder(url_Path);
		url.append(action);
		if (nodeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("key=").append(node.getKey());
		String treeNodeAction = url.toString();

		url = new StringBuilder(url_Path);
		url.append(treeAction);
		if (treeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("select=").append(node.getKey());
		String updateNodeAction = url.toString();

		// Render the label for this node (if any)
		out.print("    <td colspan=\"");
		out.print(width - level + 1);
		out.print("\">");

		// 这里省略了icon

		if (node.getLabel() != null) {
			String labelStyle = null;
			if (node.isSelected())
				labelStyle = CSS_STYLE_SELECTED;
			else if (!node.isSelected())
				labelStyle = CSS_STYLE_UN_SELECTED;
			if (treeNodeAction != null) {
				// Note the leading space so that the text has some space
				// between it and any preceding images
				out.print(" <a href=\"");
				out.print(treeNodeAction);
				out.print("\"");
				if (target != null) {
					out.print(" target=\"");
					out.print(target);
					out.print("\"");
				}
				if (labelStyle != null) {
					out.print(" class=\"");
					out.print(labelStyle);
					out.print("\"");
				}
				// to refresh the tree in the same 'self' frame
				out.print(" onclick=\"");
				out.print("self.location.href='" + updateNodeAction + "'");
				out.print("\"");
				out.print(">");
			} else if (labelStyle != null) {
				out.print("<span class=\"");
				out.print(labelStyle);
				out.print("\">");
			}
			out.print(node.getLabel());
			if (treeNodeAction != null)
				out.print("</a>");
			else if (labelStyle != null)
				out.print("</span>");
		}

		out.println("</td>");

		// ----------------------------------------显示节点本身信息，如节点名称等结束

	}