private static String getValueAsStringForObservedProperty(
      final AbstractObservation observation, final String definition) {
    final String observedProperty = observation.getObservableProperty().getIdentifier();

    if (observedProperty.equals(definition)) {
      if (observation instanceof NumericObservation) {
        return String.valueOf(((NumericObservation) observation).getValue());
      } else if (observation instanceof BooleanObservation) {
        return String.valueOf(((BooleanObservation) observation).getValue());
      } else if (observation instanceof CategoryObservation) {
        return String.valueOf(((CategoryObservation) observation).getValue());
      } else if (observation instanceof CountObservation) {
        return String.valueOf(((CountObservation) observation).getValue());
      } else if (observation instanceof TextObservation) {
        return String.valueOf(((TextObservation) observation).getValue());
      } else if (observation instanceof GeometryObservation) {
        final WKTWriter writer = new WKTWriter();
        return writer.write(((GeometryObservation) observation).getValue());
      } else if (observation instanceof BlobObservation) {
        return String.valueOf(((BlobObservation) observation).getValue());
      }
      // // TODO multiple values?
      // Set<BooleanValue> booleanValues = observation.getBooleanValue();
      // if (booleanValues != null && !booleanValues.isEmpty()) {
      // return
      // String.valueOf(booleanValues.iterator().next().getValue());
      // }
      //
      // Set<CategoryValue> categoryValues =
      // observation.getCategoryValue();
      // if (categoryValues != null && !categoryValues.isEmpty()) {
      // return categoryValues.iterator().next().getValue();
      // }
      //
      // Set<CountValue> countValues = observation.getCountValue();
      // if (countValues != null && !countValues.isEmpty()) {
      // return String.valueOf(countValues.iterator().next().getValue());
      // }
      //
      // Set<NumericValue> numericValues = observation.getNumericValues();
      // if (numericValues != null && !numericValues.isEmpty()) {
      // return
      // String.valueOf(numericValues.iterator().next().getValue());
      // }
      //
      // //TODO geometry values;
      //
      // Set<TextValue> textValues = observation.getTextValues();
      // if (textValues != null && !textValues.isEmpty()) {
      // StringBuilder builder = new StringBuilder();
      // for (TextValue textValue : textValues) {
      // builder.append(textValue.getValue());
      // }
      // return builder.toString();
      // }
    }
    return Configurator.getInstance()
        .getProfileHandler()
        .getActiveProfile()
        .getResponseNoDataPlaceholder();
  }