INNER CODE UNIT · Java
all
SeaseLtd/rated-ranking-evaluator · rre-core/src/main/java/io/sease/rre/core/Engine.java:497
private Stream<JsonNode> all(final JsonNode source, final String name) {
return ofNullable(source.get(name))
.map(node -> StreamSupport.stream(node.spliterator(), false))
.orElseGet(() -> Stream.of(source));
}
/**
* Prepares the search platform with the given index name and dataset.
*
* @param collection the index name.
* @param dataToBeIndexed the dataset.
* @throws SearchPlatformException if problems occur loading data to the
* search platform.
*/
private void prepareData(final String collection, final File dataToBeIndexed) throws SearchPlatformException {
if (dataToBeIndexed != null) {
LOGGER.info("Preparing dataToBeIndexed for " + collection + " from " + dataToBeIndexed.getAbsolutePath());
} else {