Search in sources :

Example 1 with TerroristInfo

use of com.qcloud.cos.model.ciModel.auditing.TerroristInfo in project cos-java-sdk-v5 by tencentyun.

the class AuditingResultUtil method getAuditingInfoList.

public static List<AuditingInfo> getAuditingInfoList(AuditingJobsDetail jobsDetail) {
    List<AuditingInfo> list = new ArrayList<>();
    List<SnapshotInfo> snapshotList = jobsDetail.getSnapshotList();
    for (SnapshotInfo snapshotInfo : snapshotList) {
        AdsInfo adsInfo = snapshotInfo.getAdsInfo();
        PoliticsInfo politicsInfo = snapshotInfo.getPoliticsInfo();
        PornInfo pornInfo = snapshotInfo.getPornInfo();
        TerroristInfo terroristInfo = snapshotInfo.getTerroristInfo();
        addAuditingInfoList(list, DetectType.Ads, adsInfo);
        addAuditingInfoList(list, DetectType.Politics, politicsInfo);
        addAuditingInfoList(list, DetectType.Porn, pornInfo);
        addAuditingInfoList(list, DetectType.Terrorism, terroristInfo);
    }
    List<SectionInfo> sectionList = jobsDetail.getSectionList();
    for (SectionInfo sectionInfo : sectionList) {
        AdsInfo adsInfo = sectionInfo.getAdsInfo();
        PoliticsInfo politicsInfo = sectionInfo.getPoliticsInfo();
        PornInfo pornInfo = sectionInfo.getPornInfo();
        TerroristInfo terroristInfo = sectionInfo.getTerroristInfo();
        IllegalInfo illegalInfo = sectionInfo.getIllegalInfo();
        AbuseInfo abuseInfo = sectionInfo.getAbuseInfo();
        addAuditingInfoList(list, DetectType.Ads, adsInfo);
        addAuditingInfoList(list, DetectType.Politics, politicsInfo);
        addAuditingInfoList(list, DetectType.Porn, pornInfo);
        addAuditingInfoList(list, DetectType.Terrorism, terroristInfo);
        addAuditingInfoList(list, DetectType.Illegal, illegalInfo);
        addAuditingInfoList(list, DetectType.Abuse, abuseInfo);
    }
    return list;
}
Also used : IllegalInfo(com.qcloud.cos.model.ciModel.auditing.IllegalInfo) PornInfo(com.qcloud.cos.model.ciModel.auditing.PornInfo) TerroristInfo(com.qcloud.cos.model.ciModel.auditing.TerroristInfo) ArrayList(java.util.ArrayList) AuditingInfo(com.qcloud.cos.model.ciModel.auditing.AuditingInfo) AdsInfo(com.qcloud.cos.model.ciModel.auditing.AdsInfo) AbuseInfo(com.qcloud.cos.model.ciModel.auditing.AbuseInfo) SnapshotInfo(com.qcloud.cos.model.ciModel.auditing.SnapshotInfo) PoliticsInfo(com.qcloud.cos.model.ciModel.auditing.PoliticsInfo) SectionInfo(com.qcloud.cos.model.ciModel.auditing.SectionInfo)

Example 2 with TerroristInfo

use of com.qcloud.cos.model.ciModel.auditing.TerroristInfo in project cos-java-sdk-v5 by tencentyun.

the class AuditingResultUtil method parsingAuditingResult.

private static void parsingAuditingResult(AuditingJobsDetail jobsDetail, AuditingResult result) {
    AdsInfo adsInfo = jobsDetail.getAdsInfo();
    addHitMapAndUpdateHitFlag("Ads", adsInfo);
    PoliticsInfo politicsInfo = jobsDetail.getPoliticsInfo();
    addHitMapAndUpdateHitFlag("Politics", politicsInfo);
    PornInfo pornInfo = jobsDetail.getPornInfo();
    addHitMapAndUpdateHitFlag("Porn", pornInfo);
    TerroristInfo terroristInfo = jobsDetail.getTerroristInfo();
    addHitMapAndUpdateHitFlag("Terrorism", terroristInfo);
    AbuseInfo abuseInfo = jobsDetail.getAbuseInfo();
    addHitMapAndUpdateHitFlag("Abuse", abuseInfo);
    IllegalInfo illegalInfo = jobsDetail.getIllegalInfo();
    addHitMapAndUpdateHitFlag("Illegal", illegalInfo);
    List<SectionInfo> sectionList = jobsDetail.getSectionList();
    List<SnapshotInfo> snapshotList = jobsDetail.getSnapshotList();
    for (SectionInfo sectionInfo : sectionList) {
        addHitMapAndUpdateHitFlag("Ads", sectionInfo.getAdsInfo());
        addHitMapAndUpdateHitFlag("Politics", sectionInfo.getPoliticsInfo());
        addHitMapAndUpdateHitFlag("Porn", sectionInfo.getPornInfo());
        addHitMapAndUpdateHitFlag("Terrorism", sectionInfo.getTerroristInfo());
        addHitMapAndUpdateHitFlag("Abuse", sectionInfo.getAbuseInfo());
        addHitMapAndUpdateHitFlag("Illegal", sectionInfo.getIllegalInfo());
    }
    for (SnapshotInfo snapshotInfo : snapshotList) {
        addHitMapAndUpdateHitFlag("Ads", snapshotInfo.getAdsInfo());
        addHitMapAndUpdateHitFlag("Politics", snapshotInfo.getPoliticsInfo());
        addHitMapAndUpdateHitFlag("Porn", snapshotInfo.getPornInfo());
        addHitMapAndUpdateHitFlag("Terrorism", snapshotInfo.getTerroristInfo());
    }
}
Also used : IllegalInfo(com.qcloud.cos.model.ciModel.auditing.IllegalInfo) PornInfo(com.qcloud.cos.model.ciModel.auditing.PornInfo) SnapshotInfo(com.qcloud.cos.model.ciModel.auditing.SnapshotInfo) PoliticsInfo(com.qcloud.cos.model.ciModel.auditing.PoliticsInfo) TerroristInfo(com.qcloud.cos.model.ciModel.auditing.TerroristInfo) SectionInfo(com.qcloud.cos.model.ciModel.auditing.SectionInfo) AdsInfo(com.qcloud.cos.model.ciModel.auditing.AdsInfo) AbuseInfo(com.qcloud.cos.model.ciModel.auditing.AbuseInfo)

Aggregations

AbuseInfo (com.qcloud.cos.model.ciModel.auditing.AbuseInfo)2 AdsInfo (com.qcloud.cos.model.ciModel.auditing.AdsInfo)2 IllegalInfo (com.qcloud.cos.model.ciModel.auditing.IllegalInfo)2 PoliticsInfo (com.qcloud.cos.model.ciModel.auditing.PoliticsInfo)2 PornInfo (com.qcloud.cos.model.ciModel.auditing.PornInfo)2 SectionInfo (com.qcloud.cos.model.ciModel.auditing.SectionInfo)2 SnapshotInfo (com.qcloud.cos.model.ciModel.auditing.SnapshotInfo)2 TerroristInfo (com.qcloud.cos.model.ciModel.auditing.TerroristInfo)2 AuditingInfo (com.qcloud.cos.model.ciModel.auditing.AuditingInfo)1 ArrayList (java.util.ArrayList)1