class AuditEvent {

    @NonNull
    public String toString() {
        String node = formIndex == null || formIndex.getReference() == null ? "" : getXPathPath(formIndex);

        String event;
        if (isTrackingLocationsEnabled && isTrackingChangesEnabled) {
            event = String.format("%s,%s,%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy, oldValue, newValue);
        } else if (isTrackingLocationsEnabled) {
            event = String.format("%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy);
        } else if (isTrackingChangesEnabled) {
            event = String.format("%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", oldValue, newValue);
        } else {
            event = String.format("%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "");
        }

        return event;
    }

    public  AuditEvent(long start, AuditEventType auditEventType);
    public  AuditEvent(long start, AuditEventType auditEventType,  boolean isTrackingLocationsEnabled, boolean isTrackingChangesEnabled);
    public  AuditEvent(long start, AuditEventType auditEventType, boolean isTrackingLocationsEnabled,
                      boolean isTrackingChangesEnabled, FormIndex formIndex, String oldValue);

}