@Override public boolean hasType(DatasetTypeId datasetTypeId) throws DatasetManagementException { return clientCache.getUnchecked(datasetTypeId.getParent()).getType(datasetTypeId.getEntityName()) != null; }
@Override public DatasetTypeMeta getTypeInfo(DatasetTypeId datasetTypeId) throws DatasetManagementException { return clientCache.getUnchecked(datasetTypeId.getParent()).getType(datasetTypeId.getEntityName()); }
@Override public boolean hasType(DatasetTypeId datasetTypeId) throws DatasetManagementException { return clientCache.getUnchecked(datasetTypeId.getParent()).getType(datasetTypeId.getEntityName()) != null; }
@Override public DatasetTypeMeta getTypeInfo(DatasetTypeId datasetTypeId) throws DatasetManagementException { return clientCache.getUnchecked(datasetTypeId.getParent()).getType(datasetTypeId.getEntityName()); }
/** * Returns details of the specified {@link DatasetTypeId dataset type}. */ @Override public DatasetTypeMeta getType(DatasetTypeId datasetTypeId) throws Exception { ensureNamespaceExists(datasetTypeId.getParent()); DatasetTypeMeta typeMeta = typeManager.getTypeInfo(datasetTypeId); if (typeMeta == null) { throw new DatasetTypeNotFoundException(datasetTypeId); } return typeMeta; }
/** * Returns details of the specified {@link DatasetTypeId dataset type}. */ @Override public DatasetTypeMeta getType(DatasetTypeId datasetTypeId) throws Exception { ensureNamespaceExists(datasetTypeId.getParent()); DatasetTypeMeta typeMeta = typeManager.getTypeInfo(datasetTypeId); if (typeMeta == null) { throw new DatasetTypeNotFoundException(datasetTypeId); } return typeMeta; }
public DatasetTypeMeta getType(DatasetTypeId datasetTypeId) { DatasetModuleMeta moduleName = getModuleByType(datasetTypeId); if (moduleName == null) { return null; } return getTypeMeta(datasetTypeId.getParent(), datasetTypeId.getEntityName(), moduleName); }
public DatasetTypeMeta getType(DatasetTypeId datasetTypeId) { DatasetModuleMeta moduleName = getModuleByType(datasetTypeId); if (moduleName == null) { return null; } return getTypeMeta(datasetTypeId.getParent(), datasetTypeId.getEntityName(), moduleName); }
/** * Checks if a dataset type exists. * * @param type the dataset type to check * @return true if the dataset type exists * @throws IOException if a network error occurred * @throws UnauthenticatedException if the request is not authorized successfully in the gateway server */ public boolean exists(DatasetTypeId type) throws DatasetTypeNotFoundException, IOException, UnauthenticatedException, UnauthorizedException { URL url = config.resolveNamespacedURLV3(type.getParent(), String.format("data/types/%s", type.getType())); HttpResponse response = restClient.execute(HttpMethod.GET, url, config.getAccessToken(), HttpURLConnection.HTTP_NOT_FOUND); return response.getResponseCode() != HttpURLConnection.HTTP_NOT_FOUND; } }
/** * Gets information about a dataset type. * * @param type the dataset type * @return {@link DatasetTypeMeta} of the dataset type * @throws DatasetTypeNotFoundException if the dataset type could not be found * @throws IOException if a network error occurred * @throws UnauthenticatedException if the request is not authorized successfully in the gateway server */ public DatasetTypeMeta get(DatasetTypeId type) throws DatasetTypeNotFoundException, IOException, UnauthenticatedException, UnauthorizedException { URL url = config.resolveNamespacedURLV3(type.getParent(), String.format("data/types/%s", type.getType())); HttpResponse response = restClient.execute(HttpMethod.GET, url, config.getAccessToken(), HttpURLConnection.HTTP_NOT_FOUND); if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) { throw new DatasetTypeNotFoundException(type); } return ObjectResponse.fromJsonBody(response, DatasetTypeMeta.class).getResponseObject(); }
datasetTypeMDS.writeModule(usedType.getParent(), usedModule);
datasetTypeMDS.writeModule(usedType.getParent(), usedModule);