public boolean typeWithGuidExists(String guid) { try { callAPI(API_V2.GET_TYPEDEF_BY_GUID, String.class, null, guid); } catch (AtlasServiceException e) { return false; } return true; }
public boolean typeWithNameExists(String name) { try { callAPI(API_V2.GET_TYPEDEF_BY_NAME, String.class, null, name); } catch (AtlasServiceException e) { return false; } return true; }
public boolean typeWithNameExists(String name) { try { callAPI(API_V2.GET_TYPEDEF_BY_NAME, String.class, null, name); } catch (AtlasServiceException e) { return false; } return true; }
/** * Bulk create APIs for all atlas type definitions, only new definitions will be created. * Any changes to the existing definitions will be discarded * * @param typesDef A composite wrapper object with corresponding lists of the type definition * @return A composite wrapper object with lists of type definitions that were successfully * created */ public AtlasTypesDef createAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasServiceException { return callAPI(API_V2.CREATE_ALL_TYPE_DEFS, AtlasTypesDef.class, AtlasType.toJson(typesDef)); }
public EntityMutationResponse updateEntityByAttribute(String type, Map<String, String> attributes, AtlasEntityWithExtInfo entityInfo) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = attributesToQueryParams(attributes); return callAPI(API_V2.UPDATE_ENTITY_BY_ATTRIBUTE, EntityMutationResponse.class, entityInfo, queryParams, type); }
public AtlasSearchResult fullTextSearch(final String query) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.add(QUERY, query); return callAPI(API_V2.FULL_TEXT_SEARCH, AtlasSearchResult.class, queryParams); }
public AtlasSearchResult basicSearch(final String typeName, final String classification, final String query, final boolean excludeDeletedEntities, final int limit, final int offset) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.add("typeName", typeName); queryParams.add("classification", classification); queryParams.add(QUERY, query); queryParams.add("excludeDeletedEntities", String.valueOf(excludeDeletedEntities)); queryParams.add(LIMIT, String.valueOf(limit)); queryParams.add(OFFSET, String.valueOf(offset)); return callAPI(API_V2.BASIC_SEARCH, AtlasSearchResult.class, queryParams); }
/** * Bulk delete API for all types * * @param typesDef A composite object that captures all types to be deleted */ public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasServiceException { callAPI(API_V2.DELETE_ALL_TYPE_DEFS, (Class<?>)null, AtlasType.toJson(typesDef)); }
public AtlasSearchResult dslSearch(final String query) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.add(QUERY, query); return callAPI(API_V2.DSL_SEARCH, AtlasSearchResult.class, queryParams); }
public AtlasSearchResult fullTextSearchWithParams(final String query, final int limit, final int offset) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.add(QUERY, query); queryParams.add(LIMIT, String.valueOf(limit)); queryParams.add(OFFSET, String.valueOf(offset)); return callAPI(API_V2.FULL_TEXT_SEARCH, AtlasSearchResult.class, queryParams); }
/** * Bulk create APIs for all atlas type definitions, only new definitions will be created. * Any changes to the existing definitions will be discarded * * @param typesDef A composite wrapper object with corresponding lists of the type definition * @return A composite wrapper object with lists of type definitions that were successfully * created */ public AtlasTypesDef createAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasServiceException { return callAPI(CREATE_ALL_TYPE_DEFS, AtlasTypesDef.class, AtlasType.toJson(typesDef)); }
public EntityMutationResponse updateEntityByAttribute(String type, Map<String, String> attributes, AtlasEntityWithExtInfo entityInfo) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = attributesToQueryParams(attributes); return callAPI(UPDATE_ENTITY_BY_ATTRIBUTE, EntityMutationResponse.class, entityInfo, queryParams, type); }
public AtlasLineageInfo getLineageInfo(final String guid, final LineageDirection direction, final int depth) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.add("direction", direction.toString()); queryParams.add("depth", String.valueOf(depth)); return callAPI(API_V2.LINEAGE_INFO, AtlasLineageInfo.class, queryParams, guid); }
private <T> T getTypeDefByGuid(final String guid, Class<T> typeDefClass) throws AtlasServiceException { String atlasPath = getAtlasPath(typeDefClass); API api = new API(String.format(GET_BY_GUID_TEMPLATE, atlasPath, guid), HttpMethod.GET, Response.Status.OK); return callAPI(api, typeDefClass, null); }
private <T> T getTypeDefByName(final String name, Class<T> typeDefClass) throws AtlasServiceException { String atlasPath = getAtlasPath(typeDefClass); APIInfo apiInfo = new APIInfo(String.format(GET_BY_NAME_TEMPLATE, atlasPath, name), HttpMethod.GET, Response.Status.OK); return callAPI(apiInfo, typeDefClass, null); }
private <T> T getTypeDefByGuid(final String guid, Class<T> typeDefClass) throws AtlasServiceException { String atlasPath = getAtlasPath(typeDefClass); APIInfo apiInfo = new APIInfo(String.format(GET_BY_GUID_TEMPLATE, atlasPath, guid), HttpMethod.GET, Response.Status.OK); return callAPI(apiInfo, typeDefClass, null); }
private <T> T getTypeDefByName(final String name, Class<T> typeDefClass) throws AtlasServiceException { String atlasPath = getAtlasPath(typeDefClass); API api = new API(String.format(GET_BY_NAME_TEMPLATE, atlasPath, name), HttpMethod.GET, Response.Status.OK); return callAPI(api, typeDefClass, null); }
private <T> T getTypeDefByName(final String name, Class<T> typeDefClass) throws AtlasServiceException { String atlasPath = getAtlasPath(typeDefClass); API api = new API(String.format(GET_BY_NAME_TEMPLATE, atlasPath, name), HttpMethod.GET, Response.Status.OK); return callAPI(api, typeDefClass, null); }
public AtlasEntitiesWithExtInfo getEntitiesByGuids(List<String> guids) throws AtlasServiceException { MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl(); queryParams.put("guid", guids); return callAPI(API_V2.GET_ENTITIES_BY_GUIDS, AtlasEntitiesWithExtInfo.class, queryParams); }
public void deleteClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { for (AtlasClassification c : classifications) { callAPI(formatPathParameters(API_V2.DELETE_CLASSIFICATION, guid, c.getTypeName()), AtlasClassifications.class, classifications); } }