/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }
/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }
/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }
try { String content = ((XhtmlTextConstruct)(entry.getTextContent() .getContent())).getXhtml().getBlob();
/** * Returns the comment of the complaint. * * @return the comment of the complaint */ public String getComment() { if (getContent() instanceof TextContent) { return ((TextContent) getContent()).getContent().getPlainText(); } return null; }
/** * Returns the comment of the complaint. * * @return the comment of the complaint */ public String getComment() { if (getContent() instanceof TextContent) { return ((TextContent) getContent()).getContent().getPlainText(); } return null; }
.getEntries(query, sitesService); for (BaseContentEntry<?> entry : entries) { String otherContent = entry.getTextContent().getContent().getPlainText(); if (otherContent.equals(content)) { return true;
/** * Positive test case for RetrieveSingleContactGroup method with mandatory parameters. */ @Test(priority = 2, groups = { "wso2.esb" }, dependsOnMethods = { "testCreateContactGroupWithMandatoryParameters" }, description = "Google Contacts {retrieveSingleContactGroup integration test with mandatory parameters.") public void testRetrieveSingleContactGroup() throws Exception { Map<String, String> parametersMap = new HashMap<String, String>(); parametersMap.put("groupId", groupId); SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_retrieveSingleContactGroup_mandatory.xml", parametersMap); ContactGroupEntry directResponse = (ContactGroupEntry) directInvoker.retrieveSingleContactGroup(groupId); // Assert id Assert.assertEquals((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:id/text())", nameSpaceMap), directResponse.getId()); // Assert title Assert.assertEquals((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:title/text())", nameSpaceMap), directResponse.getTitle().getPlainText()); // Assert content Assert.assertEquals((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:content/text())", nameSpaceMap), ((TextContent) directResponse.getContent()).getContent().getPlainText()); }
public GSpreadResultSet retrieveData() throws Exception { URL worksheetUrl = this.getConfig().generateWorksheetFeedURL(); WorksheetFeed feedw = this.getConfig().getFeed(worksheetUrl, WorksheetFeed.class); WorksheetEntry worksheetEntry = feedw.getEntries().get(this.getWorksheetNumber() - 1); CellFeed feedc = this.getConfig().getFeed(worksheetEntry.getCellFeedUrl(), CellFeed.class); List<CellEntry> entries = feedc.getEntries(); GSpreadResultSet grs = new GSpreadResultSet(); /* store the data */ for (CellEntry entry : entries) { grs.addCell(this.getPosStringFromId(entry.getId()), entry.getTextContent().getContent().getPlainText()); } return grs; }