All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.enums.BiosignatureEnum Maven / Gradle / Ivy

The newest version!
/*
 *
 *  *********************** 版权声明 ***********************************
 *
 *  版权所有:浙江大华技术股份有限公司
 *  ©CopyRight DahuaTech 2019
 *
 *  *********************************************************************
 *
 */
package com.dahuatech.icc.brm.enums;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum BiosignatureEnum {

    // 生物特征类型,1 普通指纹 2 胁迫指纹 3 人脸图片 4 9241d人脸 5 红外人脸
    COMMON_FINGER(1, "普通指纹"),
    COERCION_FINGER(2, "胁迫指纹"),
    FACE_IMG(3, "人脸图片"),
    NINE_FACE_IMG(4, "9241d人脸"),
    RED_FINGER(5, "红外人脸"),
    FACE_FEATURE(99, "人脸特征值");

    private Integer id;
    private String name;

    //人员基本信息生物特征
    public static List PERSON_BASE_BIOSIGNATURE = Arrays.asList(COMMON_FINGER,COERCION_FINGER,NINE_FACE_IMG,RED_FINGER);
    //人员头像生物特征
    public static List PERSON_FACEIMG_BIOSIGNATURE = Arrays.asList(FACE_IMG);
    //人员全部生物特征
    public static List PERSON_ALL_BIOSIGNATURE = Arrays.asList(COMMON_FINGER,COERCION_FINGER,NINE_FACE_IMG,RED_FINGER,FACE_IMG);

    //所有的生物特征类型
    public static List BIOSIGNATURE_TYPES = getBiosignatureTypes();

    BiosignatureEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static BiosignatureEnum forValue(Integer id) {
        if(null == id){
            return null;
        }
        for (BiosignatureEnum typeEnum : BiosignatureEnum.values()) {
            if (typeEnum.getId().equals(id)) {
                return typeEnum;
            }
        }
        return null;
    }

    public static BiosignatureEnum forValue(String name) {
        if(name  == null || name.length() == 0){
            return null;
        }
        for (BiosignatureEnum typeEnum : BiosignatureEnum.values()) {
            if (typeEnum.getName().equals(name)) {
                return typeEnum;
            }
        }
        return null;
    }

    public static boolean isRightType(Integer id) {
        return null == BiosignatureEnum.forValue(id)? false : true;
    }

    public static List getNames(){
        List types = new ArrayList();
        for (BiosignatureEnum typeEnum : BiosignatureEnum.values()) {
            types.add(typeEnum.getName());
        }
        return types;
    }

    public static List getBiosignatureTypes(){
        List list = new ArrayList();
        for(BiosignatureEnum item : BiosignatureEnum.values()){
            list.add(item.getId());
        }
        return list;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy