Package com.google.gdata.data

Examples of com.google.gdata.data.TextConstruct$ChildHandlerInfo


      } catch (ParserConfigurationException e) {
        throw new RuntimeException(e);
      }
    } else if (content instanceof TextContent) {
      TextContent textContent = (TextContent) content;
      TextConstruct textConstruct = textContent.getContent();

      int type = textContent.getContent().getType();
      String typeName;
      String text;
      switch (type) {
        case TextConstruct.Type.HTML:
          typeName = "html";
          text = ((HtmlTextConstruct) textConstruct).getHtml();
          break;

        case TextConstruct.Type.TEXT:
          typeName = "text";
          text = ((PlainTextConstruct) textConstruct).getPlainText();
          break;

        case TextConstruct.Type.XHTML:
          typeName = "xhtml";
          text = ((XhtmlTextConstruct) textConstruct).getXhtml().getBlob();
          break;

        default:
          typeName = "unknown";
          text = textConstruct.toString();
      }

      Map<String, Object> entity = new HashMap<String, Object>();
      entity.put("content", text);
      entity.put("type", typeName);
View Full Code Here

TOP

Related Classes of com.google.gdata.data.TextConstruct$ChildHandlerInfo

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.