示例#1
0
  public Map<String, String> getProperties() {
    final Map<String, String> props = new HashMap<String, String>();
    for (final String k : getTextPropertyNames()) {
      final String value = getProperty(k);
      if (k == null || value == null) continue;
      final String key = k.toLowerCase();
      props.put(key, value);
    }

    final String cats = getCategoriesAsString();
    if (cats != null && cats.length() > 0) {
      props.put("categories", cats);
    }

    final Integer nodeId = getNodeId();
    if (nodeId != null) {
      props.put("nodeid", nodeId.toString());
    }

    final Integer severity = getSeverity();
    if (severity != null) {
      props.put("severity", severity.toString());
    }

    final Integer unackedCount = getUnackedCount();
    if (unackedCount != null) {
      props.put("unackedcount", unackedCount.toString());
    }

    final Coordinates coordinates = getCoordinates();
    if (coordinates != null) {
      props.put("coordinates", coordinates.toString());
    }

    return props;
  }
示例#2
0
 public static LatLng coordinatesToLatLng(final Coordinates coordinates) {
   return new LatLng(coordinates.getLatitudeAsDouble(), coordinates.getLongitudeAsDouble());
 }