protected EntityResult updateEntities(ArrayNode entities) throws AtlasServiceException { LOG.debug("Updating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.UPDATE_ENTITY, entities.toString()); EntityResult results = extractEntityResult(response); LOG.debug("Update entities returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> updateType(String typeAsJson) throws AtlasServiceException { LOG.debug("Updating type definition: {}", typeAsJson); ObjectNode response = callAPIWithBody(API_V1.UPDATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, ObjectNode>() { @Override String extractElement(ObjectNode element) { return element.get(AtlasClient.NAME).asText(); } }); LOG.debug("Update type definition returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> updateType(String typeAsJson) throws AtlasServiceException { LOG.debug("Updating type definition: {}", typeAsJson); ObjectNode response = callAPIWithBody(API_V1.UPDATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, ObjectNode>() { @Override String extractElement(ObjectNode element) { return element.get(AtlasClient.NAME).asText(); } }); LOG.debug("Update type definition returned results: {}", results); return results; }
protected EntityResult updateEntities(ArrayNode entities) throws AtlasServiceException { LOG.debug("Updating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.UPDATE_ENTITY, entities.toString()); EntityResult results = extractEntityResult(response); LOG.debug("Update entities returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> createType(String typeAsJson) throws AtlasServiceException { LOG.debug("Creating type definition: {}", typeAsJson); ObjectNode response = callAPIWithBody(API_V1.CREATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, ObjectNode>() { @Override String extractElement(ObjectNode element) { return element.get(AtlasClient.NAME).asText(); } }); LOG.debug("Create type definition returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> createType(String typeAsJson) throws AtlasServiceException { LOG.debug("Creating type definition: {}", typeAsJson); JSONObject response = callAPIWithBody(API.CREATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, JSONObject>() { @Override String extractElement(JSONObject element) throws JSONException { return element.getString(AtlasClient.NAME); } }); LOG.debug("Create type definition returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> createType(String typeAsJson) throws AtlasServiceException { LOG.debug("Creating type definition: {}", typeAsJson); ObjectNode response = callAPIWithBody(API_V1.CREATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, ObjectNode>() { @Override String extractElement(ObjectNode element) { return element.get(AtlasClient.NAME).asText(); } }); LOG.debug("Create type definition returned results: {}", results); return results; }
/** * Register the given type(meta model) * @param typeAsJson type definition a jaon * @return result json object * @throws AtlasServiceException */ public List<String> updateType(String typeAsJson) throws AtlasServiceException { LOG.debug("Updating type definition: {}", typeAsJson); JSONObject response = callAPIWithBody(API.UPDATE_TYPE, typeAsJson); List<String> results = extractResults(response, AtlasClient.TYPES, new ExtractOperation<String, JSONObject>() { @Override String extractElement(JSONObject element) throws JSONException { return element.getString(AtlasClient.NAME); } }); LOG.debug("Update type definition returned results: {}", results); return results; }
protected EntityResult updateEntities(JSONArray entities) throws AtlasServiceException { LOG.debug("Updating entities: {}", entities); JSONObject response = callAPIWithBody(API.UPDATE_ENTITY, entities.toString()); EntityResult results = extractEntityResult(response); LOG.debug("Update entities returned results: {}", results); return results; }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(JSONArray entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); JSONObject response = callAPIWithBody(API.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }