Ejemplo n.º 1
0
 private static String getColocate(BOperator bop) {
   JSONObject placement = JOperatorConfig.getJSONItem(bop.json(), JOperatorConfig.PLACEMENT);
   if (placement == null) return null;
   Object ido = placement.get(JOperator.PLACEMENT_EXPLICIT_COLOCATE_ID);
   if (ido == null) return null;
   return ido.toString();
 }
Ejemplo n.º 2
0
  private static Set<String> getResourceTags(BOperator bop) {
    JSONObject placement = JOperatorConfig.getJSONItem(bop.json(), JOperatorConfig.PLACEMENT);
    if (placement == null) return null;
    JSONArray jat = (JSONArray) placement.get(JOperator.PLACEMENT_RESOURCE_TAGS);
    if (jat == null) return null;

    Set<String> tags = new HashSet<>();

    for (Object rt : jat) tags.add(rt.toString());

    return tags;
  }