This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.luckyrhinos.sbg.robots; | |
import static io.vertx.core.parsetools.JsonEventType.VALUE; | |
import static org.awaitility.Awaitility.await; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import org.junit.Test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.xml.stream.*; | |
import javax.xml.stream.events.*; | |
import com.fasterxml.aalto.*; | |
import com.fasterxml.aalto.stax.*; | |
import io.vertx.core.buffer.*; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void processMessages(ReadStream<Buffer> f) { | |
AsyncXMLParser parser = new AsyncXMLParser(); | |
f.toObservable() | |
.map(buf -> (io.vertx.core.buffer.Buffer)buf.getDelegate()) | |
.flatMap(parser::feed) | |
.doOnNext(element -> { | |
switch(element.getType()) { | |
case XMLEvent.START_DOCUMENT: | |
// TODO: Create a new class object here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import javax.xml.parsers.*; | |
import javax.xml.transform.*; | |
import javax.xml.transform.dom.*; | |
import javax.xml.transform.stream.*; | |
import org.w3c.dom.*; | |
import io.vertx.core.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************** | |
* LICENSE | |
* -------- | |
* https://github.com/georocket/georocket#license | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
**********************************************/ | |
package xml; |