Search in sources :

Example 11 with CollectionAndDataObjectListAndSearchAO

use of org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO in project metalnx-web by irods-contrib.

the class CollectionServiceImpl method searchCollectionAndDataObjectsByName.

@Override
public List<DataGridCollectionAndDataObject> searchCollectionAndDataObjectsByName(String collectionName) throws DataGridConnectionRefusedException {
    logger.info("searchCollectionAndDataObjectsByName()");
    CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = irodsServices.getCollectionAndDataObjectListAndSearchAO();
    List<CollectionAndDataObjectListingEntry> collectionAndDataObjects = null;
    List<DataGridCollectionAndDataObject> dataGridCollectionAndDataObjects = null;
    try {
        collectionAndDataObjects = collectionAndDataObjectListAndSearchAO.searchCollectionsAndDataObjectsBasedOnName(collectionName);
        dataGridCollectionAndDataObjects = this.mapListingEntryToDataGridCollectionAndDataObject(collectionAndDataObjects);
        return dataGridCollectionAndDataObjects;
    } catch (JargonException e) {
        logger.error("Could not search collections: {}", e.getMessage());
    }
    return null;
}
Also used : CollectionAndDataObjectListAndSearchAO(org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO) JargonException(org.irods.jargon.core.exception.JargonException) DataGridCollectionAndDataObject(com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject) CollectionAndDataObjectListingEntry(org.irods.jargon.core.query.CollectionAndDataObjectListingEntry)

Aggregations

CollectionAndDataObjectListAndSearchAO (org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO)11 JargonException (org.irods.jargon.core.exception.JargonException)10 DataGridCollectionAndDataObject (com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject)9 CollectionAndDataObjectListingEntry (org.irods.jargon.core.query.CollectionAndDataObjectListingEntry)6 CollectionAO (org.irods.jargon.core.pub.CollectionAO)5 DataObjectAO (org.irods.jargon.core.pub.DataObjectAO)4 DataObject (org.irods.jargon.core.pub.domain.DataObject)4 HashSet (java.util.HashSet)3 FileNotFoundException (org.irods.jargon.core.exception.FileNotFoundException)3 AvuData (org.irods.jargon.core.pub.domain.AvuData)3 DataGridFilePermission (com.emc.metalnx.core.domain.entity.DataGridFilePermission)1 DataGridGroupPermission (com.emc.metalnx.core.domain.entity.DataGridGroupPermission)1 DataGridMetadata (com.emc.metalnx.core.domain.entity.DataGridMetadata)1 DataGridUserPermission (com.emc.metalnx.core.domain.entity.DataGridUserPermission)1 DataGridException (com.emc.metalnx.core.domain.exceptions.DataGridException)1 AdminServices (com.emc.metalnx.services.interfaces.AdminServices)1 IRODSServices (com.emc.metalnx.services.interfaces.IRODSServices)1 ArrayList (java.util.ArrayList)1 IRODSAccount (org.irods.jargon.core.connection.IRODSAccount)1 EnvironmentalInfoAO (org.irods.jargon.core.pub.EnvironmentalInfoAO)1