/* ****************************************************************************
*
* TypeEntityVector::render -
*/
std::string TypeEntityVector::render
(
  ConnectionInfo*     ciP,
  const std::string&  indent,
  bool                comma
)
{
  std::string out      = "";
  std::string xmlTag   = "typeEntities";
  std::string jsonTag  = "types";


  if (vec.size() > 0)
  {
    if ((ciP->uriParam["attributesFormat"] == "object") && (ciP->outFormat == JSON))
    {
      return renderAsJsonObject(ciP, indent, comma);
    }

    out += startTag(indent, xmlTag, jsonTag, ciP->outFormat, true, true);

    for (unsigned int ix = 0; ix < vec.size(); ++ix)
    {
      out += vec[ix]->render(ciP, indent + "  ", ix != vec.size() - 1);
    }
    out += endTag(indent, xmlTag, ciP->outFormat, comma, true);
  }

  return out;
}
/* ****************************************************************************
*
* EntityTypesResponse::render -
*/
std::string EntityTypesResponse::render(ConnectionInfo* ciP, const std::string& indent)
{
  std::string out                 = "";
  std::string tag                 = "entityTypesResponse";

  if ((ciP->uriParam["attributesFormat"] == "object") && (ciP->outFormat == JSON))
  {
    return renderAsJsonObject(ciP, indent);
  }

  out += startTag(indent, tag, ciP->outFormat, false);

  if (typeEntityVector.size() > 0)
    out += typeEntityVector.render(ciP, indent + "  ", true);

  out += statusCode.render(ciP->outFormat, indent + "  ");

  out += endTag(indent, tag, ciP->outFormat);

  return out;
}