package com.conveyal.taui.models;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

/**
 * Created by matthewc on 2/9/16.
 */
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include= JsonTypeInfo.As.PROPERTY, property="type")
@JsonSubTypes({
        @JsonSubTypes.Type(name = "add-trip-pattern", value = AddTripPattern.class),
        @JsonSubTypes.Type(name = "set-trip-phasing", value = SetPhasing.class),
        @JsonSubTypes.Type(name = "remove-trips", value = RemoveTrips.class),
        @JsonSubTypes.Type(name = "remove-stops", value = RemoveStops.class),
        @JsonSubTypes.Type(name = "adjust-speed", value = AdjustSpeed.class),
        @JsonSubTypes.Type(name = "adjust-dwell-time", value = AdjustDwellTime.class),
        @JsonSubTypes.Type(name = "convert-to-frequency", value = ConvertToFrequency.class)
})
public abstract class Modification extends Model {
    /** the type of this modification, see JsonSubTypes annotation above */
    public abstract String getType ();
}

@@ -1034,11 +1034,226 @@
 Type ();
+%0A%0A    /** is this modification shown on the map in the UI at the moment? */%0A    public boolean showOnMap = true;%0A%0A    /** is this modification expanded in the UI at the moment? */%0A    public boolean expanded = true;
 %0A%7D%0A

store UI state in modification class.gp