com.effectiveosgi.rt.config.impl.yaml.YamlConfigReader Maven / Gradle / Ivy
The newest version!
package com.effectiveosgi.rt.config.impl.yaml;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.yaml.snakeyaml.Yaml;
import com.effectiveosgi.lib.functional.Arrows;
import com.effectiveosgi.lib.functional.MapEntry;
import com.effectiveosgi.rt.config.ConfigFileReader;
import com.effectiveosgi.rt.config.ParsedRecord;
import com.effectiveosgi.rt.config.RecordIdentity;
public class YamlConfigReader implements ConfigFileReader {
public static final String PATTERN = ".*\\.yaml";
@Override
public Stream load(File artifact) throws IOException {
FileInputStream stream = new FileInputStream(artifact);
Yaml yaml = new Yaml();
Iterable