code: public UNode toDoc() {
          UNode rootNode = UNode.createMapNode(m_name, "command");
          if (!Utils.isEmpty(m_summary)) {
              rootNode.addValueNode("summary", m_summary);
          }
          rootNode.addValueNode("uri", m_uri);
          rootNode.addValueNode("methods", getMethodList());
          if (m_isPrivileged) {
              rootNode.addValueNode("privileged", Boolean.toString(m_isPrivileged));
          }
          if (!Utils.isEmpty(m_inputEntity)) {
              rootNode.addValueNode("input-entity", m_inputEntity);
          }
          if (!Utils.isEmpty(m_outputEntity)) {
              rootNode.addValueNode("output-entity", m_outputEntity);
          }
          if (m_parameters.size() > 0) {
              UNode paramsNode = rootNode.addMapNode("parameters");
              for (RESTParameter param : m_parameters) {
                  paramsNode.addChildNode(param.toDoc());
              }
          }
          return rootNode;
      }
docs: Serialize this RESTCommand into a {@link UNode} tree and return the root node.
  The tree can be serialized into JSON or XML using {@link UNode#toJSON()} or
  {@link UNode#toXML()}.
  
  @return  Root node of a {@link UNode} tree.