Examples of parseText()


Examples of groovy.json.JsonSlurper.parseText()

  @Override
  protected void doSendLine(String line) {
    ObjectMapper mapper = new ObjectMapper();
    JsonSlurper jsonSlurper = new JsonSlurper();
    @SuppressWarnings("unchecked")
    Map<String, List<Map<String, ?>>> map = (Map<String, List<Map<String, ?>>>) jsonSlurper.parseText(line);
    List<Map<String, ?>> statuses = map.get("statuses");
    for (Map<String, ?> tweet : statuses) {
      StringWriter sw = new StringWriter();
      try {
        mapper.writeValue(sw, tweet);
View Full Code Here

Examples of groovy.util.XmlSlurper.parseText()

                .build();

        String response = client.post(input);

        XmlSlurper slurper = new XmlSlurper(XMLReaderFactory.createXMLReader());
        return slurper.parseText(response).toString();
    }

    public void greet(PrintStream to, String name) {
        to.println(createGreeting(name));
    }
View Full Code Here

Examples of groovy.util.XmlSlurper.parseText()

     * @throws ParserConfigurationException
     */
    public static GPathResult xml(com.google.appengine.api.xmpp.Message message) throws IOException, SAXException, ParserConfigurationException {
        if (message.isXml()) {
            XmlSlurper slurper = new XmlSlurper();
            return slurper.parseText(message.getStanza());
        } else {
            throw new RuntimeException("You can't get the XML of this message as this is not an XML message.");
        }
    }

View Full Code Here

Examples of groovy.util.XmlSlurper.parseText()

    String rawUWSInfo = "";
    String msgMeta = "";
    XmlSlurper slupler;
    try {
      slupler = new XmlSlurper();
      GPathResult result = slupler.parseText(message);
      for (Iterator iterator = result.childNodes(); iterator.hasNext();) {
        Node next = (Node)iterator.next();
        if(!"UWSInfo".equalsIgnoreCase(next.name())) {
          continue;
        }
View Full Code Here

Examples of it.unimi.dsi.parser.BulletParser.parseText()

        while ((l = reader.read(text, offset, text.length - offset)) > 0) {
            offset += l;
            text = CharArrays.grow(text, offset + 1);
        }

        bulletParser.parseText(true);
        bulletParser.parseCDATA(true);
        bulletParser.parseTags(true);
        bulletParser.parse(text, 0, offset);

        return querySet;
View Full Code Here

Examples of it.unimi.dsi.parser.BulletParser.parseText()

    while ((l = reader.read(text, offset, text.length - offset)) > 0) {
      offset += l;
      text = CharArrays.grow(text, offset + 1);
    }

    bulletParser.parseText(true);
    bulletParser.parseCDATA(true);
    bulletParser.parseTags(true);
    bulletParser.parse(text, 0, offset);

    return querySet;
View Full Code Here

Examples of it.unimi.dsi.parser.BulletParser.parseText()

            boolean output;

            @Override
            public void configure(BulletParser parser) {
                parser.parseTags(true);
                parser.parseText(true);
            }

            @Override
            public void startDocument() {
                inContent = 0;
View Full Code Here

Examples of org.gradle.foundation.output.OutputParser.parseText()

   }

   public static void parseTest( String textToSearch, boolean verifyFileExists, FileLink ... expectedResults )
   {
      OutputParser outputParser = new OutputParser( new FileLinkDefinitionLord(), verifyFileExists );
      List<FileLink> fileLinks = outputParser.parseText( textToSearch );

      TestUtility.assertListContents( fileLinks, expectedResults );
   }

   public void testCompileErrors()
View Full Code Here

Examples of org.gradle.foundation.output.OutputParser.parseText()

        parseTest(textToSearch, false, expectedResults);
    }

    public static void parseTest(String textToSearch, boolean verifyFileExists, FileLink... expectedResults) {
        OutputParser outputParser = new OutputParser(new FileLinkDefinitionLord(), verifyFileExists);
        List<FileLink> fileLinks = outputParser.parseText(textToSearch);

        TestUtility.assertListContents(fileLinks, expectedResults);
    }

    public void testCompileErrors() {
View Full Code Here

Examples of org.wikipediacleaner.api.MediaWiki.parseText()

      MediaWiki mw = MediaWiki.getMediaWikiAccess(this);
      if (textExpanded != null) {
        textExpanded.setText(mw.expandTemplates(getWikipedia(), title, textOriginal.getText()));
      }
      if (htmlPreview != null) {
        String text = mw.parseText(getWikipedia(), title, textOriginal.getText());
        htmlPreview.setHtml(
            "<html><head>" +
            "</head><body>" + text + "</body></html>");
      }
    } catch (APIException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.