Examples of YamlReader


Examples of com.esotericsoftware.yamlbeans.YamlReader

  }

  protected TargetInfos getTokensFromFile() {
    final File tokensFile = getTokensFile();
    try {
      YamlReader reader = new YamlReader(new FileReader(tokensFile));
      return reader.read(TargetInfos.class);
    } catch (FileNotFoundException fnfe) {
      return new TargetInfos();
    } catch (IOException e) {
      throw new RuntimeException("An error occurred reading the tokens file at " +
          tokensFile.getPath() + ":" + e.getMessage(), e);
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

  private static <CF extends AbstractYamlConfFile> CF readConf(BRJSNode node, File confFile, Class<CF> confClass, String defaultFileCharacterEncoding) throws ConfigException
  {
    CF conf;
   
    try {
      YamlReader reader = null;
     
      try(Reader fileReader = new UnicodeReader(confFile, defaultFileCharacterEncoding)) {
        if(!fileReader.ready()) {
          return newConf(node, confClass);
        }
       
        reader = new YamlReader(fileReader);
        conf = reader.read(confClass);
        conf.initialize(node);
      }
      finally {
        if(reader != null) {
          reader.close();
        }
      }
    }
    catch(YamlReaderException e) {
      throw new ConfigException("Parse error while reading\n '" + confFile.getPath() + "':\n\n" +
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

    return !requestedFile.getName().contains("*");
  }

  private static Map<String, Object> getMapFromYamlConfig(File jsTestDriverConf) throws FileNotFoundException, YamlException, IOException
  {
    YamlReader reader = null;
    try {
      reader = new YamlReader(new FileReader(jsTestDriverConf));
      @SuppressWarnings("unchecked")
      Map<String, Object> configMap = (Map<String, Object>)reader.read();
      return configMap;
    }
    finally
    {
      if (reader != null)
      {
        reader.close();
      }
    }
  }
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

  private Map<String, Map<String, String>> browserPaths;
  private int portNumber;
  private String jsTestDriverJar;
 
  public static TestRunnerConfiguration getConfiguration(File configFile, List<String> browserNames) throws FileNotFoundException, YamlException, IOException {
    YamlReader reader = null;
    TestRunnerConfiguration configuration = null;
    try {
      reader = new YamlReader(new FileReader(configFile));
      configuration = reader.read(TestRunnerConfiguration.class);
    }
    finally
    {
      if (reader != null)
      {
        reader.close();
      }
    }
   
    configuration.setRelativeDir(configFile.getParentFile());
    configuration.setOperatingSystem(CutlassConfig.OS);
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

@IsoInformation(lastChangedBy = "$LastChangedBy: mc_new $", revision = "$LastChangedRevision: 248 $", source = "$URL: svn://svn.code.sf.net/p/isolation/code/Current/Source/Tags/dev_20101027/IsolationBean_Yaml/src/net/sf/isolation/bean/impl/yaml/yamlbeans/IsoBeanTextSerializerYamlImpl.java $", lastChangedDate = "$LastChangedDate: 2010-08-24 17:18:12 -0500 (Tue, 24 Aug 2010) $")
public class IsoBeanTextSerializerYamlImpl implements IsoBeanTextSerializer {

  public Object deserialize(String serialization, Class<?> spectedClass) {
    try {
      return new YamlReader(serialization).read();
    } catch (YamlException e) {
      throw new IllegalStateException();
    }
  }
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

       readYaml();
    }

    private static void readYaml() throws FileNotFoundException, YamlException {

        YamlReader yamlReader =
                new YamlReader(new FileReader("C:\\Users\\usta\\Dropbox\\AsciidocFX\\conf\\recentFiles.yml"));
        yamlReader.getConfig().setClassTag("RecentFiles", RecentFiles.class);
        RecentFiles readed=yamlReader.read(RecentFiles.class);
        readed=readed;
    }
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

        });
    }

    private void loadConfigurations() {
        try {
            YamlReader yamlReader =
                    new YamlReader(new FileReader(configPath.resolve("config.yml").toFile()));
            yamlReader.getConfig().setClassTag("Config", Config.class);
            config = yamlReader.read(Config.class);

        } catch (YamlException | FileNotFoundException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

    }

    private void loadRecentFileList() {

        try {
            YamlReader yamlReader =
                    new YamlReader(new FileReader(configPath.resolve("recentFiles.yml").toFile()));
            yamlReader.getConfig().setClassTag("RecentFiles", RecentFiles.class);
            RecentFiles readed = yamlReader.read(RecentFiles.class);

            readed.getFiles()
                    .stream()
                    .map(path -> Paths.get(path))
                    .forEach(recentFiles::add);
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlReader

public class IsoBeanTextSerializerYamlImpl implements IsoBeanTextSerializer {

  @SuppressWarnings("unchecked")
  public <T> T deserialize(Class<T> spectedClass, String serialization) {
    try {
      return (T) new YamlReader(serialization).read();
    } catch (YamlException e) {
      throw new IllegalStateException();
    }
  }
View Full Code Here

Examples of net.sourceforge.yamlbeans.YamlReader

    }
    return null;
  }

  public static BackendsXml parse(Reader yaml) {
    YamlReader reader = new YamlReader(yaml);
    reader.getConfig().setPropertyElementType(BackendsYaml.class,
                                              "backends",
                                              BackendsYaml.Entry.class);

    try {
      BackendsYaml backendsYaml = reader.read(BackendsYaml.class);
      if (backendsYaml == null) {
        throw new AppEngineConfigException("Empty backends configuration.");
      }
      return backendsYaml.toXml();
    } catch (YamlException ex) {
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.