Package net.sourceforge.yamlbeans

Examples of net.sourceforge.yamlbeans.YamlReader


    }

    @Override
    public void execute() {
      String response = admin.listVersions();
      YamlReader yaml = new YamlReader(new StringReader(response));
      try {
        Object obj = yaml.read();
        if (obj != null) {
          @SuppressWarnings("unchecked")
          Map<String, ArrayList<String>> responseMap = (Map<String, ArrayList<String>>) obj;
          if (!responseMap.isEmpty()) {
            System.out.println(response);
View Full Code Here


      int nextSleep = 1000;
      int maxSleep = 6000;
      try {
        while (!done && retries < 20) {
          Map<Object, Object> yaml = (Map<Object, Object>)
              new YamlReader(admin.debugVersionState()).read();
          String message = (String) yaml.get("message");
          System.out.println(message);
          String state = (String) yaml.get("state");
          done = !state.equals("PENDING");
          if (!done) {
View Full Code Here

    }
    return null;
  }

  public static QueueXml parse(Reader yaml) {
    YamlReader reader = new YamlReader(yaml);
    reader.getConfig().setPropertyElementType(QueueYaml.class,
                                              "queue",
                                              QueueYaml.Entry.class);

    reader.getConfig().setPropertyElementType(QueueYaml.Entry.class,
                                              "acl",
                                              QueueYaml.AclEntry.class);
    try {
      QueueYaml queueYaml = reader.read(QueueYaml.class);
      if (queueYaml == null) {
        throw new AppEngineConfigException("Empty queue configuration.");
      }
      return queueYaml.toXml();
    } catch (YamlException ex) {
View Full Code Here

    }
    return null;
  }

  public static CronXml parse(Reader yaml) {
    YamlReader reader = new YamlReader(yaml);
    reader.getConfig().setPropertyElementType(CronYaml.class,
                                              "cron",
                                              CronXml.Entry.class);
    try {
      CronYaml cronYaml = reader.read(CronYaml.class);
      if (cronYaml == null) {
        throw new AppEngineConfigException("Empty cron configuration.");
      }
      return cronYaml.toXml();
    } catch (YamlException ex) {
View Full Code Here

    }
    xml.endElement("web-app");
  }

  public static AppYaml parse(Reader reader) {
    YamlReader yaml = new YamlReader(reader);
    prepareParser(yaml.getConfig());
    try {
      AppYaml appYaml = yaml.read(AppYaml.class);
      if (appYaml == null) {
        throw new YamlException("Unable to parse yaml file");
      }
      return appYaml.applyPlugins();
    } catch (YamlException e) {
View Full Code Here

@IsoInformation(lastChangedBy = "$LastChangedBy: mc_new $", revision = "$LastChangedRevision: 145 $", source = "$URL: svn://svn.code.sf.net/p/isolation/code/Current/Source/Tags/dev_20100521/IsolationBean_Yaml/src/net/sf/isolation/bean/impl/yaml/yamlbeans/IsoBeanTextSerializerYamlImpl.java $", lastChangedDate = "$LastChangedDate: 2009-12-16 17:00:48 -0600 (Wed, 16 Dec 2009) $")
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

@IsoInformation(lastChangedBy = "$LastChangedBy: mc_new $", revision = "$LastChangedRevision: 145 $", source = "$URL: svn://svn.code.sf.net/p/isolation/code/Current/Source/Tags/dev_20100522/IsolationBean_Yaml/src/net/sf/isolation/bean/impl/yaml/yamlbeans/IsoBeanTextSerializerYamlImpl.java $", lastChangedDate = "$LastChangedDate: 2009-12-16 17:00:48 -0600 (Wed, 16 Dec 2009) $")
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

TOP

Related Classes of net.sourceforge.yamlbeans.YamlReader

Copyright © 2018 www.massapicom. 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.