package mil.nga.giat.mage.sdk.datastore.observation;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

import mil.nga.giat.mage.sdk.datastore.Property;

@DatabaseTable(tableName = "observation_properties")
public class ObservationProperty extends Property {

	@DatabaseField(foreign = true, uniqueCombo = true)
	private ObservationForm observationForm;

	public ObservationProperty() {
		// ORMLite needs a no-arg constructor
	}

	public ObservationProperty(String pKey, Serializable pValue) {
		super(pKey, pValue);
	}

	public ObservationForm getObservation() {
		return observationForm;
	}

	public void setObservationForm(ObservationForm observationForm) {
		this.observationForm = observationForm;
	}

}

@@ -149,28 +149,102 @@
 ort 
-java.io.Serializable
+org.apache.commons.lang3.StringUtils;%0A%0Aimport java.io.Serializable;%0Aimport java.util.ArrayList
 ;%0A%0Ai
@@ -846,10 +846,285 @@
 rm;%0A%09%7D%0A%0A
+%09public boolean isEmpty() %7B%0A%09%09Serializable value = getValue();%0A%09%09if (value instanceof String) %7B%0A%09%09%09return StringUtils.isBlank(value.toString());%0A%09%09%7D else if (value instanceof ArrayList) %7B%0A%09%09%09return ((ArrayList) value).size() == 0;%0A%09%09%7D else %7B%0A%09%09%09return value != null;%0A%09%09%7D%0A%09%7D%0A%0A
 %7D%0A

Add empty check for observation property