package com.libreecm.commonAPI.model.enums;

public enum PropertyType {

    BOOLEAN("boolean"), ID("id"), INTEGER("integer"), DATETIME("datetime"), DECIMAL("decimal"), HTML("html"), STRING(
            "string"), URI("uri");
    private final String value;

    PropertyType(String v) {
        value = v;
    } 

    public String value() {
        return value;
    }

    public static PropertyType fromValue(String v) {
        for (PropertyType c : PropertyType.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}