public static Set<AtlasResourceTypes> getAtlasResourceType(String contextPath) {
        Set<AtlasResourceTypes> resourceTypes = new HashSet<>();
        if (isDebugEnabled) {
            LOG.debug("==> getAtlasResourceType  for {}", contextPath);
        }
        String api = getApi(contextPath);
        if (api.startsWith("types")) {
            resourceTypes.add(AtlasResourceTypes.TYPE);
        } else if (api.startsWith("admin") && (contextPath.contains("/session") || contextPath.contains("/version"))) {
            resourceTypes.add(AtlasResourceTypes.UNKNOWN);
        } else if ((api.startsWith("discovery") && contextPath.contains("/gremlin")) || api.startsWith("admin")
                || api.startsWith("graph")) {
            resourceTypes.add(AtlasResourceTypes.OPERATION);
        } else if (api.startsWith("entities") || api.startsWith("lineage") ||
                api.startsWith("discovery") || api.startsWith("entity") || api.startsWith("search")) {
            resourceTypes.add(AtlasResourceTypes.ENTITY);
        } else if (api.startsWith("taxonomies")) {
            resourceTypes.add(AtlasResourceTypes.TAXONOMY);
            // taxonomies are modeled as entities
            resourceTypes.add(AtlasResourceTypes.ENTITY);
            if (contextPath.contains("/terms")) {
                resourceTypes.add(AtlasResourceTypes.TERM);
            }
        } else if (api.startsWith("relationship")) {
            resourceTypes.add(AtlasResourceTypes.RELATIONSHIP);
        } else {
            LOG.error("Unable to find Atlas Resource corresponding to : {}\nSetting {}"
                    , api, AtlasResourceTypes.UNKNOWN.name());
            resourceTypes.add(AtlasResourceTypes.UNKNOWN);
        }

        if (isDebugEnabled) {
            LOG.debug("<== Returning AtlasResources {} for api {}", resourceTypes, api);
        }
        return resourceTypes;
    }
public static Set < AtlasResourceTypes > getAtlasResourceType ( String contextPath ) { Set < AtlasResourceTypes > resourceTypes = new HashSet < > ( ) ; if ( isDebugEnabled ) { LOG . debug ( "==> getAtlasResourceType  for {}" , contextPath ) ; } String api = getApi ( contextPath ) ; if ( api . startsWith ( "types" ) ) { resourceTypes . add ( AtlasResourceTypes . TYPE ) ; } else if ( api . startsWith ( "admin" ) && ( contextPath . contains ( "/session" ) || contextPath . contains ( "/version" ) ) ) { resourceTypes . add ( AtlasResourceTypes . UNKNOWN ) ; } else if ( ( api . startsWith ( "discovery" ) && contextPath . contains ( "/gremlin" ) ) || api . startsWith ( "admin" ) || api . startsWith ( "graph" ) ) { resourceTypes . add ( AtlasResourceTypes . OPERATION ) ; } else if ( api . startsWith ( "entities" ) || api . startsWith ( "lineage" ) || api . startsWith ( "discovery" ) || api . startsWith ( "entity" ) || api . startsWith ( "search" ) ) { resourceTypes . add ( AtlasResourceTypes . ENTITY ) ; } else if ( api . startsWith ( "taxonomies" ) ) { resourceTypes . add ( AtlasResourceTypes . TAXONOMY ) ; resourceTypes . add ( AtlasResourceTypes . ENTITY ) ; if ( contextPath . contains ( "/terms" ) ) { resourceTypes . add ( AtlasResourceTypes . TERM ) ; } } else if ( api . startsWith ( "relationship" ) ) { resourceTypes . add ( AtlasResourceTypes . RELATIONSHIP ) ; } else { LOG . error ( "Unable to find Atlas Resource corresponding to : {}\nSetting {}" , api , AtlasResourceTypes . UNKNOWN . name ( ) ) ; resourceTypes . add ( AtlasResourceTypes . UNKNOWN ) ; } if ( isDebugEnabled ) { LOG . debug ( "<== Returning AtlasResources {} for api {}" , resourceTypes , api ) ; } return resourceTypes ; }
@param contextPath
@return set of AtlasResourceTypes types api mapped with AtlasResourceTypes.TYPE eg :- /api/atlas/types/*

gremlin discovery,admin,graph apis are mapped with AtlasResourceTypes.OPERATION eg :-/api/atlas/admin/*
/api/atlas/discovery/search/gremlin /api/atlas/graph/*

entities,lineage and discovery apis are mapped with AtlasResourceTypes.ENTITY eg :- /api/atlas/lineage/hive/table/*
/api/atlas/entities/{guid}* /api/atlas/discovery/*

taxonomy API are also mapped to AtlasResourceTypes.TAXONOMY & AtlasResourceTypes.ENTITY and its terms APIs have
added AtlasResourceTypes.TERM associations.

unprotected types are mapped with AtlasResourceTypes.UNKNOWN, access to these are allowed.