Package oi.thekraken.grok.api

Examples of oi.thekraken.grok.api.Grok.match()


            "Jul", "July", "Aug", "August", "Sep", "September", "Oct", "October", "Nov",
            "November", "Dec", "December"};
    List<String> months = new ArrayList<String>(Arrays.asList(array));
    int i = 0;
    for (String month : months) {
      Match m = grok.match(month);
      m.captures();
      assertNotNull(m.toMap());
      assertEquals(m.toMap().get("MONTH"), months.get(i));
      i++;
    }
View Full Code Here


        "2001-12-07T23:54:54.123456Z"};

    List<String> times = new ArrayList<String>(Arrays.asList(array));
    int i = 0;
    for (String time : times) {
      Match m = grok.match(time);
      m.captures();
      assertNotNull(m.toMap());
      assertEquals(m.toMap().get("TIMESTAMP_ISO8601"), times.get(i));
      i++;
    }
View Full Code Here

            "svn+ssh://somehost:12345/testing"};

    List<String> uris = new ArrayList<String>(Arrays.asList(array));
    int i = 0;
    for (String uri : uris) {
      Match m = grok.match(uri);
      m.captures();
      assertNotNull(m.toMap());
      assertEquals(m.toMap().get("URI"), uris.get(i));
      assertNotNull(m.toMap().get("URIPROTO"));
      i++;
View Full Code Here

        "svn+ssh://somehost:12345/testing"
        };
    List<String> uris = new ArrayList<String>(Arrays.asList(array));
    int i = 0;
    for (String uri : uris) {
      Match m = grok.match(uri);
      m.captures();
      assertNotNull(m.toMap());
      if (i == 2) {
        assertEquals(Collections.EMPTY_MAP, m.toMap());
      }
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.