Package com.dubture.getcomposer.core.repositories

Examples of com.dubture.getcomposer.core.repositories.Repository.fromJson()


    if (obj instanceof JSONArray) {
      for (Object repo : (JSONArray) obj) {
        if (repo instanceof JSONObject && ((JSONObject)repo).containsKey("type")) {
          String type = (String)((JSONObject)repo).get("type");
          Repository r = RepositoryFactory.create(type);
          r.fromJson(repo);
          add(r);
        }
      }
    }
  }
View Full Code Here


    if (obj instanceof LinkedList) {
      for (Object repo : (LinkedList) obj) {
        if (repo instanceof LinkedHashMap && ((LinkedHashMap)repo).containsKey("type")) {
          String type = (String)((LinkedHashMap)repo).get("type");
          Repository r = RepositoryFactory.create(type);
          r.fromJson(repo);
          add(r);
        }
      }
    }
  }
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.