Here you can find the source of getSitesFromDb(String replicationSitesInDB)
public static JsonArray getSitesFromDb(String replicationSitesInDB)
//package com.java2s; import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonArrayBuilder; public class Main { /**//from w w w .j ava 2 s .c o m * The reason this in JSON is that it probably makes sense to someday query * RSAL or some other "big data" component live for a list of remotes sites * to which a particular dataset is replicated to. */ public static JsonArray getSitesFromDb(String replicationSitesInDB) { JsonArrayBuilder arraybuilder = Json.createArrayBuilder(); if (replicationSitesInDB == null || replicationSitesInDB.isEmpty()) { return arraybuilder.build(); } // Right now we have all the data right in the database setting but we should probably query RSAL to get the list. String[] sites = replicationSitesInDB.split(","); for (String site : sites) { String[] parts = site.split(":"); arraybuilder.add(Json.createObjectBuilder().add("fqdn", parts[0]).add("name", parts[1]).add("country", parts[2])); } return arraybuilder.build(); } }