Search in sources :

Example 1 with DataProfilerService

use of org.irods.jargon.extensions.dataprofiler.DataProfilerService in project metalnx-web by irods-contrib.

the class CollectionServiceImpl method getCollectionDataProfile.

@SuppressWarnings("unchecked")
@Override
public DataProfile<IRODSDomainObject> getCollectionDataProfile(String path) throws DataGridException {
    IRODSAccount irodsAccount = irodsServices.getUserAO().getIRODSAccount();
    logger.info("*****************path **************" + path);
    logger.debug("got irodsAccount:{}", irodsAccount);
    DataProfilerService dataProfilerService = dataProfilerFactory.instanceDataProfilerService(irodsAccount);
    logger.debug("got the dataProfilerService");
    // TODO: allow clone()
    try {
        @SuppressWarnings("rawtypes") DataProfile dataProfile = dataProfilerService.retrieveDataProfile(path);
        logger.info("------CollectionInfoController getTestCollectionInfo() ends !!");
        logger.info("data profile retrieved:{}", dataProfile);
        /*
			 * TODO: after this do an if test and send to right view with the DataProfile in
			 * the model
			 */
        return dataProfile;
    } catch (JargonException e) {
        logger.error("Could not retrieve collection/dataobject from path: {}", path, e);
        throw new DataGridException(e.getMessage());
    }
}
Also used : DataProfile(org.irods.jargon.extensions.dataprofiler.DataProfile) DataGridException(com.emc.metalnx.core.domain.exceptions.DataGridException) IRODSAccount(org.irods.jargon.core.connection.IRODSAccount) JargonException(org.irods.jargon.core.exception.JargonException) DataProfilerService(org.irods.jargon.extensions.dataprofiler.DataProfilerService)

Aggregations

DataGridException (com.emc.metalnx.core.domain.exceptions.DataGridException)1 IRODSAccount (org.irods.jargon.core.connection.IRODSAccount)1 JargonException (org.irods.jargon.core.exception.JargonException)1 DataProfile (org.irods.jargon.extensions.dataprofiler.DataProfile)1 DataProfilerService (org.irods.jargon.extensions.dataprofiler.DataProfilerService)1