From c4584e45eb866433d410bc3c0b1334fdbece7329 Mon Sep 17 00:00:00 2001 From: Mike Conway Date: Thu, 5 Jul 2018 12:13:22 -0400 Subject: [PATCH] #209 code reformat and release prep --- README.md | 3 - data-profile/pom.xml | 2 +- .../irods/jargon/dataprofile/DataProfile.java | 50 ++-- .../dataprofile/DataProfileService.java | 2 +- .../DataProfileServiceFactoryImpl.java | 19 +- .../dataprofile/DataProfileServiceImpl.java | 122 ++++----- .../DataTypeResolutionService.java | 27 +- .../DataTypeResolutionServiceImpl.java | 46 ++-- .../DataProfileServiceImplTest.java | 172 +++++------- .../DataTypeResolutionServiceImplTest.java | 74 ++---- .../jargon/dataprofile/unittest/AllTests.java | 3 +- .../dataprofile/unittest/package-info.java | 1 + jargon-core/pom.xml | 2 +- .../DiscoveredServerPropertiesCache.java | 4 +- .../core/exception/NoMoreDataException.java | 16 +- .../dataformat/InvalidDataException.java | 16 +- .../exception/dataformat/package-info.java | 4 +- .../packinstr/DataObjInpForQuerySpecColl.java | 10 +- .../core/packinstr/MiscApiConstants.java | 4 +- .../packinstr/StructFileExtAndRegInp.java | 8 +- .../jargon/core/protovalues/IcatTypeEnum.java | 4 +- .../core/pub/BulkAVUOperationResponse.java | 18 +- .../jargon/core/pub/BulkFileOperationsAO.java | 4 +- .../core/pub/BulkFileOperationsAOImpl.java | 4 +- ...ollectionAndDataObjectListAndSearchAO.java | 16 +- ...ctionAndDataObjectListAndSearchAOImpl.java | 28 +- .../core/pub/CollectionListingUtils.java | 40 +-- .../jargon/core/pub/CollectionPagerAO.java | 12 +- .../core/pub/CollectionPagerAOImpl.java | 26 +- .../irods/jargon/core/pub/DataAOHelper.java | 2 +- .../jargon/core/pub/DataObjectAOImpl.java | 51 +--- .../pub/DataObjectChecksumUtilitiesAO.java | 2 +- .../core/pub/DataTransferOperations.java | 20 +- .../core/pub/DataTransferOperationsImpl.java | 21 +- .../jargon/core/pub/EnvironmentalInfoAO.java | 2 +- .../core/pub/EnvironmentalInfoAOImpl.java | 10 +- .../jargon/core/pub/FileCatalogObjectAO.java | 6 +- .../core/pub/IRODSAccessObjectFactory.java | 2 +- .../pub/IRODSAccessObjectFactoryImpl.java | 2 +- .../core/pub/IRODSFileSystemAOImpl.java | 2 +- .../irods/jargon/core/pub/IRODSGenericAO.java | 2 +- .../irods/jargon/core/pub/ListAndCount.java | 19 +- .../core/pub/RemoteExecutionOfCommandsAO.java | 2 +- .../jargon/core/pub/Stream2StreamAO.java | 4 +- .../jargon/core/pub/Stream2StreamAOImpl.java | 20 +- .../org/irods/jargon/core/pub/UserAO.java | 2 +- .../org/irods/jargon/core/pub/UserAOImpl.java | 84 ++---- .../irods/jargon/core/pub/UserGroupAO.java | 2 +- .../jargon/core/pub/UserGroupAOImpl.java | 4 +- .../core/pub/aohelper/UserGroupAOHelper.java | 13 +- .../jargon/core/pub/domain/ClientHints.java | 30 +-- .../jargon/core/pub/domain/Collection.java | 2 +- .../core/pub/io/IRODSFileInputStream.java | 6 +- .../CollectionAndDataObjectListingEntry.java | 4 +- .../core/query/GenQueryBuilderCondition.java | 1 - .../query/PagingAwareCollectionListing.java | 8 +- ...agingAwareCollectionListingDescriptor.java | 103 ++++---- .../core/query/QueryConditionOperators.java | 4 +- .../core/query/SpecificQueryResultSet.java | 2 +- .../core/query/UserAnnotatedCatalogItem.java | 16 +- .../transfer/ParallelGetTransferThread.java | 2 +- .../core/transform/ClientHintsTransform.java | 4 +- .../jargon/core/transform/package-info.java | 2 +- .../jargon/core/utils/LocalFileUtils.java | 18 +- .../jargon/core/utils/MiscIRODSUtils.java | 4 +- .../testutils/IRODSTestSetupUtilities.java | 11 +- .../jargon/core/connection/PAMAuthTest.java | 3 +- .../core/packinstr/ExecMyRuleInp_PITest.java | 3 +- ...nAndDataObjectListAndSearchAOImplTest.java | 4 +- .../core/pub/CollectionPagerAOImplTest.java | 4 +- .../pub/IRODSGenQueryExecutorImplTest.java | 3 +- .../pub/PythonRuleProcessingAOImplTest.java | 3 +- .../jargon/core/pub/UserGroupAOImplTest.java | 42 ++- .../jargon/core/pub/io/IRODSFileImplTest.java | 3 +- .../core/query/GenQueryFunctionalTests.java | 2 +- .../RemoteExecuteServiceImplTest.java | 3 +- .../irods/jargon/core/rule/IRODSRuleTest.java | 3 +- .../IrodsRuleEngineRuleTranslatorTest.java | 3 +- .../rule/RuleEngineInstanceChooserTest.java | 3 +- .../core/rule/RuleTypeEvaluatorTest.java | 3 +- .../encrypt/AesCipherEncryptWrapperTest.java | 3 +- .../encrypt/EncryptionWrapperFactoryTest.java | 3 +- ...ncludingLongRunningAndFunctionalTests.java | 2 +- .../EncryptedTransferTests.java | 3 +- .../functionaltest/pep/package-info.java | 2 +- jargon-data-utils/pom.xml | 2 +- .../AvuAutocompleteService.java | 8 +- .../AvuAutocompleteServiceImpl.java | 16 +- .../avuautocomplete/AvuSearchResult.java | 14 +- .../avuautocomplete/package-info.java | 2 +- .../TempPasswordCachingProtocolManager.java | 2 +- .../connectiontester/package-info.java | 2 +- .../datautils/datacache/CacheEncryptor.java | 2 +- .../datautils/datacache/DataCacheService.java | 8 +- .../filearchive/AbstractArchiver.java | 2 +- .../filearchive/LocalFileGzipCompressor.java | 2 +- .../filesampler/FileSamplerService.java | 28 +- .../filesampler/FileSamplerServiceImpl.java | 61 ++--- .../filesampler/FileTooLargeException.java | 9 +- .../datautils/filesampler/package-info.java | 6 +- .../metadatamanifest/MetadataManifest.java | 23 +- .../MetadataManifestOperation.java | 23 +- .../MetadataManifestProcessor.java | 4 +- .../MetadataManifestProcessorImpl.java | 33 ++- .../metadatamanifest/package-info.java | 7 +- .../datautils/rule/UserRuleService.java | 2 +- .../jargon/datautils/rule/package-info.java | 2 +- .../shoppingcart/FileShoppingCart.java | 6 +- .../shoppingcart/ShoppingCartService.java | 6 +- .../shoppingcart/ShoppingCartServiceImpl.java | 2 +- .../SynchPropertiesService.java | 8 +- .../SynchPropertiesServiceImpl.java | 10 +- .../synchproperties/package-info.java | 2 +- .../datautils/tree/DiffTreePostProcessor.java | 2 +- .../datautils/tree/FileTreeDiffEntry.java | 2 +- .../datautils/tree/FileTreeDiffUtility.java | 8 +- .../tree/FileTreeDiffUtilityImpl.java | 23 +- .../jargon/datautils/tree/FileTreeModel.java | 2 +- .../tree/TreeSummarizingService.java | 2 +- .../datautils/visitor/package-info.java | 4 +- .../AvuAutocompleteServiceImplTest.java | 24 +- .../FileSamplerServiceImplTest.java | 186 +++++-------- jargon-mdquery/pom.xml | 2 +- .../irods/jargon/mdquery/MetadataQuery.java | 22 +- .../jargon/mdquery/MetadataQueryElement.java | 28 +- .../exception/MetadataQueryException.java | 19 +- .../MetadataQueryRuntimeException.java | 14 +- .../mdquery/exception/package-info.java | 1 + .../irods/jargon/mdquery/package-info.java | 5 +- .../MetadataQueryJsonService.java | 21 +- .../mdquery/serialization/package-info.java | 1 + .../mdquery/service/MetadataQueryService.java | 19 +- .../service/MetadataQueryServiceImpl.java | 249 +++++++----------- .../jargon/mdquery/service/package-info.java | 1 + .../MetadataQueryJsonServiceTest.java | 12 +- .../service/MetadataQueryServiceImplTest.java | 74 +++++- .../jargon/mdquery/unittest/AllTests.java | 3 +- .../jargon/mdquery/unittest/package-info.java | 2 +- jargon-pool/pom.xml | 2 +- .../conncache/JargonConnectionCacheTest.java | 3 +- jargon-ruleservice/pom.xml | 2 +- .../composition/RuleCompositionService.java | 6 +- .../RuleCompositionServiceImpl.java | 11 +- .../ruleservice/composition/package-info.java | 2 +- .../ruleservice/formatting/package-info.java | 2 +- .../ruleservice/unittest/package-info.java | 2 +- jargon-ticket/pom.xml | 2 +- .../TicketClientOperationsImplTest.java | 8 +- .../TicketDistributionServiceImplTest.java | 4 +- jargon-user-profile/pom.xml | 2 +- .../userprofile/unittest/package-info.java | 2 +- jargon-user-tagging/pom.xml | 2 +- .../domain/IRODSStarredFileOrCollection.java | 27 +- .../sharing/IRODSSharingServiceImpl.java | 2 +- .../usertagging/starring/package-info.java | 2 +- .../tags/IRODSTaggingServiceImpl.java | 2 +- .../jargon/usertagging/tags/package-info.java | 2 +- jargon-zipservice/pom.xml | 2 +- .../api/BundleClosingInputStream.java | 8 +- .../zipservice/api/BundleStreamWrapper.java | 9 +- .../zipservice/api/JargonZipService.java | 54 ++-- .../zipservice/api/JargonZipServiceImpl.java | 204 ++++++-------- .../api/ZipRequestTooLargeException.java | 22 +- .../api/ZipServiceConfiguration.java | 39 ++- .../ZipServiceConfigurationException.java | 20 +- .../api/exception/ZipServiceException.java | 17 +- .../api/exception/package-info.java | 3 +- .../jargon/zipservice/api/package-info.java | 6 +- .../api/JargonZipServiceImplTest.java | 171 +++++------- pom.xml | 2 +- 170 files changed, 1268 insertions(+), 1713 deletions(-) diff --git a/README.md b/README.md index 69c6d698a..262d2a36b 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,6 @@ ## News -4.2.3 Compatability and maintenance -for milestone: https://github.com/DICE-UNC/jargon/milestone/23 ->>>>>>> origin/4-2-stable https://github.com/DICE-UNC/jargon/milestone/24 diff --git a/data-profile/pom.xml b/data-profile/pom.xml index 46a247918..e478706a5 100644 --- a/data-profile/pom.xml +++ b/data-profile/pom.xml @@ -6,7 +6,7 @@ jargon org.irods - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon data-profile diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfile.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfile.java index 8f6327533..c9fa83b17 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfile.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfile.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.dataprofile; @@ -14,7 +14,7 @@ /** * Represents a consolidated summary of a data object or collection as a simple * POJO - * + * * @author Mike Conway - DICE * */ @@ -29,7 +29,7 @@ public class DataProfile { private String mimeType = ""; private String infoType = ""; private List irodsTagValues = new ArrayList(); - + /** * parent of the current data object */ @@ -43,7 +43,7 @@ public class DataProfile { */ private List pathComponents = null; - public void setDomainObject(T domainObject) { + public void setDomainObject(final T domainObject) { this.domainObject = domainObject; } @@ -52,7 +52,7 @@ public T getDomainObject() { } /** - * + * */ public DataProfile() { } @@ -73,19 +73,19 @@ public boolean isShared() { return isShared; } - public void setMetadata(List metadata) { + public void setMetadata(final List metadata) { this.metadata = metadata; } - public void setAcls(List acls) { + public void setAcls(final List acls) { this.acls = acls; } - public void setStarred(boolean isStarred) { + public void setStarred(final boolean isStarred) { this.isStarred = isStarred; } - public void setShared(boolean isShared) { + public void setShared(final boolean isShared) { this.isShared = isShared; } @@ -93,7 +93,7 @@ public String getMimeType() { return mimeType; } - public void setMimeType(String mimeType) { + public void setMimeType(final String mimeType) { this.mimeType = mimeType; } @@ -101,7 +101,7 @@ public boolean isFile() { return file; } - public void setFile(boolean file) { + public void setFile(final boolean file) { this.file = file; } @@ -109,7 +109,7 @@ public List getIrodsTagValues() { return irodsTagValues; } - public void setIrodsTagValues(List irodsTagValues) { + public void setIrodsTagValues(final List irodsTagValues) { this.irodsTagValues = irodsTagValues; } @@ -124,7 +124,7 @@ public String getParentPath() { * @param parentPath * the parentPath to set */ - public void setParentPath(String parentPath) { + public void setParentPath(final String parentPath) { this.parentPath = parentPath; } @@ -139,7 +139,7 @@ public String getChildName() { * @param childName * the childName to set */ - public void setChildName(String childName) { + public void setChildName(final String childName) { this.childName = childName; } @@ -154,22 +154,21 @@ public List getPathComponents() { * @param pathComponents * the pathComponents to set */ - public void setPathComponents(List pathComponents) { + public void setPathComponents(final List pathComponents) { this.pathComponents = pathComponents; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { - return "DataProfile [file=" + file + ", domainObject=" + domainObject - + ", metadata=" + metadata + ", acls=" + acls + ", isStarred=" - + isStarred + ", isShared=" + isShared + ", mimeType=" - + mimeType + ", infoType=" + infoType + ", irodsTagValues=" - + irodsTagValues + ", parentPath=" + parentPath - + ", childName=" + childName + ", pathComponents=" - + pathComponents + "]"; + return "DataProfile [file=" + file + ", domainObject=" + domainObject + ", metadata=" + metadata + ", acls=" + + acls + ", isStarred=" + isStarred + ", isShared=" + isShared + ", mimeType=" + mimeType + + ", infoType=" + infoType + ", irodsTagValues=" + irodsTagValues + ", parentPath=" + parentPath + + ", childName=" + childName + ", pathComponents=" + pathComponents + "]"; } /** @@ -180,9 +179,10 @@ public String getInfoType() { } /** - * @param infoType the infoType to set + * @param infoType + * the infoType to set */ - public void setInfoType(String infoType) { + public void setInfoType(final String infoType) { this.infoType = infoType; } diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileService.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileService.java index a2f796557..99b09fbf4 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileService.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileService.java @@ -7,7 +7,7 @@ public interface DataProfileService { /** * Retrieve a summary profile of a data object or collection - * + * * @param irodsAbsolutePath * String with the absolute path to an iRODS file or * collection diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceFactoryImpl.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceFactoryImpl.java index 7e9093370..553510a12 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceFactoryImpl.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceFactoryImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.dataprofile; @@ -11,7 +11,7 @@ /** * Simple class that produces a configured instance of the DataProfileService * with the default data type resolution service configured - * + * * @author Mike Conway - DICE * */ @@ -21,25 +21,22 @@ public class DataProfileServiceFactoryImpl extends AbstractJargonService { * @param irodsAccessObjectFactory * @param irodsAccount */ - public DataProfileServiceFactoryImpl( - IRODSAccessObjectFactory irodsAccessObjectFactory, - IRODSAccount irodsAccount) { + public DataProfileServiceFactoryImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, + final IRODSAccount irodsAccount) { super(irodsAccessObjectFactory, irodsAccount); } /** - * + * */ public DataProfileServiceFactoryImpl() { } - public DataProfileService instanceDataProfileService() - throws JargonException { + public DataProfileService instanceDataProfileService() throws JargonException { DataTypeResolutionService dataTypeResolutionService = new DataTypeResolutionServiceImpl( - this.getIrodsAccessObjectFactory(), this.getIrodsAccount()); - return new DataProfileServiceImpl(this.getIrodsAccessObjectFactory(), - this.getIrodsAccount(), dataTypeResolutionService); + getIrodsAccessObjectFactory(), getIrodsAccount()); + return new DataProfileServiceImpl(getIrodsAccessObjectFactory(), getIrodsAccount(), dataTypeResolutionService); } diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceImpl.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceImpl.java index 5a887cc8f..3bbfd395d 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceImpl.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataProfileServiceImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.dataprofile; @@ -28,15 +28,13 @@ /** * Service that will gather data associated with a Data Object or Collection - * + * * @author Mike Conway - DICE * */ -public class DataProfileServiceImpl extends AbstractJargonService implements - DataProfileService { +public class DataProfileServiceImpl extends AbstractJargonService implements DataProfileService { - public static final Logger log = LoggerFactory - .getLogger(DataProfileServiceImpl.class); + public static final Logger log = LoggerFactory.getLogger(DataProfileServiceImpl.class); private final DataTypeResolutionService dataTypeResolutionService; @@ -44,10 +42,8 @@ public class DataProfileServiceImpl extends AbstractJargonService implements * @param irodsAccessObjectFactory * @param irodsAccount */ - public DataProfileServiceImpl( - IRODSAccessObjectFactory irodsAccessObjectFactory, - IRODSAccount irodsAccount, - final DataTypeResolutionService dataTypeResolutionService) { + public DataProfileServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, + final IRODSAccount irodsAccount, final DataTypeResolutionService dataTypeResolutionService) { super(irodsAccessObjectFactory, irodsAccount); if (dataTypeResolutionService == null) { @@ -62,14 +58,13 @@ public DataProfileServiceImpl( * Null constructor for easy mocking */ public DataProfileServiceImpl() { - this.dataTypeResolutionService = null; + dataTypeResolutionService = null; } /* * (non-Javadoc) - * - * @see - * org.irods.jargon.dataprofile.DataProfileService#retrieveDataProfile(java + * + * @see org.irods.jargon.dataprofile.DataProfileService#retrieveDataProfile(java * .lang.String) */ @Override @@ -80,19 +75,16 @@ public DataProfile retrieveDataProfile(final String irodsAbsolutePath) log.info("retrieveDataProfile()"); if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) { - throw new IllegalArgumentException( - "null or empty irodsAbsolutePath"); + throw new IllegalArgumentException("null or empty irodsAbsolutePath"); } log.info("irodsAbsolutePath:{}", irodsAbsolutePath); - CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = this - .getIrodsAccessObjectFactory() + CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = getIrodsAccessObjectFactory() .getCollectionAndDataObjectListAndSearchAO(getIrodsAccount()); log.info("getting objStat..."); - ObjStat objStat = collectionAndDataObjectListAndSearchAO - .retrieveObjectStatForPath(irodsAbsolutePath); + ObjStat objStat = collectionAndDataObjectListAndSearchAO.retrieveObjectStatForPath(irodsAbsolutePath); if (objStat.isSomeTypeOfCollection()) { return retrieveDataProfileForCollection(irodsAbsolutePath, objStat); @@ -102,15 +94,12 @@ public DataProfile retrieveDataProfile(final String irodsAbsolutePath) } - private DataProfile retrieveDataProfileForDataObject( - String irodsAbsolutePath, ObjStat objStat) - throws FileNotFoundException, JargonException { + private DataProfile retrieveDataProfileForDataObject(final String irodsAbsolutePath, + final ObjStat objStat) throws FileNotFoundException, JargonException { log.info("retrieveDataProfileForDataObject()"); - DataObjectAO dataObjectAO = this.getIrodsAccessObjectFactory() - .getDataObjectAO(getIrodsAccount()); - DataObject dataObject = dataObjectAO - .findByAbsolutePath(irodsAbsolutePath); + DataObjectAO dataObjectAO = getIrodsAccessObjectFactory().getDataObjectAO(getIrodsAccount()); + DataObject dataObject = dataObjectAO.findByAbsolutePath(irodsAbsolutePath); log.info("got dataObject:{}", dataObject); DataProfile dataProfile = new DataProfile(); @@ -119,23 +108,20 @@ private DataProfile retrieveDataProfileForDataObject( log.info("get AVUs"); - dataProfile.setMetadata(dataObjectAO - .findMetadataValuesForDataObject(irodsAbsolutePath)); + dataProfile.setMetadata(dataObjectAO.findMetadataValuesForDataObject(irodsAbsolutePath)); log.info("get ACLs..."); - dataProfile.setAcls(dataObjectAO - .listPermissionsForDataObject(irodsAbsolutePath)); + dataProfile.setAcls(dataObjectAO.listPermissionsForDataObject(irodsAbsolutePath)); log.info("look for special AVUs"); - checkIfStarred(dataProfile, this.getIrodsAccount().getUserName()); - checkIfShared(dataProfile, this.getIrodsAccount().getUserName()); + checkIfStarred(dataProfile, getIrodsAccount().getUserName()); + checkIfShared(dataProfile, getIrodsAccount().getUserName()); extractTags(dataProfile); establishDataType(dataProfile); - dataProfile.setPathComponents(MiscIRODSUtils - .breakIRODSPathIntoComponents(irodsAbsolutePath)); + dataProfile.setPathComponents(MiscIRODSUtils.breakIRODSPathIntoComponents(irodsAbsolutePath)); CollectionAndPath collectionAndPath = MiscIRODSUtils .separateCollectionAndPathFromGivenAbsolutePath(irodsAbsolutePath); @@ -146,29 +132,24 @@ private DataProfile retrieveDataProfileForDataObject( } - private void establishDataType(DataProfile dataProfile) - throws JargonException { + private void establishDataType(final DataProfile dataProfile) throws JargonException { log.info("establishDataType()"); - dataProfile.setMimeType(this.getDataTypeResolutionService() - .resolveDataTypeWithProvidedAvuAndDataObject( - dataProfile.getDomainObject(), - dataProfile.getMetadata())); + dataProfile.setMimeType(getDataTypeResolutionService() + .resolveDataTypeWithProvidedAvuAndDataObject(dataProfile.getDomainObject(), dataProfile.getMetadata())); } @SuppressWarnings({ "unchecked", "rawtypes" }) - private void extractTags(DataProfile dataProfile) throws JargonException { + private void extractTags(final DataProfile dataProfile) throws JargonException { List resultValues = new ArrayList(); List metadata = dataProfile.getMetadata(); for (MetaDataAndDomainData metadataAndDomainData : metadata) { - if (metadataAndDomainData.getAvuUnit().equals( - UserTaggingConstants.TAG_AVU_UNIT) - && metadataAndDomainData.getAvuValue().equals( - getIrodsAccount().getUserName())) { + if (metadataAndDomainData.getAvuUnit().equals(UserTaggingConstants.TAG_AVU_UNIT) + && metadataAndDomainData.getAvuValue().equals(getIrodsAccount().getUserName())) { resultValues.add(new IRODSTagValue(metadataAndDomainData)); } @@ -181,41 +162,38 @@ private void extractTags(DataProfile dataProfile) throws JargonException { /** * See if this is a shared file or collection - * + * * @param dataProfile */ @SuppressWarnings("rawtypes") - private void checkIfShared(DataProfile dataProfile, String userName) { - boolean shared = searchAvusForUnit(dataProfile, - UserTaggingConstants.SHARE_AVU_UNIT, userName); + private void checkIfShared(final DataProfile dataProfile, final String userName) { + boolean shared = searchAvusForUnit(dataProfile, UserTaggingConstants.SHARE_AVU_UNIT, userName); dataProfile.setShared(shared); } /** * Look for starred in AVUs - * + * * @param dataProfile */ @SuppressWarnings("rawtypes") - private void checkIfStarred(final DataProfile dataProfile, String userName) { + private void checkIfStarred(final DataProfile dataProfile, final String userName) { - boolean starred = searchAvusForUnit(dataProfile, - UserTaggingConstants.STAR_AVU_UNIT, userName); + boolean starred = searchAvusForUnit(dataProfile, UserTaggingConstants.STAR_AVU_UNIT, userName); dataProfile.setStarred(starred); } /** * Look for a special AVU in the list of retrieved AVUs - * + * * @param dataProfile * @param avuUnit * @return */ @SuppressWarnings("unchecked") - private boolean searchAvusForUnit( - @SuppressWarnings("rawtypes") final DataProfile dataProfile, - final String avuUnit, final String userName) { + private boolean searchAvusForUnit(@SuppressWarnings("rawtypes") final DataProfile dataProfile, final String avuUnit, + final String userName) { if (dataProfile.getMetadata() == null) { throw new IllegalStateException("null metadata in dataProfile"); @@ -225,8 +203,7 @@ private boolean searchAvusForUnit( List metadata = dataProfile.getMetadata(); for (MetaDataAndDomainData metadataValue : metadata) { - if (metadataValue.getAvuUnit().equals(avuUnit) - && metadataValue.getAvuValue().equals(userName)) { + if (metadataValue.getAvuUnit().equals(avuUnit) && metadataValue.getAvuValue().equals(userName)) { foundValue = true; break; } @@ -235,13 +212,11 @@ private boolean searchAvusForUnit( } - private DataProfile retrieveDataProfileForCollection( - String irodsAbsolutePath, ObjStat objStat) throws JargonException { + private DataProfile retrieveDataProfileForCollection(final String irodsAbsolutePath, + final ObjStat objStat) throws JargonException { log.info("retrieveDataProfileForCollection()"); - CollectionAO collectionAO = this.getIrodsAccessObjectFactory() - .getCollectionAO(getIrodsAccount()); - Collection collection = collectionAO - .findByAbsolutePath(irodsAbsolutePath); + CollectionAO collectionAO = getIrodsAccessObjectFactory().getCollectionAO(getIrodsAccount()); + Collection collection = collectionAO.findByAbsolutePath(irodsAbsolutePath); log.info("got collection:{}", collection); DataProfile dataProfile = new DataProfile(); @@ -251,8 +226,7 @@ private DataProfile retrieveDataProfileForCollection( log.info("get AVUs"); try { - dataProfile.setMetadata(collectionAO - .findMetadataValuesForCollection(irodsAbsolutePath)); + dataProfile.setMetadata(collectionAO.findMetadataValuesForCollection(irodsAbsolutePath)); } catch (JargonQueryException e) { throw new JargonException("error querying for AVU metadata", e); @@ -260,17 +234,15 @@ private DataProfile retrieveDataProfileForCollection( log.info("get ACLs..."); - dataProfile.setAcls(collectionAO - .listPermissionsForCollection(irodsAbsolutePath)); + dataProfile.setAcls(collectionAO.listPermissionsForCollection(irodsAbsolutePath)); log.info("look for special AVUs"); - checkIfStarred(dataProfile, this.getIrodsAccount().getUserName()); - checkIfShared(dataProfile, this.getIrodsAccount().getUserName()); + checkIfStarred(dataProfile, getIrodsAccount().getUserName()); + checkIfShared(dataProfile, getIrodsAccount().getUserName()); extractTags(dataProfile); dataProfile.setMimeType(""); - dataProfile.setPathComponents(MiscIRODSUtils - .breakIRODSPathIntoComponents(irodsAbsolutePath)); + dataProfile.setPathComponents(MiscIRODSUtils.breakIRODSPathIntoComponents(irodsAbsolutePath)); CollectionAndPath collectionAndPath = MiscIRODSUtils .separateCollectionAndPathFromGivenAbsolutePath(irodsAbsolutePath); @@ -283,7 +255,7 @@ private DataProfile retrieveDataProfileForCollection( /* * (non-Javadoc) - * + * * @see * org.irods.jargon.dataprofile.DataProfileService#getDataTypeResolutionService * () diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionService.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionService.java index 5f3672f1f..bc03a7a20 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionService.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionService.java @@ -9,38 +9,37 @@ public interface DataTypeResolutionService { /** - * Given a data object and associated metadata, determine the MIME type. - * This will look first for a special AVU value that is standard in iRODS, - * and then will use the file name extension to derive a mime type. + * Given a data object and associated metadata, determine the MIME type. This + * will look first for a special AVU value that is standard in iRODS, and then + * will use the file name extension to derive a mime type. *

* Note that this resolution scheme is provisional, and may be extended to - * standard mechanisms on iRODS, or using file contents based resolution, or - * to accommodate extended file types. - * + * standard mechanisms on iRODS, or using file contents based resolution, or to + * accommodate extended file types. + * * @param dataObject * {@link DataObject} * @param metadata * List of {@link MetaDataAndDomaimData} with AVUs * associated with the data object. This is done in this manner * anticipating that the AVUs are already available, preventing - * unnecessary look ups of iRODS data. Other signatures can be - * added later to obtain those AVUs by query + * unnecessary look ups of iRODS data. Other signatures can be added + * later to obtain those AVUs by query * @return String with a resolved file type as a MIME value * @throws JargonException */ - String resolveDataTypeWithProvidedAvuAndDataObject(DataObject dataObject, - List metadata) throws JargonException; + String resolveDataTypeWithProvidedAvuAndDataObject(DataObject dataObject, List metadata) + throws JargonException; /** * Determine the data type based on file extension using Tika - * + * * @param dataObject * {@link DataObject} to be resolved * @return String version of the MIME type - * + * * @throws JargonException */ - String determineMimeTypeViaTika(DataObject dataObject) - throws JargonException; + String determineMimeTypeViaTika(DataObject dataObject) throws JargonException; } \ No newline at end of file diff --git a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImpl.java b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImpl.java index d87cfb9d9..856826862 100644 --- a/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImpl.java +++ b/data-profile/src/main/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.dataprofile; @@ -8,6 +8,7 @@ import org.apache.tika.detect.Detector; import org.apache.tika.metadata.Metadata; +import org.apache.tika.metadata.TikaMetadataKeys; import org.apache.tika.mime.MediaType; import org.apache.tika.parser.AutoDetectParser; import org.irods.jargon.core.connection.IRODSAccount; @@ -27,27 +28,24 @@ *

* This should be considered a provisional solution while we work to standardize * treatment of MIME types as a standard part of iRODS - * + * * @author Mike Conway - DICE * */ -public class DataTypeResolutionServiceImpl extends AbstractJargonService - implements DataTypeResolutionService { +public class DataTypeResolutionServiceImpl extends AbstractJargonService implements DataTypeResolutionService { public static final String APPLICATION_IRODS_RULE = "application/irods-rule"; - public static final Logger log = LoggerFactory - .getLogger(DataTypeResolutionServiceImpl.class); + public static final Logger log = LoggerFactory.getLogger(DataTypeResolutionServiceImpl.class); /* * (non-Javadoc) - * + * * @see org.irods.jargon.dataprofile.DataTypeResolutionService# * resolveDataTypeWithProvidedAvuAndDataObject * (org.irods.jargon.core.pub.domain.DataObject, java.util.List) */ @Override - public String resolveDataTypeWithProvidedAvuAndDataObject( - final DataObject dataObject, + public String resolveDataTypeWithProvidedAvuAndDataObject(final DataObject dataObject, final List metadata) throws JargonException { log.info("resolveDataTypeWithProvidedAvuAndDataObject()"); @@ -96,14 +94,13 @@ public String resolveDataTypeWithProvidedAvuAndDataObject( /** * Temporary shim for first cloud browser release - * + * * @param dataObject * @return */ - private String determimeMimeTypeOfIrodsObjects(DataObject dataObject) { + private String determimeMimeTypeOfIrodsObjects(final DataObject dataObject) { - String extension = LocalFileUtils.getFileExtension(dataObject - .getDataName()); + String extension = LocalFileUtils.getFileExtension(dataObject.getDataName()); if (extension == null || extension.isEmpty()) { return null; } @@ -119,33 +116,29 @@ private String determimeMimeTypeOfIrodsObjects(DataObject dataObject) { /* * (non-Javadoc) - * + * * @see org.irods.jargon.dataprofile.DataTypeResolutionService# * determineMimeTypeViaTika(org.irods.jargon.core.pub.domain.DataObject) */ @Override - public String determineMimeTypeViaTika(DataObject dataObject) - throws JargonException { + public String determineMimeTypeViaTika(final DataObject dataObject) throws JargonException { AutoDetectParser parser = new AutoDetectParser(); Detector detector = parser.getDetector(); Metadata md = new Metadata(); - md.add(Metadata.RESOURCE_NAME_KEY, dataObject.getDataName()); + md.add(TikaMetadataKeys.RESOURCE_NAME_KEY, dataObject.getDataName()); MediaType mediaType; try { mediaType = detector.detect(null, md); } catch (IOException e) { - throw new JargonException( - "io exception determining file type by extension", e); + throw new JargonException("io exception determining file type by extension", e); } return mediaType.toString(); } - private String searchAvusForMimeType( - final List metadata) { + private String searchAvusForMimeType(final List metadata) { for (MetaDataAndDomainData metadataValue : metadata) { - if (metadataValue.getAvuUnit().equals( - UserTaggingConstants.MIME_TYPE_AVU_UNIT)) { + if (metadataValue.getAvuUnit().equals(UserTaggingConstants.MIME_TYPE_AVU_UNIT)) { return metadataValue.getAvuAttribute(); } } @@ -154,7 +147,7 @@ private String searchAvusForMimeType( } /** - * + * */ public DataTypeResolutionServiceImpl() { super(); @@ -164,9 +157,8 @@ public DataTypeResolutionServiceImpl() { * @param irodsAccessObjectFactory * @param irodsAccount */ - public DataTypeResolutionServiceImpl( - IRODSAccessObjectFactory irodsAccessObjectFactory, - IRODSAccount irodsAccount) { + public DataTypeResolutionServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, + final IRODSAccount irodsAccount) { super(irodsAccessObjectFactory, irodsAccount); } diff --git a/data-profile/src/test/java/org/irods/jargon/dataprofile/DataProfileServiceImplTest.java b/data-profile/src/test/java/org/irods/jargon/dataprofile/DataProfileServiceImplTest.java index 2c9269564..3a82ec165 100644 --- a/data-profile/src/test/java/org/irods/jargon/dataprofile/DataProfileServiceImplTest.java +++ b/data-profile/src/test/java/org/irods/jargon/dataprofile/DataProfileServiceImplTest.java @@ -26,36 +26,29 @@ public class DataProfileServiceImplTest { @Test public void testRetrieveDataProfileDataObject() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.txt"; dataObject.setDataName(dataName); dataObject.setCollectionName("/a/collection"); String irodsAbsolutePath = "/a/collection/" + dataName; - MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData - .instance(MetadataDomain.DATA, "1", "blah", 0, - "application/xml", "", - UserTaggingConstants.MIME_TYPE_AVU_UNIT); + MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData.instance(MetadataDomain.DATA, "1", "blah", + 0, "application/xml", "", UserTaggingConstants.MIME_TYPE_AVU_UNIT); List avus = new ArrayList(); avus.add(metaDataAndDamainData); - MetaDataAndDomainData starred = MetaDataAndDomainData.instance( - MetadataDomain.DATA, "1", "blah", 0, "l", + MetaDataAndDomainData starred = MetaDataAndDomainData.instance(MetadataDomain.DATA, "1", "blah", 0, "l", irodsAccount.getUserName(), UserTaggingConstants.STAR_AVU_UNIT); avus.add(starred); - MetaDataAndDomainData shared = MetaDataAndDomainData - .instance(MetadataDomain.DATA, "1", "blah", 0, "l", - irodsAccount.getUserName(), - UserTaggingConstants.SHARE_AVU_UNIT); + MetaDataAndDomainData shared = MetaDataAndDomainData.instance(MetadataDomain.DATA, "1", "blah", 0, "l", + irodsAccount.getUserName(), UserTaggingConstants.SHARE_AVU_UNIT); avus.add(shared); @@ -65,71 +58,53 @@ public void testRetrieveDataProfileDataObject() throws Exception { ObjStat objStat = new ObjStat(); objStat.setAbsolutePath("/some/absolutepath/something.txt"); objStat.setObjectType(ObjectType.DATA_OBJECT); - Mockito.when( - collectionAndDataObjectListAndSearchAO - .retrieveObjectStatForPath(irodsAbsolutePath)) + Mockito.when(collectionAndDataObjectListAndSearchAO.retrieveObjectStatForPath(irodsAbsolutePath)) .thenReturn(objStat); - Mockito.when( - irodsAccessObjectFactory - .getCollectionAndDataObjectListAndSearchAO(irodsAccount)) + Mockito.when(irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)) .thenReturn(collectionAndDataObjectListAndSearchAO); DataObjectAO dataObjectAO = Mockito.mock(DataObjectAO.class); - Mockito.when(dataObjectAO.findByAbsolutePath(irodsAbsolutePath)) - .thenReturn(dataObject); + Mockito.when(dataObjectAO.findByAbsolutePath(irodsAbsolutePath)).thenReturn(dataObject); - Mockito.when( - dataObjectAO.findMetadataValuesForDataObject(irodsAbsolutePath)) - .thenReturn(avus); + Mockito.when(dataObjectAO.findMetadataValuesForDataObject(irodsAbsolutePath)).thenReturn(avus); - Mockito.when(irodsAccessObjectFactory.getDataObjectAO(irodsAccount)) - .thenReturn(dataObjectAO); + Mockito.when(irodsAccessObjectFactory.getDataObjectAO(irodsAccount)).thenReturn(dataObjectAO); - DataProfileService dataProfileService = new DataProfileServiceImpl( - irodsAccessObjectFactory, irodsAccount, resolutionService); + DataProfileService dataProfileService = new DataProfileServiceImpl(irodsAccessObjectFactory, irodsAccount, + resolutionService); @SuppressWarnings("unchecked") - DataProfile actual = dataProfileService - .retrieveDataProfile(irodsAbsolutePath); + DataProfile actual = dataProfileService.retrieveDataProfile(irodsAbsolutePath); Assert.assertNotNull("null dataProfle", actual); Assert.assertNotNull("no data object", actual.getDomainObject()); Assert.assertTrue("should be file", actual.isFile()); Assert.assertTrue("shoudl be starred", actual.isStarred()); Assert.assertTrue("should be shared", actual.isShared()); - Assert.assertNotNull("should have collection parent", - actual.getParentPath()); - Assert.assertFalse("should have collection parent", actual - .getParentPath().isEmpty()); + Assert.assertNotNull("should have collection parent", actual.getParentPath()); + Assert.assertFalse("should have collection parent", actual.getParentPath().isEmpty()); Assert.assertNotNull("should have child name", actual.getChildName()); - Assert.assertFalse("should have child name", actual.getChildName() - .isEmpty()); + Assert.assertFalse("should have child name", actual.getChildName().isEmpty()); - Assert.assertNotNull("should have path components", - actual.getPathComponents()); - Assert.assertFalse("should have path components", actual - .getPathComponents().isEmpty()); + Assert.assertNotNull("should have path components", actual.getPathComponents()); + Assert.assertFalse("should have path components", actual.getPathComponents().isEmpty()); } @Test public void testRetrieveDataProfileDataObjectWithTags() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.txt"; dataObject.setDataName(dataName); - MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData - .instance(MetadataDomain.DATA, "1", "blah", 0, "hi", - irodsAccount.getUserName(), - UserTaggingConstants.TAG_AVU_UNIT); + MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData.instance(MetadataDomain.DATA, "1", "blah", + 0, "hi", irodsAccount.getUserName(), UserTaggingConstants.TAG_AVU_UNIT); List avus = new ArrayList(); avus.add(metaDataAndDamainData); @@ -138,68 +113,53 @@ public void testRetrieveDataProfileDataObjectWithTags() throws Exception { ObjStat objStat = new ObjStat(); objStat.setObjectType(ObjectType.DATA_OBJECT); - Mockito.when( - collectionAndDataObjectListAndSearchAO - .retrieveObjectStatForPath(dataName)).thenReturn( - objStat); - - Mockito.when( - irodsAccessObjectFactory - .getCollectionAndDataObjectListAndSearchAO(irodsAccount)) + Mockito.when(collectionAndDataObjectListAndSearchAO.retrieveObjectStatForPath(dataName)).thenReturn(objStat); + + Mockito.when(irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)) .thenReturn(collectionAndDataObjectListAndSearchAO); DataObjectAO dataObjectAO = Mockito.mock(DataObjectAO.class); - Mockito.when(dataObjectAO.findByAbsolutePath(dataName)).thenReturn( - dataObject); + Mockito.when(dataObjectAO.findByAbsolutePath(dataName)).thenReturn(dataObject); - Mockito.when(dataObjectAO.findMetadataValuesForDataObject(dataName)) - .thenReturn(avus); + Mockito.when(dataObjectAO.findMetadataValuesForDataObject(dataName)).thenReturn(avus); - Mockito.when(irodsAccessObjectFactory.getDataObjectAO(irodsAccount)) - .thenReturn(dataObjectAO); + Mockito.when(irodsAccessObjectFactory.getDataObjectAO(irodsAccount)).thenReturn(dataObjectAO); - DataProfileService dataProfileService = new DataProfileServiceImpl( - irodsAccessObjectFactory, irodsAccount, resolutionService); + DataProfileService dataProfileService = new DataProfileServiceImpl(irodsAccessObjectFactory, irodsAccount, + resolutionService); @SuppressWarnings("unchecked") - DataProfile actual = dataProfileService - .retrieveDataProfile(dataName); + DataProfile actual = dataProfileService.retrieveDataProfile(dataName); Assert.assertNotNull("null dataProfle", actual); Assert.assertNotNull("no data object", actual.getDomainObject()); Assert.assertTrue("should be file", actual.isFile()); Assert.assertFalse("should not be starred", actual.isStarred()); Assert.assertFalse("should not be shared", actual.isShared()); - Assert.assertFalse("should have tags", actual.getIrodsTagValues() - .isEmpty()); + Assert.assertFalse("should have tags", actual.getIrodsTagValues().isEmpty()); } @Test public void testRetrieveDataProfileCollection() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); Collection collection = new Collection(); String collName = "/a/collection"; collection.setCollectionName(collName); List avus = new ArrayList(); - MetaDataAndDomainData starred = MetaDataAndDomainData.instance( - MetadataDomain.COLLECTION, "1", "blah", 0, "l", + MetaDataAndDomainData starred = MetaDataAndDomainData.instance(MetadataDomain.COLLECTION, "1", "blah", 0, "l", irodsAccount.getUserName(), UserTaggingConstants.STAR_AVU_UNIT); avus.add(starred); - MetaDataAndDomainData shared = MetaDataAndDomainData - .instance(MetadataDomain.COLLECTION, "1", "blah", 0, "l", - irodsAccount.getUserName(), - UserTaggingConstants.SHARE_AVU_UNIT); + MetaDataAndDomainData shared = MetaDataAndDomainData.instance(MetadataDomain.COLLECTION, "1", "blah", 0, "l", + irodsAccount.getUserName(), UserTaggingConstants.SHARE_AVU_UNIT); avus.add(shared); @@ -208,49 +168,35 @@ public void testRetrieveDataProfileCollection() throws Exception { ObjStat objStat = new ObjStat(); objStat.setObjectType(ObjectType.COLLECTION); - Mockito.when( - collectionAndDataObjectListAndSearchAO - .retrieveObjectStatForPath(collName)).thenReturn( - objStat); - - Mockito.when( - irodsAccessObjectFactory - .getCollectionAndDataObjectListAndSearchAO(irodsAccount)) + Mockito.when(collectionAndDataObjectListAndSearchAO.retrieveObjectStatForPath(collName)).thenReturn(objStat); + + Mockito.when(irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)) .thenReturn(collectionAndDataObjectListAndSearchAO); CollectionAO collectionAO = Mockito.mock(CollectionAO.class); - Mockito.when(collectionAO.findByAbsolutePath(collName)).thenReturn( - collection); + Mockito.when(collectionAO.findByAbsolutePath(collName)).thenReturn(collection); - Mockito.when(collectionAO.findMetadataValuesForCollection(collName)) - .thenReturn(avus); + Mockito.when(collectionAO.findMetadataValuesForCollection(collName)).thenReturn(avus); - Mockito.when(irodsAccessObjectFactory.getCollectionAO(irodsAccount)) - .thenReturn(collectionAO); + Mockito.when(irodsAccessObjectFactory.getCollectionAO(irodsAccount)).thenReturn(collectionAO); - DataProfileService dataProfileService = new DataProfileServiceImpl( - irodsAccessObjectFactory, irodsAccount, resolutionService); + DataProfileService dataProfileService = new DataProfileServiceImpl(irodsAccessObjectFactory, irodsAccount, + resolutionService); @SuppressWarnings("unchecked") - DataProfile actual = dataProfileService - .retrieveDataProfile(collName); + DataProfile actual = dataProfileService.retrieveDataProfile(collName); Assert.assertNotNull("null dataProfle", actual); Assert.assertNotNull("no collection", actual.getDomainObject()); Assert.assertFalse("should not be file", actual.isFile()); Assert.assertTrue("shoudl be starred", actual.isStarred()); Assert.assertTrue("should be shared", actual.isShared()); - Assert.assertNotNull("should have collection parent", - actual.getParentPath()); - Assert.assertFalse("should have collection parent", actual - .getParentPath().isEmpty()); + Assert.assertNotNull("should have collection parent", actual.getParentPath()); + Assert.assertFalse("should have collection parent", actual.getParentPath().isEmpty()); Assert.assertNotNull("should have child name", actual.getChildName()); - Assert.assertFalse("should have child name", actual.getChildName() - .isEmpty()); + Assert.assertFalse("should have child name", actual.getChildName().isEmpty()); - Assert.assertNotNull("should have path components", - actual.getPathComponents()); - Assert.assertFalse("should have path components", actual - .getPathComponents().isEmpty()); + Assert.assertNotNull("should have path components", actual.getPathComponents()); + Assert.assertFalse("should have path components", actual.getPathComponents().isEmpty()); } diff --git a/data-profile/src/test/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImplTest.java b/data-profile/src/test/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImplTest.java index 5f02dd628..4537384f5 100644 --- a/data-profile/src/test/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImplTest.java +++ b/data-profile/src/test/java/org/irods/jargon/dataprofile/DataTypeResolutionServiceImplTest.java @@ -17,67 +17,53 @@ public class DataTypeResolutionServiceImplTest { @Test - public void testresolveDataTypeWithProvidedAvuAndDataObjectValueFromAVU() - throws Exception { + public void testresolveDataTypeWithProvidedAvuAndDataObjectValueFromAVU() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.txt"; dataObject.setDataName(dataName); - MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData - .instance(MetadataDomain.DATA, "1", "blah", 0, - "application/xml", "", - UserTaggingConstants.MIME_TYPE_AVU_UNIT); + MetaDataAndDomainData metaDataAndDamainData = MetaDataAndDomainData.instance(MetadataDomain.DATA, "1", "blah", + 0, "application/xml", "", UserTaggingConstants.MIME_TYPE_AVU_UNIT); List avus = new ArrayList(); avus.add(metaDataAndDamainData); - String actual = resolutionService - .resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); - Assert.assertEquals("didn't get mime type from AVU", "application/xml", - actual); + String actual = resolutionService.resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); + Assert.assertEquals("didn't get mime type from AVU", "application/xml", actual); } @Test - public void testresolveDataTypeWithProvidedAvuAndDataObjectValueNoAVU() - throws Exception { + public void testresolveDataTypeWithProvidedAvuAndDataObjectValueNoAVU() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.txt"; dataObject.setDataName(dataName); List avus = new ArrayList(); - String actual = resolutionService - .resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); - Assert.assertEquals("didn't get mime type from tika", "text/plain", - actual); + String actual = resolutionService.resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); + Assert.assertEquals("didn't get mime type from tika", "text/plain", actual); } @Test public void testGetDataTypeFromExtension() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.txt"; dataObject.setDataName(dataName); @@ -89,26 +75,22 @@ public void testGetDataTypeFromExtension() throws Exception { } @Test - public void testresolveDataTypeWithProvidedAvuAndDataObjectValueNoAVUAsIrodsRule() - throws Exception { + public void testresolveDataTypeWithProvidedAvuAndDataObjectValueNoAVUAsIrodsRule() throws Exception { - IRODSAccount irodsAccount = TestingPropertiesHelper - .buildBogusIrodsAccount(); - IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito - .mock(IRODSAccessObjectFactory.class); + IRODSAccount irodsAccount = TestingPropertiesHelper.buildBogusIrodsAccount(); + IRODSAccessObjectFactory irodsAccessObjectFactory = Mockito.mock(IRODSAccessObjectFactory.class); - DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl( - irodsAccessObjectFactory, irodsAccount); + DataTypeResolutionService resolutionService = new DataTypeResolutionServiceImpl(irodsAccessObjectFactory, + irodsAccount); DataObject dataObject = new DataObject(); String dataName = "file.r"; dataObject.setDataName(dataName); List avus = new ArrayList(); - String actual = resolutionService - .resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); - Assert.assertEquals("didn't get mime type as rule", - DataTypeResolutionServiceImpl.APPLICATION_IRODS_RULE, actual); + String actual = resolutionService.resolveDataTypeWithProvidedAvuAndDataObject(dataObject, avus); + Assert.assertEquals("didn't get mime type as rule", DataTypeResolutionServiceImpl.APPLICATION_IRODS_RULE, + actual); } diff --git a/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/AllTests.java b/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/AllTests.java index ca2af0f88..ed4559f10 100644 --- a/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/AllTests.java +++ b/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/AllTests.java @@ -6,8 +6,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) -@Suite.SuiteClasses({ DataProfileServiceImplTest.class, - DataTypeResolutionServiceImplTest.class }) +@Suite.SuiteClasses({ DataProfileServiceImplTest.class, DataTypeResolutionServiceImplTest.class }) public class AllTests { } diff --git a/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/package-info.java b/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/package-info.java index 67349ebaf..edd809d8c 100644 --- a/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/package-info.java +++ b/data-profile/src/test/java/org/irods/jargon/dataprofile/unittest/package-info.java @@ -1,5 +1,6 @@ /** * Unit test utils and suites + * * @author Mike Conway - DICE * */ diff --git a/jargon-core/pom.xml b/jargon-core/pom.xml index 405e01cf5..2ca31de6f 100644 --- a/jargon-core/pom.xml +++ b/jargon-core/pom.xml @@ -3,7 +3,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE 4.0.0 org.irods.jargon diff --git a/jargon-core/src/main/java/org/irods/jargon/core/connection/DiscoveredServerPropertiesCache.java b/jargon-core/src/main/java/org/irods/jargon/core/connection/DiscoveredServerPropertiesCache.java index 65d5dc299..6ec2eb516 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/connection/DiscoveredServerPropertiesCache.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/connection/DiscoveredServerPropertiesCache.java @@ -186,7 +186,7 @@ public String retrieveValue(final String host, final String zoneName, final Stri * {@link String} with the hostname * @param zoneName * {@link String} with the zone name - * + * */ public void deleteCachedClientHints(final String host, final String zoneName) { @@ -401,7 +401,7 @@ public void cacheAProperty(final String host, final String zoneName, final Strin * @param zoneName * {@code String} with the name of the iRODS zone this applies to * return - * + * * @return {@code Map} with the cache for the host and zone */ private Map getCacheForHostAndZoneAndAddIfNotThere(final String host, final String zoneName) { diff --git a/jargon-core/src/main/java/org/irods/jargon/core/exception/NoMoreDataException.java b/jargon-core/src/main/java/org/irods/jargon/core/exception/NoMoreDataException.java index dff0a2fc0..0e2e422e0 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/exception/NoMoreDataException.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/exception/NoMoreDataException.java @@ -1,11 +1,11 @@ /** - * + * */ package org.irods.jargon.core.exception; /** * Exception caused by paging or requesting data when no more data is available - * + * * @author Mike Conway - DICE * */ @@ -13,27 +13,27 @@ public class NoMoreDataException extends JargonException { private static final long serialVersionUID = -2079619325335253964L; - public NoMoreDataException(String message) { + public NoMoreDataException(final String message) { super(message); } - public NoMoreDataException(String message, Throwable cause) { + public NoMoreDataException(final String message, final Throwable cause) { super(message, cause); } - public NoMoreDataException(Throwable cause) { + public NoMoreDataException(final Throwable cause) { super(cause); } - public NoMoreDataException(String message, Throwable cause, int underlyingIRODSExceptionCode) { + public NoMoreDataException(final String message, final Throwable cause, final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } - public NoMoreDataException(Throwable cause, int underlyingIRODSExceptionCode) { + public NoMoreDataException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } - public NoMoreDataException(String message, int underlyingIRODSExceptionCode) { + public NoMoreDataException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/InvalidDataException.java b/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/InvalidDataException.java index 6b2b93cea..bb814442f 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/InvalidDataException.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/InvalidDataException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.exception.dataformat; @@ -8,7 +8,7 @@ /** * General error with the format of encoded data (e.g. JSON, XML) coming out of * iRODS operations - * + * * @author Mike Conway - NIEHS * */ @@ -16,27 +16,27 @@ public class InvalidDataException extends JargonException { private static final long serialVersionUID = -5261028590640346561L; - public InvalidDataException(String message) { + public InvalidDataException(final String message) { super(message); } - public InvalidDataException(String message, Throwable cause) { + public InvalidDataException(final String message, final Throwable cause) { super(message, cause); } - public InvalidDataException(Throwable cause) { + public InvalidDataException(final Throwable cause) { super(cause); } - public InvalidDataException(String message, Throwable cause, int underlyingIRODSExceptionCode) { + public InvalidDataException(final String message, final Throwable cause, final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } - public InvalidDataException(Throwable cause, int underlyingIRODSExceptionCode) { + public InvalidDataException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } - public InvalidDataException(String message, int underlyingIRODSExceptionCode) { + public InvalidDataException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/package-info.java b/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/package-info.java index 685d3a45b..fb2c57e62 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/package-info.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/exception/dataformat/package-info.java @@ -1,10 +1,10 @@ /** - * + * */ /** * Exceptions with the format of data (e.g. json, xml, schema errors) coming * from iRODS - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/DataObjInpForQuerySpecColl.java b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/DataObjInpForQuerySpecColl.java index eaba9c848..fb8e101e1 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/DataObjInpForQuerySpecColl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/DataObjInpForQuerySpecColl.java @@ -70,17 +70,17 @@ public static final DataObjInpForQuerySpecColl instanceQueryDataObj(final String /** * Create the DataObjInp packing instruction to query data objects in special * collections with an offset - * + * * @param fileAbsolutePath * String with the file absolute path. * @param specColInfo * {@link SpecColInfo} with particulars about the query - * + * * @param offset * log with the offset value to skip ahead - * + * * @return DataObjInp containing the necessary packing instruction - * + * * @throws JargonException * {@code JargonException} */ @@ -138,7 +138,7 @@ public static final DataObjInpForQuerySpecColl instanceQueryCollections(final St /** * Create the DataObjInp packing instruction to query collections in special * collections with a paging offset - * + * * @param fileAbsolutePath * String with the file absolute path. * @param specColInfo diff --git a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/MiscApiConstants.java b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/MiscApiConstants.java index b4c0126da..c85ecc437 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/MiscApiConstants.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/MiscApiConstants.java @@ -1,11 +1,11 @@ /** - * + * */ package org.irods.jargon.core.packinstr; /** * Misc API number and other constants - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/StructFileExtAndRegInp.java b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/StructFileExtAndRegInp.java index e9b21ae6f..88f1cc9da 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/packinstr/StructFileExtAndRegInp.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/packinstr/StructFileExtAndRegInp.java @@ -241,13 +241,13 @@ public Tag getTagValue() throws JargonException { List kvps = new ArrayList(); - if (this.bundleType == BundleType.TAR || bundleType == BundleType.DEFAULT) { + if (bundleType == BundleType.TAR || bundleType == BundleType.DEFAULT) { kvps.add(KeyValuePair.instance(DATA_TYPE, TAR_DATA_TYPE_KW_VALUE)); - } else if (this.bundleType == BundleType.GZIP) { + } else if (bundleType == BundleType.GZIP) { kvps.add(KeyValuePair.instance(DATA_TYPE, GZIP_DATA_TYPE_KW_VALUE)); - } else if (this.bundleType == BundleType.BZIP) { + } else if (bundleType == BundleType.BZIP) { kvps.add(KeyValuePair.instance(DATA_TYPE, BZIP_DATA_TYPE_KW_VALUE)); - } else if (this.bundleType == BundleType.ZIP) { + } else if (bundleType == BundleType.ZIP) { kvps.add(KeyValuePair.instance(DATA_TYPE, ZIP_DATA_TYPE_KW_VALUE)); } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/protovalues/IcatTypeEnum.java b/jargon-core/src/main/java/org/irods/jargon/core/protovalues/IcatTypeEnum.java index 99c2d57bb..c25e67664 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/protovalues/IcatTypeEnum.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/protovalues/IcatTypeEnum.java @@ -1,11 +1,11 @@ /** - * + * */ package org.irods.jargon.core.protovalues; /** * Describes the type of db used as an ICAT - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkAVUOperationResponse.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkAVUOperationResponse.java index 2945a8c85..d4b213696 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkAVUOperationResponse.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkAVUOperationResponse.java @@ -27,13 +27,12 @@ public static BulkAVUOperationResponse instance(final ResultStatus resultStatus, final String message) { return new BulkAVUOperationResponse(resultStatus, avuData, message); } - - public static BulkAVUOperationResponse instance( - final ResultStatus resultStatus, final AvuData avuData, + + public static BulkAVUOperationResponse instance(final ResultStatus resultStatus, final AvuData avuData, final String message, final String path) { return new BulkAVUOperationResponse(resultStatus, avuData, message, path); } - + /** * */ @@ -54,12 +53,12 @@ private BulkAVUOperationResponse(final ResultStatus resultStatus, final AvuData this.avuData = avuData; this.resultStatus = resultStatus; this.message = message; - this.path = ""; + path = ""; } - - private BulkAVUOperationResponse(final ResultStatus resultStatus, - final AvuData avuData, final String message, final String path) { + + private BulkAVUOperationResponse(final ResultStatus resultStatus, final AvuData avuData, final String message, + final String path) { if (resultStatus == null) { throw new IllegalArgumentException("null resultStatus"); @@ -72,7 +71,7 @@ private BulkAVUOperationResponse(final ResultStatus resultStatus, if (message == null) { throw new IllegalArgumentException("null message"); } - + if (path == null) { throw new IllegalArgumentException("null path"); } @@ -84,7 +83,6 @@ private BulkAVUOperationResponse(final ResultStatus resultStatus, } - /** * @return the avuData */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAO.java index a928b8063..83d74350b 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAO.java @@ -118,7 +118,7 @@ void extractABundleIntoAnIrodsCollectionWithBulkOperationOptimization( * Given a tar file that exists in iRODS, extract the contents to the given * target directory. This is a no-bulk operation that will overwrite any * previously extracted files - * + * * @param absolutePathToBundleFileToBeCreatedOnIrods * String with the absolute path to the tar file in * iRODS to be extracted. @@ -144,7 +144,7 @@ void createABundleFromIrodsFilesAndStoreInIrodsWithForceOption(String absolutePa * Creates a bundle (tar) file to be stored in iRODS using the contents of the * specified collection. An optional (blank if not used) resource can be * specified to store the new bundle. This version is no-force. - * + * * @param absolutePathToBundleFileToBeCreatedOnIrods * String with the absolute path to a file on iRODS that * will store the created bundle. diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAOImpl.java index a04b004e8..921071657 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAOImpl.java @@ -22,7 +22,7 @@ public class BulkFileOperationsAOImpl extends IRODSGenericAO implements BulkFile /** * Get the extension typically associated with a bundle type - * + * * @param bundleType * {@link BundleType} for an iRODS bundle * @return {@code String} @@ -215,7 +215,7 @@ public void createABundleFromIrodsFilesAndStoreInIrodsWithForceOption( /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.BulkFileOperationsAO# * extractABundleIntoAnIrodsCollection(java.lang.String, java.lang.String, * java.lang.String) diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAO.java index 3aff34acb..edc668351 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAO.java @@ -369,7 +369,7 @@ List searchCollectionsAndDataObjectsBasedOn * @return {@code Object} that will be either a {@code DataObject} or * {@code Collection} object based on the object at the given absolute * path in iRODS. - * + * * @throws FileNotFoundException * if the given objectAbsolutePath does not exist * @throws JargonException @@ -606,7 +606,7 @@ List listDataObjectsAndCollectionsUnderPath /** * Given a parent path, get a total of the data sizes underneath that path - * + * * @param absolutePathToParent * String with the path to the parent collection, * children data objects are totaled @@ -630,9 +630,9 @@ List listDataObjectsAndCollectionsUnderPath * @param irodsAbsolutePath * {@code String} with the absolute path. * @return {@link ObjStat} associated witha path - * + * * @throws FileNotFoundException - * + * * if file is missing * @throws JargonException * {@link JargonException} @@ -642,7 +642,7 @@ ObjStat retrieveObjectStatForPathWithHeuristicPathGuessing(final String irodsAbs /** * List data objects underneath a given parent path - * + * * @param objStat * {@link ObjStat} that has already been obtained * @param partialStartIndex @@ -656,7 +656,7 @@ List listDataObjectsUnderPath(ObjStat objSt /** * List collections underneath a given parent path - * + * * @param objStat * {@link ObjStat} that has already been obtained * @param partialStartIndex @@ -673,7 +673,7 @@ List listCollectionsUnderPath(final ObjStat /** * Return a count of the number of collections under the path represented by the * objStat - * + * * @param objStat * {@link ObjStat} for the target collection * @return int with the collection count @@ -687,7 +687,7 @@ List listCollectionsUnderPath(final ObjStat /** * Return a count of the number of data objects under the path represented by * the objStat - * + * * @param objStat * {@link ObjStat} for the target collection * @return int with the data object count diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImpl.java index a778c434f..7ef16d060 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImpl.java @@ -53,9 +53,9 @@ * Note the comments in individual methods for details on behavior of these * methods across s federation, and with special collections (e.g. soft links, * mounted collections) supported. - * + * * @author Mike Conway - DICE (www.irods.org) - * + * */ public class CollectionAndDataObjectListAndSearchAOImpl extends IRODSGenericAO implements CollectionAndDataObjectListAndSearchAO { @@ -75,7 +75,7 @@ protected CollectionAndDataObjectListAndSearchAOImpl(final IRODSSession irodsSes log.warn("specific query is not supported on this server"); specificQueryAO = null; } - this.collectionListingUtils = new CollectionListingUtils(irodsAccount, this.getIRODSAccessObjectFactory()); + collectionListingUtils = new CollectionListingUtils(irodsAccount, getIRODSAccessObjectFactory()); } @Override @@ -312,8 +312,8 @@ public List listDataObjectsAndCollectionsUn MiscIRODSUtils.evaluateSpecCollSupport(objStat); - final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(this.getIRODSAccount(), - this.getIRODSAccessObjectFactory()); + final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(getIRODSAccount(), + getIRODSAccessObjectFactory()); final List entries = new ArrayList<>(); entries.addAll(collectionListingUtils.listCollectionsUnderPath(objStat, 0)); @@ -522,7 +522,7 @@ public long totalDataObjectSizesUnderPath(final String absolutePathToParent) /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO# * countCollectionsUnderPath(java.lang.String) */ @@ -786,7 +786,7 @@ private List listCollectionsUnderPathWithPe * List collections under a path, given that the objStat is known. *

* Handles soft links - * + * * @param absolutePathToParent * @param partialStartIndex * @param objStat @@ -1034,7 +1034,7 @@ public List listDataObjectsUnderPath(final /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO# * listDataObjectsUnderPath(org.irods.jargon.core.pub.domain.ObjStat, int) */ @@ -1048,8 +1048,8 @@ public List listDataObjectsUnderPath(final MiscIRODSUtils.evaluateSpecCollSupport(objStat); - final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(this.getIRODSAccount(), - this.getIRODSAccessObjectFactory()); + final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(getIRODSAccount(), + getIRODSAccessObjectFactory()); return collectionListingUtils.listDataObjectsUnderPath(objStat, partialStartIndex); @@ -1139,8 +1139,8 @@ private List listDataObjectsUnderPathWithPe /** * Given the objStat, list the data objects under the path and the associated * file permissions - * - * + * + * * @param absolutePathToParent * {@code String} with the original absolute path as requested. This * may not be the canonical path if this is a special collection @@ -1442,8 +1442,8 @@ public ObjStat retrieveObjectStatForPathWithHeuristicPathGuessing(final String i throw new IllegalArgumentException("null or empty irodsAbsolutePath"); } - final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(this.getIRODSAccount(), - this.getIRODSAccessObjectFactory()); + final CollectionListingUtils collectionListingUtils = new CollectionListingUtils(getIRODSAccount(), + getIRODSAccessObjectFactory()); ObjStat objStat = null; try { diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionListingUtils.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionListingUtils.java index 25ca30906..15b9b7a53 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionListingUtils.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionListingUtils.java @@ -41,9 +41,9 @@ /** * Generic utils (for the package) to do collection listings - * + * * @author Mike Conway - DICE (www.irods.org) - * + * */ class CollectionListingUtils { @@ -66,9 +66,9 @@ class CollectionListingUtils { * Phase 3 when path is /zone/home - for current zone - add a dir for the user * name, see if a public dir. For foreign zone, add a dir for user#homeZone and * see if a public dir - * - * - * + * + * + * * @param absolutePathToParent * {@code String} with the current parent * @return {@code List} of {@link CollectionAndDataObjectListingEntry} that has @@ -97,7 +97,7 @@ List handleNoListingUnderRootOrHomeByLookin /* * Phase1 - under root - * + * * Get a list of zones as subdirs */ @@ -148,7 +148,7 @@ List handleNoListingUnderRootOrHomeByLookin /** * Heuristic processing allows ObjStats to be returned (though fake) at points * in the hierarchy were strict ACLs would otherwise preclude - * + * * @param irodsAbsolutePath * {@code String} with the iRODS path * @return {@link ObjStat} @@ -178,7 +178,7 @@ ObjStat handleNoObjStatUnderRootOrHomeByLookingForPublicAndHome(final String iro /* * Phase1 - under root - * + * * Generate an objStat for root */ @@ -261,7 +261,7 @@ private List createStandInsUnderHomeInLogge StringBuilder sb = new StringBuilder(path); sb.append("/public"); ObjStat statForPublic; - CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = this.irodsAccessObjectFactory + CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory .getCollectionAndDataObjectListAndSearchAO(irodsAccount); try { statForPublic = collectionAndDataObjectListAndSearchAO.retrieveObjectStatForPath(sb.toString()); @@ -294,7 +294,7 @@ private List createStandInsUnderHomeInFeder sb.append("/"); sb.append(zone); sb.append("/home/public"); - CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = this.irodsAccessObjectFactory + CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory .getCollectionAndDataObjectListAndSearchAO(irodsAccount); try { @@ -388,7 +388,7 @@ private CollectionAndDataObjectListingEntry createStandInForPublicDir(final ObjS /** * Create a collection and listing entry for the home dir - * + * * @return */ private CollectionAndDataObjectListingEntry createStandInForUserDir(final ObjStat objStat) { @@ -415,7 +415,7 @@ private CollectionAndDataObjectListingEntry createStandInForUserDir(final ObjSta * List the collections underneath the given path *

* Works with soft links - * + * * @param objStat * {@link ObjStat} from iRODS that details the nature of the * collection @@ -426,8 +426,8 @@ private CollectionAndDataObjectListingEntry createStandInForUserDir(final ObjSta * {@link FileNotFoundException} * @throws JargonException * {@link JargonException} - * - * + * + * */ List listCollectionsUnderPath(final ObjStat objStat, final int partialStartIndex) throws FileNotFoundException, JargonException { @@ -450,7 +450,7 @@ List listCollectionsUnderPath(final ObjStat /* * Special collections are processed in different ways. - * + * * Listing for soft links substitutes the source path for the target path in the * query */ @@ -486,7 +486,7 @@ private List listUnderPathWhenSpecColl(fina specColInfo.setReplNum(objStat.getReplNumber()); specColInfo.setType(2); - if (this.irodsAccessObjectFactory.getIRODSServerProperties(this.irodsAccount).isAtLeastIrods410()) { + if (irodsAccessObjectFactory.getIRODSServerProperties(irodsAccount).isAtLeastIrods410()) { specColInfo.setUseResourceHierarchy(true); } @@ -780,7 +780,7 @@ private List listDataObjectsUnderPathViaGen /** * Use the data in the objStat, in the case of special collections, to augment * the entry for a collection - * + * * @param objStat * {@link ObjStat} retreived for the parent directory * @param effectiveAbsolutePath @@ -912,7 +912,7 @@ long queryDataObjectSizesUnderPath(final String effectiveAbsolutePath) /** * Given an objStat, get the count of collections under the path - * + * * @param objStat * {@link ObjStat} * @return int with the total collections under a given path @@ -1021,7 +1021,7 @@ int queryDataObjectCountsUnderPath(final String effectiveAbsolutePath) * @throws JargonException * {@link JargonException} */ - CollectionListingUtils(IRODSAccount irodsAccount, IRODSAccessObjectFactory irodsAccessObjectFactory) + CollectionListingUtils(final IRODSAccount irodsAccount, final IRODSAccessObjectFactory irodsAccessObjectFactory) throws JargonException { super(); @@ -1040,7 +1040,7 @@ int queryDataObjectCountsUnderPath(final String effectiveAbsolutePath) /** * Retrieve an iRODS ObjStat object for the given iRODS path - * + * * @param irodsAbsolutePath * String with an absolute path to an irods object * @return {@link ObjStat} from iRODS diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAO.java index 76138c528..50c4e1f7a 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAO.java @@ -16,9 +16,9 @@ * say 'page forward' and delegate all of the head-scratching about how to * accomplish that to this service, which you will love, because that sucks to * manage mostly. - * + * * @author Mike Conway - DICE - * + * */ public interface CollectionPagerAO { @@ -33,9 +33,9 @@ public interface CollectionPagerAO { * {@link PagingAwareCollectionListingDescriptor} can be extracted from the * listing (to save memory storing the whole listing in some state keeping * mechanism) to help manage paging. - * - * - * + * + * + * * @param irodsAbsolutePath * String with the iRODS absolute path of the parent * collection @@ -56,7 +56,7 @@ public abstract PagingAwareCollectionListing retrieveFirstPageUnderParent(String * PagingAwareCollectionListingDescriptor, page forwards. This will * give the next page of whatever (collections, data objects) are available, and * if need be page across the Collections/Data Objects boundary. - * + * * @param lastListingDescriptor * {@link PagingAwareCollectionListingDescriptor} from the previous * page, as retained by the client. This keeps state of the position diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAOImpl.java index 200199b55..e9a2d6e2e 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/CollectionPagerAOImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.pub; @@ -20,9 +20,9 @@ /** * Improved facility to list under a parent collection in a manner that supports * paging by clients - * + * * @author Mike Conway - DICE - * + * */ public class CollectionPagerAOImpl extends IRODSGenericAO implements CollectionPagerAO { @@ -34,11 +34,11 @@ public CollectionPagerAOImpl(final IRODSSession irodsSession, final IRODSAccount throws JargonException { super(irodsSession, irodsAccount); - this.getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(irodsAccount); + getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(irodsAccount); - this.getIRODSAccessObjectFactory().getDataObjectAO(getIRODSAccount()); - this.getIRODSAccessObjectFactory().getCollectionAO(getIRODSAccount()); - this.collectionAndDataObjectListAndSearchAO = this.getIRODSAccessObjectFactory() + getIRODSAccessObjectFactory().getDataObjectAO(getIRODSAccount()); + getIRODSAccessObjectFactory().getCollectionAO(getIRODSAccount()); + collectionAndDataObjectListAndSearchAO = getIRODSAccessObjectFactory() .getCollectionAndDataObjectListAndSearchAO(getIRODSAccount()); } @@ -137,7 +137,7 @@ private PagingAwareCollectionListing pageForwardInCollections( /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.CollectionPagerAO#retrieveFirstPageUnderParent * (java.lang.String) */ @@ -171,7 +171,7 @@ public PagingAwareCollectionListing retrieveFirstPageUnderParent(final String ir .setCollectionAndDataObjectListingEntries(listAndCount.getCollectionAndDataObjectListingEntries()); if (listAndCount.getCollectionAndDataObjectListingEntries().isEmpty() - || listAndCount.getCountThisPage() + 1 < this.getJargonProperties().getMaxFilesAndDirsQueryMax()) { + || listAndCount.getCountThisPage() + 1 < getJargonProperties().getMaxFilesAndDirsQueryMax()) { log.info("collections are empty or less then max, so get data objects"); addDataObjectsToExistingListing(pagingAwareCollectionListing); @@ -200,13 +200,13 @@ private void addDataObjectsToExistingListing(final PagingAwareCollectionListing /* * Wraps the provided path as a descriptor for initially obtaining the first * page - * + * * @param irodsAbsolutePath - * + * * @return - * + * * @throws FileNotFoundException - * + * * @throws JargonException */ private PagingAwareCollectionListing obtainObjStatAndBuildSkeletonPagingAwareCollectionListing( diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataAOHelper.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataAOHelper.java index b55d2577c..46627e408 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataAOHelper.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataAOHelper.java @@ -87,7 +87,7 @@ public final class DataAOHelper extends AOHelper { } /** - * <<<<<<< HEAD ======= Create a set of selects for a data object, used in + * Create a set of selects for a data object, used in * general query. * * @param builder diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectAOImpl.java index a68cb29a6..c54c60cc6 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectAOImpl.java @@ -166,14 +166,7 @@ public DataObject findByCollectionNameAndDataName(final String collectionPath, f } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * ======= >>>>>>> master - * - * @see - * org.irods.jargon.core.pub.DataObjectAO#findByAbsolutePath(java.lang.String ) - */ + @Override public DataObject findByAbsolutePath(final String absolutePath) throws FileNotFoundException, JargonException { @@ -341,7 +334,7 @@ public DataObject findGivenObjStat(final ObjStat objStat) throws DataNotFoundExc * listener, then the {@code TransferStatusCallbackListener} will receive a * message asking for the overwrite option for this transfer operation. This is * the appropriate mode when the client is interactive. - * + * * * @param localFile * {@code File} with a source file or directory in the local file @@ -349,7 +342,7 @@ public DataObject findGivenObjStat(final ObjStat objStat) throws DataNotFoundExc * @param irodsFileDestination * {@link IRODSFile} that is the target of the data transfer * @param transferControlBlock - * + * * {@link TransferControlBlock} that will control aspects of the data * transfer. Note that the {@link TransferOptions} that are a member * of the {@code TransferControlBlock} may be specified here to pass @@ -449,7 +442,7 @@ void putLocalDataObjectToIRODS(final File localFile, final IRODSFile irodsFileDe * listener, then the {@code TransferStatusCallbackListener} will receive a * message asking for the overwrite option for this transfer operation. This is * the appropriate mode when the client is interactive. - * + * * * @param localFile * {@code File} with a source file or directory in the local file @@ -1789,17 +1782,7 @@ public List addBulkAVUMetadataToDataObject(final Strin return responses; } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.DataObjectAO# - * deleteBulkAVUMetadataFromDataObject (java.lang.String, java.util.List) - * ======= - * - * @see - * org.irods.jargon.core.pub.DataObjectAO#deleteBulkAVUMetadataFromDataObject - * (java.lang.String, java.util.List) >>>>>>> master - */ + @Override public List deleteBulkAVUMetadataFromDataObject(final String absolutePath, final List avuData) throws JargonException { @@ -3010,17 +2993,7 @@ public void setAccessPermission(final String zone, final String absolutePath, fi } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.DataObjectAO# - * setAccessPermissionWriteInAdminMode (java.lang.String, java.lang.String, - * java.lang.String) ======= - * - * @see - * org.irods.jargon.core.pub.DataObjectAO#setAccessPermissionWriteInAdminMode - * (java.lang.String, java.lang.String, java.lang.String) >>>>>>> master - */ + @Override public void setAccessPermissionWriteInAdminMode(final String zone, final String absolutePath, final String userName) throws JargonException { @@ -3710,17 +3683,7 @@ public List listReplicationsForFileInResGroup(String collectionAbsPa } } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.DataObjectAO# - * getPermissionForDataObjectForUserName (java.lang.String, java.lang.String) - * ======= - * - * @see - * org.irods.jargon.core.pub.DataObjectAO#getPermissionForDataObjectForUserName - * (java.lang.String, java.lang.String) >>>>>>> master - */ + @Override public UserFilePermission getPermissionForDataObjectForUserName(final String irodsAbsolutePath, final String userName) throws JargonException { diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectChecksumUtilitiesAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectChecksumUtilitiesAO.java index 9785da893..50666f55c 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectChecksumUtilitiesAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataObjectChecksumUtilitiesAO.java @@ -38,7 +38,7 @@ ChecksumValue retrieveExistingChecksumForDataObject(String irodsDataObjectAbsolu ChecksumValue computeChecksumValueFromIrodsData(String irodsValue) throws JargonException; /** - * + * * Given a data object in iRODS, compute its checksum using the defaut algo and * return it. The algo is determined by iRODS policy * diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperations.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperations.java index e59e0aee8..ff5039121 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperations.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperations.java @@ -90,7 +90,7 @@ public interface DataTransferOperations extends IRODSAccessObject { * Transfer a file between iRODS resources * * @param absolutePathToSourceFile - * + * * {@code String} with the absolute path to the source file in iRODS. * @param targetResource * {@code String} with the target resource name iRODS. @@ -123,7 +123,7 @@ void physicalMove(final String absolutePathToSourceFile, final String targetReso * @param absolutePathToSourceFile * {@code String} with the absolute path to the source file. * @param absolutePathToTargetFile - * + * * {@code String} with the absolute path to the target of the move. * @throws JargonException * for iRODS error @@ -246,7 +246,7 @@ void getOperation(final IRODSFile irodsSourceFile, final File targetLocalFile, * @param sourceResourceName * {@code String} with the optional resource from which the file will * be obtained. This should be left blank if not specified (not null) - * + * * @param transferStatusCallbackListener * {@link org.irods.jargon.core.transfer.TransferStatusCallbackListener} * implementation that will receive call-backs indicating the @@ -309,7 +309,7 @@ void replicate(final String irodsFileAbsolutePath, final String targetResource, * @param irodsSourceFileAbsolutePath * {@code String} with the absolute path to the source collection or * data object. This will be copied up to the target - * + * * @param targetResource * {@code String} with the optional (blank if not specified) resource * to which the file or collection will be copied @@ -436,7 +436,7 @@ void move(IRODSFile irodsSourceFile, IRODSFile irodsTargetFile) * listener, then the {@code TransferStatusCallbackListener} will receive a * message asking for the overwrite option for this transfer operation. This is * the appropriate mode when the client is interactive. - * + * * * @param irodsSourceFileAbsolutePath * {@code String} with the absolute path to the source file or @@ -448,7 +448,7 @@ void move(IRODSFile irodsSourceFile, IRODSFile irodsTargetFile) * {@code String} with the absolute path to the target file or * collection in iRODS. * @param transferControlBlock - * + * * {@link TransferControlBlock} that will control aspects of the data * transfer. Note that the {@link TransferOptions} that are a member * of the {@code TransferControlBlock} may be specified here to pass @@ -475,13 +475,13 @@ void copy(String irodsSourceFileAbsolutePath, String targetResource, String irod * Copy a file or collection from one iRODS location to another. This is the * preferred method signature for copy operations, with other forms now * deprecated. Note that the {@code transferControlBlock} and - * + * * {@code TransferStatusCallbackListener} objects are optional and may be set to * {@code null} if not required. *

* Note that this operation can handle a single data object, or a collection. *

- * + * * If the {@code TransferOptions} specified in the {@code TransferControlBlock} * indicates no force, then an attempted overwrite will throw the * {@code OverwriteException}. If the transfer option is set to ask the callback @@ -496,7 +496,7 @@ void copy(String irodsSourceFileAbsolutePath, String targetResource, String irod * {@link org.irods.jargon.core.pub.io.IRODSFile} that points to the * target of the copy operation. * @param transferControlBlock - * + * * {@link TransferControlBlock} that will control aspects of the data * transfer. Note that the {@link TransferOptions} that are a member * of the {@code TransferControlBlock} may be specified here to pass @@ -525,7 +525,7 @@ void copy(IRODSFile irodsSourceFile, IRODSFile irodsTargetFile, *

* This means that renaming from source xxx/yyy/zzz to target xxx/yyy/rrr will * result in xxx/yyy/rrr as the new path of the source file - * + * * @param sourceFileAbsolutePath * {@code String} * @param targetFileAbsolutePath diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperationsImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperationsImpl.java index 0dedaf640..5a5a9e957 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperationsImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/DataTransferOperationsImpl.java @@ -181,8 +181,8 @@ public void rename(final String sourceFileAbsolutePath, final String targetFileA log.info("rename() from {}", sourceFileAbsolutePath); log.info("to {}", targetFileAbsolutePath); - IRODSFile sourceFile = this.getIRODSFileFactory().instanceIRODSFile(sourceFileAbsolutePath); - IRODSFile targetFile = this.getIRODSFileFactory().instanceIRODSFile(targetFileAbsolutePath); + IRODSFile sourceFile = getIRODSFileFactory().instanceIRODSFile(sourceFileAbsolutePath); + IRODSFile targetFile = getIRODSFileFactory().instanceIRODSFile(targetFileAbsolutePath); sourceFile.renameTo(targetFile); } @@ -891,7 +891,7 @@ private void preCountLocalFilesBeforeTransfer(final File sourceFile, * {@link IRODSFile} * @param transferStatusCallbackListener * {@link org.irods.jargon.core.transfer.TransferStatusCallbackListener} - * <<<<<<< HEAD implementation that will receive callbacks of + * implementation that will receive callbacks of * success/failure of each individual file transfer. This may be set * to {@code null}, in which case, exceptions that are thrown will be * rethrown by this method to the caller. @@ -899,17 +899,14 @@ private void preCountLocalFilesBeforeTransfer(final File sourceFile, * {@link org.irods.jargon.core.transfer.TransferControlBlock} * implementation that is the communications mechanism between the * initiator of the transfer and the transfer process. This may be - * set to {@code null} if those facilities are not needed. ======= - * implementation that will receive callbacks of success/failure of - * each individual file transfer. This may be set to {@code null}, in + * set to {@code null} if those facilities are not needed. This may be set to {@code null}, in * which case, exceptions that are thrown will be rethrown by this * method to the caller. * @param transferControlBlock * {@link org.irods.jargon.core.transfer.TransferControlBlock} * implementation that is the communications mechanism between the * initiator of the transfer and the transfer process. This may be - * set to {@code null} if those facilities are not needed. >>>>>>> - * origin/master + * set to {@code null} if those facilities are not needed. * @param je * {@link JargonException} that was the error * @throws JargonException @@ -955,14 +952,10 @@ private void processExceptionDuringPutOperation(final File sourceFile, final IRO * of the transfer. * @param transferStatusCallbackListener * {@link org.irods.jargon.core.transfer.TransferStatusCallbackListener} - * <<<<<<< HEAD implementation that will receive callbacks of + * HEAD implementation that will receive callbacks of * success/failure of each individual file transfer. This may be set * to {@code null}, in which case, exceptions that are thrown will be - * re-thrown by this method to the caller. ======= implementation - * that will receive callbacks of success/failure of each individual - * file transfer. This may be set to {@code null}, in which case, - * exceptions that are thrown will be re-thrown by this method to the - * caller. >>>>>>> origin/master + * re-thrown by this method to the caller. * @param transferControlBlock * {@link org.irods.jargon.core.transfer.TransferControlBlock} * implementation that is the communications mechanism between the diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAO.java index c2b127e8d..d8f76860d 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAO.java @@ -84,7 +84,7 @@ public interface EnvironmentalInfoAO extends IRODSAccessObject { * the {@link IRODSServerProperties} object and does simple caching to reduce * traffic to iRODS. A refresh flag will force the data to be updated and * re-cached. - * + * * @param refresh * boolean to refresh any cached value * @return {@link ClientHints} describing the iRODS server or null diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAOImpl.java index efefdb8ba..b43aa6dbd 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/EnvironmentalInfoAOImpl.java @@ -109,14 +109,14 @@ public ClientHints retrieveClientHints(final boolean refresh) throws JargonExcep log.info("first look in cache if not a refresh"); if (!refresh) { - clientHints = this.getIRODSSession().getDiscoveredServerPropertiesCache() - .retrieveClientHints(this.getIRODSAccount().getHost(), this.getIRODSAccount().getZone()); + clientHints = getIRODSSession().getDiscoveredServerPropertiesCache() + .retrieveClientHints(getIRODSAccount().getHost(), getIRODSAccount().getZone()); } if (clientHints == null) { log.info("is a refresh, or hints not found"); - if (this.getIRODSServerProperties().isAtLeastIrods410()) { + if (getIRODSServerProperties().isAtLeastIrods410()) { log.info("going to the server for hints"); Tag response = getIRODSProtocol().irodsFunction(IRODSConstants.RODS_API_REQ, "", MiscApiConstants.CLIENT_HINTS_API_NBR); @@ -127,8 +127,8 @@ public ClientHints retrieveClientHints(final boolean refresh) throws JargonExcep ClientHintsTransform transformer = new ClientHintsTransform(); log.info("refreshing or retrieving new client hints"); clientHints = transformer.clientHintsFromIrodsJson(buf.getStringValue()); - this.getIRODSSession().getDiscoveredServerPropertiesCache().cacheClientHints( - this.getIRODSAccount().getHost(), this.getIRODSAccount().getZone(), clientHints); + getIRODSSession().getDiscoveredServerPropertiesCache().cacheClientHints(getIRODSAccount().getHost(), + getIRODSAccount().getZone(), clientHints); } else { log.info("no client hints available"); } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/FileCatalogObjectAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/FileCatalogObjectAO.java index 0515aa965..043e5651a 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/FileCatalogObjectAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/FileCatalogObjectAO.java @@ -29,7 +29,7 @@ public interface FileCatalogObjectAO extends IRODSAccessObject { * @param resourceName * {@code String} that contains the resource name, or blank if not * used - * + * * @return {@code String} with the iRODS host name that should be used to * connect, or null if no reconnect host is needed. * @throws JargonException @@ -49,7 +49,7 @@ public interface FileCatalogObjectAO extends IRODSAccessObject { * @param resourceName * {@code String} that contains the resource name, or blank if not * used - * + * * @return {@code String} with the iRODS host name that should be used to * connect, or null if no reconnect host is needed. * @throws JargonException @@ -92,7 +92,7 @@ public interface FileCatalogObjectAO extends IRODSAccessObject { * An example would be as a result of creating a new file or folder, where the * created object needs to be inserted into a cached representation of directory * contents. - * + * * @param irodsAbsolutePath * String with the absolute path to the iRODS file * @return {@link CollectionAndDataObjectListingEntry} associated with the p;ath diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactory.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactory.java index c0c2157bb..4539231b8 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactory.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactory.java @@ -548,7 +548,7 @@ AuthResponse authenticateIRODSAccountUtilizingCachedConnectionIfPresent(IRODSAcc /** * Service for pagable collection listings - * + * * @param irodsAccount * {@IRODSAccount} with the authenticating principal * @return {@link CollectionPagerAO} diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactoryImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactoryImpl.java index c26902710..ba3987331 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactoryImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSAccessObjectFactoryImpl.java @@ -399,7 +399,7 @@ public CollectionPagerAO getCollectionPagerAO(final IRODSAccount irodsAccount) t /* * (non-Javadoc) - * + * * @see * org.irods.jargon.core.pub.IRODSAccessObjectFactory#getRuleProcessingAO(org. * irods.jargon.core.connection.IRODSAccount) diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSFileSystemAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSFileSystemAOImpl.java index 25e63138e..b3db0d6c1 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSFileSystemAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSFileSystemAOImpl.java @@ -151,7 +151,7 @@ public boolean isFileExecutable(final IRODSFile irodsFile) throws JargonExceptio * * @param irodsFile * {@link IRODSFile} to check - * + * * @return {@code boolean} of {@code true} if file is data object, exists, and * is executable * @throws JargonException diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSGenericAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSGenericAO.java index 05781d4e3..d5f31e22e 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSGenericAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/IRODSGenericAO.java @@ -57,7 +57,7 @@ public IRODSGenericAO(final IRODSSession irodsSession, final IRODSAccount irodsA this.irodsSession = irodsSession; this.irodsAccount = irodsAccount; - instrumented = this.getIRODSSession().getJargonProperties().isInstrument(); + instrumented = getIRODSSession().getJargonProperties().isInstrument(); log.debug("establishing connection"); irodsSession.currentConnection(irodsAccount); diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/ListAndCount.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/ListAndCount.java index 7baff2076..bdd5fc933 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/ListAndCount.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/ListAndCount.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.pub; @@ -9,7 +9,7 @@ /** * Utility class used to characterize listings - * + * * @author Mike Conway - DICE * */ @@ -31,7 +31,7 @@ public int getCountTotal() { * @param countTotal * the countTotal to set */ - public void setCountTotal(int countTotal) { + public void setCountTotal(final int countTotal) { this.countTotal = countTotal; } @@ -47,7 +47,7 @@ public List getCollectionAndDataObjectListi * the collectionAndDataObjectListingEntries to set */ public void setCollectionAndDataObjectListingEntries( - List collectionAndDataObjectListingEntries) { + final List collectionAndDataObjectListingEntries) { this.collectionAndDataObjectListingEntries = collectionAndDataObjectListingEntries; } @@ -62,7 +62,7 @@ public int getCountThisPage() { * @param countThisPage * the countThisPage to set */ - public void setCountThisPage(int countThisPage) { + public void setCountThisPage(final int countThisPage) { this.countThisPage = countThisPage; } @@ -77,7 +77,7 @@ public boolean isEndOfRecords() { * @param endOfRecords * the endOfRecords to set */ - public void setEndOfRecords(boolean endOfRecords) { + public void setEndOfRecords(final boolean endOfRecords) { this.endOfRecords = endOfRecords; } @@ -92,13 +92,13 @@ public int getOffsetStart() { * @param offsetStart * the offsetStart to set */ - public void setOffsetStart(int offsetStart) { + public void setOffsetStart(final int offsetStart) { this.offsetStart = offsetStart; } /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override @@ -117,8 +117,7 @@ public String toString() { if (collectionAndDataObjectListingEntries != null) { builder.append("collectionAndDataObjectListingEntries="); builder.append(collectionAndDataObjectListingEntries.subList(0, - Math.min(collectionAndDataObjectListingEntries.size(), - maxLen))); + Math.min(collectionAndDataObjectListingEntries.size(), maxLen))); } builder.append("]"); return builder.toString(); diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/RemoteExecutionOfCommandsAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/RemoteExecutionOfCommandsAO.java index 9f46beeb3..c9959ac1f 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/RemoteExecutionOfCommandsAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/RemoteExecutionOfCommandsAO.java @@ -44,7 +44,7 @@ InputStream executeARemoteCommandAndGetStreamGivingCommandNameAndArgs(final Stri * @param executionHost * {@code String} with the name of the host on which to run the * command - * + * * @return {@code InputStream} with the results of the command invocation. * @throws JargonException * for iRODS error diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAO.java index 86ae9829a..3b2dac414 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAO.java @@ -66,7 +66,7 @@ void streamToStreamCopy(InputStream inputStream, OutputStream outputStream) * Transfer the contents of a stream to a given file. Note that this method will * detect if the target file is an {@code IRODSFile}, and in that case, it will * properly handle the transfer via iRODS. - * + * *

* Transfers are done in this method by doing a normal copy between java.io * streams. @@ -78,7 +78,7 @@ void streamToStreamCopy(InputStream inputStream, OutputStream outputStream) * Note that the {@code inputStream} will be buffered if it is not passed in as * a buffered stream, using the characteristics described in jargon.properties. * - * + * * @param inputStream * {@link InputStream} for the transfer, note that this method does * not wrap the stream with any buffering, so a properly buffered diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAOImpl.java index 68210753f..7f1f72460 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/Stream2StreamAOImpl.java @@ -49,7 +49,7 @@ public Stream2StreamAOImpl(final IRODSSession irodsSession, final IRODSAccount i /* * (non-Javadoc) - * + * * @see * org.irods.jargon.core.pub.Stream2StreamAO#streamBytesToIRODSFile(byte[],org. * irods.jargon.core.pub.io.IRODSFile) @@ -94,7 +94,7 @@ public void streamBytesToIRODSFile(final byte[] bytesToStream, final IRODSFile i /* * (non-Javadoc) - * + * * @see * org.irods.jargon.core.pub.Stream2StreamAO#transferStreamToFileUsingIOStreams * (java.io.InputStream, java.io.File, long, int) @@ -240,7 +240,7 @@ public TransferStatistics transferStreamToFileUsingIOStreams(final InputStream i /* * (non-Javadoc) - * + * * @see * org.irods.jargon.core.pub.Stream2StreamAO#streamToStreamCopyUsingStandardIO * (java.io.InputStream, java.io.OutputStream) @@ -325,7 +325,7 @@ public TransferStatistics streamToStreamCopyUsingStandardIO(final InputStream in /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.Stream2StreamAO#streamToStreamCopy(java.io. * InputStream, java.io.OutputStream) */ @@ -362,15 +362,7 @@ public void streamToStreamCopy(final InputStream inputStream, final OutputStream } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.Stream2StreamAO#streamFileToByte(org.irods. - * ======= - * - * @see org.irods.jargon.core.pub.Stream2StreamAO#streamFileToByte(org.irods. - * >>>>>>> origin/master jargon.core.pub.io.IRODSFile) - */ + @Override public byte[] streamFileToByte(final IRODSFile irodsFile) throws JargonException { @@ -411,7 +403,7 @@ public byte[] streamFileToByte(final IRODSFile irodsFile) throws JargonException /* * (non-Javadoc) - * + * * @see * org.irods.jargon.core.pub.Stream2StreamAO#streamClasspathResourceToIRODSFile * (java.lang.String, java.lang.String) diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAO.java index dedadfbba..a2e0ad227 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAO.java @@ -361,7 +361,7 @@ void changeAUserPasswordByThatUser(String userName, String currentPassword, Stri /** * Find users using a like query with a given name. Blank queries will return * all users - * + * * @param userName * String with a partial search * @return List of {@link User} diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAOImpl.java index c3d207d0a..03893fb7c 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserAOImpl.java @@ -70,15 +70,7 @@ protected UserAOImpl(final IRODSSession irodsSession, final IRODSAccount irodsAc super(irodsSession, irodsAccount); } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#listUserMetadataForUserId(java.lang. - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#listUserMetadataForUserId(java.lang. - * >>>>>>> origin/master String) - */ + @Override public List listUserMetadataForUserId(final String userId) throws JargonException { @@ -133,15 +125,7 @@ public List listUserMetadataForUserId(final String userId) throws Jargo } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#listUserMetadataForUserName(java.lang - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#listUserMetadataForUserName(java.lang - * >>>>>>> origin/master .String) - */ + @Override public List listUserMetadataForUserName(final String userName) throws JargonException { @@ -190,7 +174,7 @@ public List listUserMetadataForUserName(final String userName) throws J /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.accessobject.UserAO#addUser(org.irods.jargon.core * .domain.User) */ @@ -245,7 +229,7 @@ public User addUser(final User user) throws JargonException, DuplicateDataExcept /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findAll() */ @Override @@ -285,7 +269,7 @@ public List findAll() throws JargonException { /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findWhere(java.lang.String) */ @Override @@ -333,7 +317,7 @@ public List findWhere(final String whereStatement) throws JargonException /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findById(java.lang.String) */ @Override @@ -358,7 +342,7 @@ public String findUserDNByUserName(final String userName) throws JargonException /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findByIdInZone(java.lang.String, * java.lang.String) */ @@ -417,7 +401,7 @@ public User findByIdInZone(final String userId, final String zone) throws Jargon /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findByName(java.lang.String) */ @Override @@ -489,7 +473,7 @@ public User findByName(final String userName) throws JargonException, DataNotFou /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#findUserNameLike(java.lang.String) */ @Override @@ -591,15 +575,7 @@ public List findUsersLike(final String userName) throws JargonException { } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#retriveUserDNByUserId(java.lang.String) - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#retriveUserDNByUserId(java.lang.String) - * >>>>>>> origin/master - */ + @Override public String retriveUserDNByUserId(final String userId) throws JargonException { return UserAOHelper.findUserDnIfExists(userId, getGenQueryExecutor()); @@ -607,7 +583,7 @@ public String retriveUserDNByUserId(final String userId) throws JargonException /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#deleteUser(java.lang.String) */ @Override @@ -691,15 +667,7 @@ public void updateUser(final User user) throws JargonException, DataNotFoundExce } } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#getTemporaryPasswordForConnectedUser() - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#getTemporaryPasswordForConnectedUser() - * >>>>>>> origin/master - */ + @Override public String getTemporaryPasswordForConnectedUser() throws JargonException { GetTempPasswordIn getPasswordInPI = GetTempPasswordIn.instance(); @@ -714,15 +682,7 @@ public String getTemporaryPasswordForConnectedUser() throws JargonException { return tempPassword; } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#getTemporaryPasswordForASpecifiedUser - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#getTemporaryPasswordForASpecifiedUser - * >>>>>>> origin/master (java.lang.String) - */ + @Override public String getTemporaryPasswordForASpecifiedUser(final String targetUserName) throws JargonException { @@ -776,15 +736,7 @@ public void changeAUserPasswordByThatUser(final String userName, final String cu } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.core.pub.UserAO#changeAUserPasswordByAnAdmin(java.lang - * ======= - * - * @see org.irods.jargon.core.pub.UserAO#changeAUserPasswordByAnAdmin(java.lang - * >>>>>>> origin/master .String, java.lang.String) - */ + @Override public void changeAUserPasswordByAnAdmin(final String userName, final String newPassword) throws JargonException { @@ -836,7 +788,7 @@ private void updatePreChecks(final User user) throws JargonException { /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#addAVUMetadata(java.lang.String, * org.irods.jargon.core.pub.domain.AvuData) */ @@ -919,7 +871,7 @@ public void setAVUMetadata(final String userName, final AvuData avuData) /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#modifyAVUMetadata(java.lang.String, * org.irods.jargon.core.pub.domain.AvuData) */ @@ -933,7 +885,7 @@ public void modifyAVUMetadata(final String userName, final AvuData avuData) /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#deleteAVUMetadata(java.lang.String, * org.irods.jargon.core.pub.domain.AvuData) */ @@ -1002,7 +954,7 @@ private void updateUserType(final User user) throws JargonException { /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserAO#updateUserDN(java.lang.String, * java.lang.String) */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAO.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAO.java index 9907f4967..3d3c3b357 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAO.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAO.java @@ -191,7 +191,7 @@ void removeUserFromGroup(String userGroupName, String userName, String zoneName) /** * Given a search term, find user groups like that term. A blank term will find * all - * + * * @param userGroupName * String with * @return diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAOImpl.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAOImpl.java index d1634e8f5..f2a83eec2 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAOImpl.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/UserGroupAOImpl.java @@ -173,7 +173,7 @@ public void removeUserGroup(final UserGroup userGroup) throws JargonException { /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.IRODSUserGroupAO#find(java.lang.String) */ @Override @@ -244,7 +244,7 @@ public UserGroup find(final String userGroupId) throws JargonException { /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.UserGroupAO#findAll() */ @Override diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/aohelper/UserGroupAOHelper.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/aohelper/UserGroupAOHelper.java index d0248435e..64c53a31c 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/aohelper/UserGroupAOHelper.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/aohelper/UserGroupAOHelper.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.pub.aohelper; @@ -14,16 +14,15 @@ public class UserGroupAOHelper { /** - * Add appropriate select statements to the provided builder to query the - * user group data in the iCAT + * Add appropriate select statements to the provided builder to query the user + * group data in the iCAT * * @param builder - * {@link IRODSGenQueryBuilder} to which the selects will be - * added + * {@link IRODSGenQueryBuilder} to which the selects will be added * @throws GenQueryBuilderException */ - public static void buildSelectsByAppendingToBuilder( - final IRODSGenQueryBuilder builder) throws GenQueryBuilderException { + public static void buildSelectsByAppendingToBuilder(final IRODSGenQueryBuilder builder) + throws GenQueryBuilderException { builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_USER_GROUP_NAME) .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_USER_GROUP_ID); diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/ClientHints.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/ClientHints.java index 0c1978ac5..3be5e8cc0 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/ClientHints.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/ClientHints.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.pub.domain; @@ -13,7 +13,7 @@ /** * iRODS Client Hints from server JSON - * + * * @author Mike Conway - NIEHS * */ @@ -33,7 +33,7 @@ public class ClientHints { /** * Look at the database plugin type and determine what type of db the ICAT is - * + * * @return {@link IcatTypeEnum} value that indicates the type of Icat database */ public IcatTypeEnum whatTypeOfIcatIsIt() { @@ -68,7 +68,7 @@ public String getStrictAcls() { * @param strictAcls * the strictAcls to set */ - public void setStrictAcls(String strictAcls) { + public void setStrictAcls(final String strictAcls) { this.strictAcls = strictAcls; } @@ -83,7 +83,7 @@ public List getPlugins() { * @param plugins * the plugins to set */ - public void setPlugins(List plugins) { + public void setPlugins(final List plugins) { this.plugins = plugins; } @@ -98,7 +98,7 @@ public String getHashScheme() { * @param hashScheme * the hashScheme to set */ - public void setHashScheme(String hashScheme) { + public void setHashScheme(final String hashScheme) { this.hashScheme = hashScheme; } @@ -113,7 +113,7 @@ public String getMatchHashPolicy() { * @param matchHashPolicy * the matchHashPolicy to set */ - public void setMatchHashPolicy(String matchHashPolicy) { + public void setMatchHashPolicy(final String matchHashPolicy) { this.matchHashPolicy = matchHashPolicy; } @@ -128,7 +128,7 @@ public List getRules() { * @param rules * the rules to set */ - public void setRules(List rules) { + public void setRules(final List rules) { this.rules = rules; } @@ -143,13 +143,13 @@ public List getSpecificQueries() { * @param specificQueries * the specificQueries to set */ - public void setSpecificQueries(List specificQueries) { + public void setSpecificQueries(final List specificQueries) { this.specificQueries = specificQueries; } /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override @@ -204,7 +204,7 @@ public String getName() { * @param name * the name to set */ - public void setName(String name) { + public void setName(final String name) { this.name = name; } @@ -219,7 +219,7 @@ public String getType() { * @param type * the type to set */ - public void setType(String type) { + public void setType(final String type) { this.type = type; } @@ -234,7 +234,7 @@ public String getVersion() { * @param version * the version to set */ - public void setVersion(String version) { + public void setVersion(final String version) { this.version = version; } @@ -249,13 +249,13 @@ public String getChecksumSha256() { * @param checksumSha256 * the checksumSha256 to set */ - public void setChecksumSha256(String checksumSha256) { + public void setChecksumSha256(final String checksumSha256) { this.checksumSha256 = checksumSha256; } /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/Collection.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/Collection.java index 8927b528b..8a1cb0818 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/Collection.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/domain/Collection.java @@ -257,7 +257,7 @@ public boolean isProxy() { return isProxy; } - public void setProxy(boolean isProxy) { + public void setProxy(final boolean isProxy) { this.isProxy = isProxy; } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/pub/io/IRODSFileInputStream.java b/jargon-core/src/main/java/org/irods/jargon/core/pub/io/IRODSFileInputStream.java index 6962c6e55..5701ae1ab 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/pub/io/IRODSFileInputStream.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/pub/io/IRODSFileInputStream.java @@ -33,7 +33,7 @@ public class IRODSFileInputStream extends InputStream { /** * Creates a {@code FileInputStream} by opening a connection to an actual file, * the file named by the path name {@code name} in the file system. - * + * *

* First, the security is checked to verify the file can be written. *

@@ -184,7 +184,7 @@ private int openIRODSFile() throws JargonException { * {@code -1} is returned. This method blocks until input data is available, the * end of the stream is detected, or an exception is thrown. * - * + * * @return the next byte of data, or {@code -1} if the end of the stream is * reached. * @exception IOException @@ -233,7 +233,7 @@ public int read() throws IOException { * returned; otherwise, at least one byte is read and stored into {@code b}. * *

- * + * * The first byte read is stored into element {@code b[off]}, the next one into * {@code b[off+1]}, and so on. The number of bytes read is, at most, equal to * {@code len}. Let k be the number of bytes actually read; these bytes diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/CollectionAndDataObjectListingEntry.java b/jargon-core/src/main/java/org/irods/jargon/core/query/CollectionAndDataObjectListingEntry.java index 5741cb4ef..899c11586 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/CollectionAndDataObjectListingEntry.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/CollectionAndDataObjectListingEntry.java @@ -48,7 +48,7 @@ public enum ObjectType { */ private String description = ""; - public void setDescription(String description) { + public void setDescription(final String description) { this.description = description; } @@ -163,7 +163,7 @@ public int hashCode() { /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/GenQueryBuilderCondition.java b/jargon-core/src/main/java/org/irods/jargon/core/query/GenQueryBuilderCondition.java index 3a62f89b8..58ec5a7ca 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/GenQueryBuilderCondition.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/GenQueryBuilderCondition.java @@ -74,7 +74,6 @@ private static String stackListValues(final List valuesWithoutQuotes) { return sb.toString(); } - /** * Create a query condition for multi-value (BETWEEN, IN, etc) condition. Note * that the individual values are to be provided in an array without quotes, diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListing.java b/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListing.java index 4bc927096..13ff25f38 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListing.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListing.java @@ -38,8 +38,8 @@ public enum PagingStyle { * Default (no-values) constructor for simple value object */ public PagingAwareCollectionListing() { - this.pagingAwareCollectionListingDescriptor = new PagingAwareCollectionListingDescriptor(); - this.collectionAndDataObjectListingEntries = new ArrayList<>(); + pagingAwareCollectionListingDescriptor = new PagingAwareCollectionListingDescriptor(); + collectionAndDataObjectListingEntries = new ArrayList<>(); } public List getCollectionAndDataObjectListingEntries() { @@ -47,7 +47,7 @@ public List getCollectionAndDataObjectListi } public void setCollectionAndDataObjectListingEntries( - List collectionAndDataObjectListingEntries) { + final List collectionAndDataObjectListingEntries) { this.collectionAndDataObjectListingEntries = collectionAndDataObjectListingEntries; } @@ -56,7 +56,7 @@ public PagingAwareCollectionListingDescriptor getPagingAwareCollectionListingDes } public void setPagingAwareCollectionListingDescriptor( - PagingAwareCollectionListingDescriptor pagingAwareCollectionListingDescriptor) { + final PagingAwareCollectionListingDescriptor pagingAwareCollectionListingDescriptor) { this.pagingAwareCollectionListingDescriptor = pagingAwareCollectionListingDescriptor; } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListingDescriptor.java b/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListingDescriptor.java index 5a14b640b..a74fa2a25 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListingDescriptor.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/PagingAwareCollectionListingDescriptor.java @@ -9,9 +9,9 @@ * General information about the paging situation, including start and end * indexes, total records, and other info that can be used to derive paging * actions (like page forward or backward) - * + * * @author Mike Conway - DICE - * + * */ public class PagingAwareCollectionListingDescriptor { @@ -27,9 +27,9 @@ public class PagingAwareCollectionListingDescriptor { private List pathComponents; /** * Represents the paging style supported by the underlying source of the - * listing. For example, the iRODS iCAT treats collections and data objects - * as separate entities with a paging status for each type, while other - * listings might have a single source. + * listing. For example, the iRODS iCAT treats collections and data objects as + * separate entities with a paging status for each type, while other listings + * might have a single source. */ private PagingStyle pagingStyle; // FIXME: remove paging style for pacl /** @@ -43,41 +43,39 @@ public class PagingAwareCollectionListingDescriptor { */ private int dataObjectsOffset; /** - * In split mode, Count of collections in results, will be 0 if no - * collections. In mixed mode, the total count in results. + * In split mode, Count of collections in results, will be 0 if no collections. + * In mixed mode, the total count in results. *

- * To differentiate from total records, the count is the total number of - * results in this page. + * To differentiate from total records, the count is the total number of results + * in this page. */ private int count; /** * If not split count, the total records available in the catalog (if - * available), if split count, this will contain the total number of - * collections + * available), if split count, this will contain the total number of collections */ private int totalRecords; /** * Count of files available on the server itself *

- * To differentiate from count, the count is the total number of results in - * this page. + * To differentiate from count, the count is the total number of results in this + * page. */ private int dataObjectsCount; /** - * Total data object records available in the catalog (may not be available - * on all databases) + * Total data object records available in the catalog (may not be available on + * all databases) */ private int dataObjectsTotalRecords; /** - * Indicates whether the set of collections is complete, or whether more - * results exist. Will be true if complete OR if no collections - * exist + * Indicates whether the set of collections is complete, or whether more results + * exist. Will be true if complete OR if no collections exist */ private boolean collectionsComplete; /** * Indicates whether the set of data objects is complete, or whether more - * results exist. Will be true if complete OR if no data - * objects exist + * results exist. Will be true if complete OR if no data objects + * exist */ private boolean dataObjectsComplete; /** @@ -87,36 +85,35 @@ public class PagingAwareCollectionListingDescriptor { /** * Are there more colls or data objects to return? - * + * * @return */ public boolean hasMore() { - return !(this.dataObjectsComplete && this.collectionsComplete); + return !(dataObjectsComplete && collectionsComplete); } /** * Return an * int that is the absolute offset across both collections and data objects. Collections are listed first * so the offset for data objects will be the total offset of the collections added to the offset of any data objects. - * + * * @return int with the continuous count of data objects and * collections. *

- * Remember that 'counts' are 1 based, so the last count value in - * the listing is the offset for the next listing (offset is 0 - * based) + * Remember that 'counts' are 1 based, so the last count value in the + * listing is the offset for the next listing (offset is 0 based) */ public int computeAbsoluteNextOffset() { - return this.count + this.dataObjectsCount; + return count + dataObjectsCount; } /** * Return the total records for both collections and data objects together. - * + * * @return int with the total size of the set */ public int computeAbsoluteTotalSize() { - return this.totalRecords + this.dataObjectsTotalRecords; + return totalRecords + dataObjectsTotalRecords; } public PagingAwareCollectionListingDescriptor() { @@ -126,7 +123,7 @@ public String getParentAbsolutePath() { return parentAbsolutePath; } - public void setParentAbsolutePath(String parentAbsolutePath) { + public void setParentAbsolutePath(final String parentAbsolutePath) { this.parentAbsolutePath = parentAbsolutePath; } @@ -134,7 +131,7 @@ public List getPathComponents() { return pathComponents; } - public void setPathComponents(List pathComponents) { + public void setPathComponents(final List pathComponents) { this.pathComponents = pathComponents; } @@ -142,7 +139,7 @@ public PagingStyle getPagingStyle() { return pagingStyle; } - public void setPagingStyle(PagingStyle pagingStyle) { + public void setPagingStyle(final PagingStyle pagingStyle) { this.pagingStyle = pagingStyle; } @@ -150,7 +147,7 @@ public int getOffset() { return offset; } - public void setOffset(int offset) { + public void setOffset(final int offset) { this.offset = offset; } @@ -158,7 +155,7 @@ public int getDataObjectsOffset() { return dataObjectsOffset; } - public void setDataObjectsOffset(int dataObjectsOffset) { + public void setDataObjectsOffset(final int dataObjectsOffset) { this.dataObjectsOffset = dataObjectsOffset; } @@ -166,7 +163,7 @@ public int getCount() { return count; } - public void setCount(int count) { + public void setCount(final int count) { this.count = count; } @@ -174,7 +171,7 @@ public int getTotalRecords() { return totalRecords; } - public void setTotalRecords(int totalRecords) { + public void setTotalRecords(final int totalRecords) { this.totalRecords = totalRecords; } @@ -182,7 +179,7 @@ public int getDataObjectsCount() { return dataObjectsCount; } - public void setDataObjectsCount(int dataObjectsCount) { + public void setDataObjectsCount(final int dataObjectsCount) { this.dataObjectsCount = dataObjectsCount; } @@ -190,7 +187,7 @@ public int getDataObjectsTotalRecords() { return dataObjectsTotalRecords; } - public void setDataObjectsTotalRecords(int dataObjectsTotalRecords) { + public void setDataObjectsTotalRecords(final int dataObjectsTotalRecords) { this.dataObjectsTotalRecords = dataObjectsTotalRecords; } @@ -198,7 +195,7 @@ public boolean isCollectionsComplete() { return collectionsComplete; } - public void setCollectionsComplete(boolean collectionsComplete) { + public void setCollectionsComplete(final boolean collectionsComplete) { this.collectionsComplete = collectionsComplete; } @@ -206,7 +203,7 @@ public boolean isDataObjectsComplete() { return dataObjectsComplete; } - public void setDataObjectsComplete(boolean dataObjectsComplete) { + public void setDataObjectsComplete(final boolean dataObjectsComplete) { this.dataObjectsComplete = dataObjectsComplete; } @@ -214,7 +211,7 @@ public int getPageSizeUtilized() { return pageSizeUtilized; } - public void setPageSizeUtilized(int pageSizeUtilized) { + public void setPageSizeUtilized(final int pageSizeUtilized) { this.pageSizeUtilized = pageSizeUtilized; } @@ -222,28 +219,22 @@ public ObjStat getObjStat() { return objStat; } - public void setObjStat(ObjStat objStat) { + public void setObjStat(final ObjStat objStat) { this.objStat = objStat; } @Override public String toString() { final int maxLen = 10; - return "PagingAwareCollectionListingDescriptor [" - + (objStat != null ? "objStat=" + objStat + ", " : "") - + (parentAbsolutePath != null ? "parentAbsolutePath=" - + parentAbsolutePath + ", " : "") - + (pathComponents != null ? "pathComponents=" - + pathComponents.subList(0, - Math.min(pathComponents.size(), maxLen)) + ", " + return "PagingAwareCollectionListingDescriptor [" + (objStat != null ? "objStat=" + objStat + ", " : "") + + (parentAbsolutePath != null ? "parentAbsolutePath=" + parentAbsolutePath + ", " : "") + + (pathComponents != null + ? "pathComponents=" + pathComponents.subList(0, Math.min(pathComponents.size(), maxLen)) + ", " : "") - + (pagingStyle != null ? "pagingStyle=" + pagingStyle + ", " - : "") + "offset=" + offset + ", dataObjectsOffset=" - + dataObjectsOffset + ", count=" + count + ", totalRecords=" - + totalRecords + ", dataObjectsCount=" + dataObjectsCount - + ", dataObjectsTotalRecords=" + dataObjectsTotalRecords - + ", collectionsComplete=" + collectionsComplete - + ", dataObjectsComplete=" + dataObjectsComplete + + (pagingStyle != null ? "pagingStyle=" + pagingStyle + ", " : "") + "offset=" + offset + + ", dataObjectsOffset=" + dataObjectsOffset + ", count=" + count + ", totalRecords=" + totalRecords + + ", dataObjectsCount=" + dataObjectsCount + ", dataObjectsTotalRecords=" + dataObjectsTotalRecords + + ", collectionsComplete=" + collectionsComplete + ", dataObjectsComplete=" + dataObjectsComplete + ", pageSizeUtilized=" + pageSizeUtilized + "]"; } diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/QueryConditionOperators.java b/jargon-core/src/main/java/org/irods/jargon/core/query/QueryConditionOperators.java index abbd58291..82c135b5f 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/QueryConditionOperators.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/QueryConditionOperators.java @@ -29,7 +29,7 @@ public String getOperatorAsString() { /** * Get the query operator from the genQuery friendly string value, (e.g. ">" * symbol) - * + * * @param stringValue * {@code String} with the symbolic value * @return {@link QueryConditionOperators} with the enum corresponding @@ -110,7 +110,7 @@ public static QueryConditionOperators getOperatorFromStringValue(final String st /** * Turn a string-ified representation of the enum value (e.g. "GREATER THAN") to * the actual enum value - * + * * @param stringValue * {@code String} with the string-ified enum name * @return {@link QueryConditionOperators} enum value diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/SpecificQueryResultSet.java b/jargon-core/src/main/java/org/irods/jargon/core/query/SpecificQueryResultSet.java index d3ad36f00..2f92e62ae 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/SpecificQueryResultSet.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/SpecificQueryResultSet.java @@ -66,7 +66,7 @@ public SpecificQuery getSpecificQuery() { /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override diff --git a/jargon-core/src/main/java/org/irods/jargon/core/query/UserAnnotatedCatalogItem.java b/jargon-core/src/main/java/org/irods/jargon/core/query/UserAnnotatedCatalogItem.java index cdada2fca..f9236cc86 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/query/UserAnnotatedCatalogItem.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/query/UserAnnotatedCatalogItem.java @@ -38,7 +38,7 @@ public abstract class UserAnnotatedCatalogItem extends IRODSDomainObject impleme /** * constructor that ignores created, modified dates and data size - * + * * @param metadataDomain * {@link MetadataDomain} enum value that describes the iCAT domain * the annotation is for @@ -68,14 +68,14 @@ public UserAnnotatedCatalogItem(final MetadataDomain metadataDomain, final Strin this.metadataDomain = metadataDomain; this.domainUniqueName = domainUniqueName; this.userName = userName; - this.dataSize = 0L; - this.createdAt = null; - this.modifiedAt = null; + dataSize = 0L; + createdAt = null; + modifiedAt = null; } /** * All fields constructor - * + * * @param metadataDomain * {@link MetadataDomain} enum value that describes the iCAT domain * the annotation is for @@ -92,8 +92,8 @@ public UserAnnotatedCatalogItem(final MetadataDomain metadataDomain, final Strin * @param modifiedAt * {@link Date} created, can be null */ - public UserAnnotatedCatalogItem(MetadataDomain metadataDomain, String domainUniqueName, String userName, - long dataSize, Date createdAt, Date modifiedAt) { + public UserAnnotatedCatalogItem(final MetadataDomain metadataDomain, final String domainUniqueName, + final String userName, final long dataSize, final Date createdAt, final Date modifiedAt) { super(); if (metadataDomain == null) { @@ -158,7 +158,7 @@ public Date getModifiedAt() { /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override diff --git a/jargon-core/src/main/java/org/irods/jargon/core/transfer/ParallelGetTransferThread.java b/jargon-core/src/main/java/org/irods/jargon/core/transfer/ParallelGetTransferThread.java index cd3e6ed9a..a8ba2a125 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/transfer/ParallelGetTransferThread.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/transfer/ParallelGetTransferThread.java @@ -381,7 +381,7 @@ private int myRead(final InputStream in, final byte[] buffer, final int length) } while (myLength > 0) { - log.info(">>>>>>>>>>>>> top of while, my length:{} <<<<<<<<<<<", myLength); + log.info(" top of while, my length:{} ", myLength); if (ptr > buffer.length) { log.error("ptr out of synch"); log.error("buffer size:{}", buffer.length); diff --git a/jargon-core/src/main/java/org/irods/jargon/core/transform/ClientHintsTransform.java b/jargon-core/src/main/java/org/irods/jargon/core/transform/ClientHintsTransform.java index be69ef712..d197fa728 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/transform/ClientHintsTransform.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/transform/ClientHintsTransform.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.core.transform; @@ -12,7 +12,7 @@ /** * Transformation of iRODS client hints API - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/transform/package-info.java b/jargon-core/src/main/java/org/irods/jargon/core/transform/package-info.java index eb41121cf..3e4f729a0 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/transform/package-info.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/transform/package-info.java @@ -1,7 +1,7 @@ /** * Data transformation services and utilities (e.g. JSON to domain mapping) - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-core/src/main/java/org/irods/jargon/core/utils/LocalFileUtils.java b/jargon-core/src/main/java/org/irods/jargon/core/utils/LocalFileUtils.java index f08d83766..fc61c2a73 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/utils/LocalFileUtils.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/utils/LocalFileUtils.java @@ -46,11 +46,11 @@ private LocalFileUtils() { } /** - * <<<<<<< HEAD Write the string to a file - * - * @param file - * @param string - * @throws IOException + * Write the string to a file + * + * @param file {@link File} + * @param string {@code String} + * @throws IOException {@link IOException} */ public static void stringToFile(final File file, final String string) throws IOException { if (file == null) { @@ -70,11 +70,11 @@ public static void stringToFile(final File file, final String string) throws IOE /** * Return the contents of a file as a string - * + * * @param file * {@link File} to read * @return String with the file contents - * @throws IOException + * @throws IOException {@link IOException} */ public static String fileContentsAsString(final File file) throws IOException { if (file == null) { @@ -98,7 +98,7 @@ public static String fileContentsAsString(final File file) throws IOException { } /** - * ======= >>>>>>> origin/master Parse a file name to get the stuff after the + * Parse a file name to get the stuff after the * last '.' character to treat as the file extension * * @param fileName @@ -417,7 +417,7 @@ public static byte[] hexStringToByteArray(final String s) { * Given a checksum digest as a {@code byte[]}, return a {@code String} as used * in iRODS packing instructions * - * + * * @param digestAsByteArray * {@code byte[]} which is a checksum value * @return {@code String} in hex that represents this checkSum diff --git a/jargon-core/src/main/java/org/irods/jargon/core/utils/MiscIRODSUtils.java b/jargon-core/src/main/java/org/irods/jargon/core/utils/MiscIRODSUtils.java index 706e69991..844acdda7 100644 --- a/jargon-core/src/main/java/org/irods/jargon/core/utils/MiscIRODSUtils.java +++ b/jargon-core/src/main/java/org/irods/jargon/core/utils/MiscIRODSUtils.java @@ -34,7 +34,7 @@ public class MiscIRODSUtils { /** * Given an iRODS path, do path cleanup and normalization, also checking for max * size violations - * + * * @param irodsPath * {@link String} with an iRODS path * @return {@link String} with a normalized iRODS path @@ -335,7 +335,7 @@ public static String buildPathFromComponentsUpToIndex(final List pathCom * default UTF-8 encoding * * @param inputStream - * + * * {@link InputStream} to be converted to a string using the given * encoding * @return {@link String} with the stream contents diff --git a/jargon-core/src/main/java/org/irods/jargon/testutils/IRODSTestSetupUtilities.java b/jargon-core/src/main/java/org/irods/jargon/testutils/IRODSTestSetupUtilities.java index b34231e94..2eeb93453 100644 --- a/jargon-core/src/main/java/org/irods/jargon/testutils/IRODSTestSetupUtilities.java +++ b/jargon-core/src/main/java/org/irods/jargon/testutils/IRODSTestSetupUtilities.java @@ -163,7 +163,7 @@ public void initializeDirectoryForTest(final String testingDirectory) throws Tes * Add randomly from a pool of Avu metadata to a nested collection of files and * folders. Each list of candidates is tested with a random number and added at * that point based on a threshold value - * + * * @param irodsAbsolutePath * {@code String} with a parent path * @param candidateAvusForData @@ -194,8 +194,9 @@ public void decorateDirWithMetadata(final String irodsAbsolutePath, final List candidateAvusForData, - List candidateAvusForCollections, int thresholdToAdd, Random random) throws JargonException { + private void processCollectionToAddMetadata(final IRODSFile dir, final List candidateAvusForData, + final List candidateAvusForCollections, final int thresholdToAdd, final Random random) + throws JargonException { log.info("processCollectionToAddMetadata()"); log.info("rootFile:{}", dir.getAbsolutePath()); @@ -224,8 +225,8 @@ private void processCollectionToAddMetadata(IRODSFile dir, List candida } - private void processFileToAddMetadata(IRODSFile irodsFile, List candidateAvusForData, int thresholdToAdd, - Random random) throws JargonException { + private void processFileToAddMetadata(final IRODSFile irodsFile, final List candidateAvusForData, + final int thresholdToAdd, final Random random) throws JargonException { log.info("processFileToAddMetadata()"); log.info("irodsFile:{}", irodsFile); // for each candidate file avu see if I add it diff --git a/jargon-core/src/test/java/org/irods/jargon/core/connection/PAMAuthTest.java b/jargon-core/src/test/java/org/irods/jargon/core/connection/PAMAuthTest.java index ecc739b36..3027ff2d1 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/connection/PAMAuthTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/connection/PAMAuthTest.java @@ -8,12 +8,11 @@ import org.irods.jargon.core.pub.IRODSFileSystem; import org.irods.jargon.testutils.TestingPropertiesHelper; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class PAMAuthTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/packinstr/ExecMyRuleInp_PITest.java b/jargon-core/src/test/java/org/irods/jargon/core/packinstr/ExecMyRuleInp_PITest.java index 1237382fc..3d5c0842c 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/packinstr/ExecMyRuleInp_PITest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/packinstr/ExecMyRuleInp_PITest.java @@ -7,11 +7,10 @@ import org.irods.jargon.core.rule.IRODSRule; import org.irods.jargon.core.rule.IrodsRuleEngineRuleTranslator; import org.irods.jargon.core.rule.RuleInvocationConfiguration; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class ExecMyRuleInp_PITest { private static IRODSServerProperties irodsServerProperties = null; diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImplTest.java index d15f66be4..d9e795b1c 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionAndDataObjectListAndSearchAOImplTest.java @@ -1473,7 +1473,7 @@ public void testCollectionAndDataObjectListingEntryForCollectionWhenRoot() throw @Test /** * Obtain an entry at the given valid abs path that is a data object - * + * * @throws Exception */ public void testCollectionAndDataObjectListingEntryForDataObject() throws Exception { @@ -1511,7 +1511,7 @@ public void testCollectionAndDataObjectListingEntryForDataObject() throws Except @Ignore /** * Obtain an entry at the given valid abs path that is a data object - * + * * @throws Exception */ public void testCollectionAndDataObjectListingEntryForDataObject2dot09gig() throws Exception { diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionPagerAOImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionPagerAOImplTest.java index 5f3997f87..1ecc2b871 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionPagerAOImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/CollectionPagerAOImplTest.java @@ -49,8 +49,8 @@ public void testRetriveFirstPageHasTwoPagesColls() throws Exception { Mockito.when(irodsSession.getJargonProperties()).thenReturn(jargonProperties); /* - * Collection listing should return a set that emulates a count of max - * and total records 2x max and not last entry + * Collection listing should return a set that emulates a count of max and total + * records 2x max and not last entry */ final ObjStat objStat = new ObjStat(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/IRODSGenQueryExecutorImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/IRODSGenQueryExecutorImplTest.java index 4f3dc3465..a6c88cb26 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/IRODSGenQueryExecutorImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/IRODSGenQueryExecutorImplTest.java @@ -25,11 +25,10 @@ import org.irods.jargon.testutils.filemanip.FileGenerator; import org.irods.jargon.testutils.filemanip.ScratchFileUtils; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - /** * @author Mike Conway - DICE (www.irods.org) * diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/PythonRuleProcessingAOImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/PythonRuleProcessingAOImplTest.java index 215ef7904..ebc9ecda2 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/PythonRuleProcessingAOImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/PythonRuleProcessingAOImplTest.java @@ -15,12 +15,11 @@ import org.irods.jargon.core.utils.LocalFileUtils; import org.irods.jargon.testutils.TestingPropertiesHelper; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class PythonRuleProcessingAOImplTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java index 5a4cc9724..25dbaaa2d 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/UserGroupAOImplTest.java @@ -16,11 +16,10 @@ import org.irods.jargon.core.query.RodsGenQueryEnum; import org.irods.jargon.testutils.TestingPropertiesHelper; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class UserGroupAOImplTest { private static Properties testingProperties = new Properties(); @@ -105,38 +104,27 @@ public final void testFindByName() throws Exception { @Test public final void findUserGroups() throws Exception { - IRODSProtocolManager irodsConnectionManager = IRODSSimpleProtocolManager - .instance(); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSSession irodsSession = IRODSSession - .instance(irodsConnectionManager); - IRODSAccessObjectFactory accessObjectFactory = IRODSAccessObjectFactoryImpl - .instance(irodsSession); - UserGroupAO userGroupAO = accessObjectFactory - .getUserGroupAO(irodsAccount); - UserGroup userGroup = userGroupAO.findByName((String) testingProperties - .get(TestingPropertiesHelper.IRODS_USER_GROUP_KEY)); + IRODSProtocolManager irodsConnectionManager = IRODSSimpleProtocolManager.instance(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSSession irodsSession = IRODSSession.instance(irodsConnectionManager); + IRODSAccessObjectFactory accessObjectFactory = IRODSAccessObjectFactoryImpl.instance(irodsSession); + UserGroupAO userGroupAO = accessObjectFactory.getUserGroupAO(irodsAccount); + UserGroup userGroup = userGroupAO + .findByName((String) testingProperties.get(TestingPropertiesHelper.IRODS_USER_GROUP_KEY)); Assert.assertNotNull("no user group returned", userGroup); - List userGroups = userGroupAO.findUserGroups(userGroup - .getUserGroupName().substring(0, - userGroup.getUserGroupName().length() - 2)); + List userGroups = userGroupAO + .findUserGroups(userGroup.getUserGroupName().substring(0, userGroup.getUserGroupName().length() - 2)); Assert.assertFalse("no user groups found", userGroups.isEmpty()); } @Test public final void findUserGroupsEmptyTerm() throws Exception { - IRODSProtocolManager irodsConnectionManager = IRODSSimpleProtocolManager - .instance(); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSSession irodsSession = IRODSSession - .instance(irodsConnectionManager); - IRODSAccessObjectFactory accessObjectFactory = IRODSAccessObjectFactoryImpl - .instance(irodsSession); - UserGroupAO userGroupAO = accessObjectFactory - .getUserGroupAO(irodsAccount); + IRODSProtocolManager irodsConnectionManager = IRODSSimpleProtocolManager.instance(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSSession irodsSession = IRODSSession.instance(irodsConnectionManager); + IRODSAccessObjectFactory accessObjectFactory = IRODSAccessObjectFactoryImpl.instance(irodsSession); + UserGroupAO userGroupAO = accessObjectFactory.getUserGroupAO(irodsAccount); List userGroups = userGroupAO.findUserGroups(""); Assert.assertFalse("no user groups found", userGroups.isEmpty()); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/pub/io/IRODSFileImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/pub/io/IRODSFileImplTest.java index d6a83ac03..366e30a8b 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/pub/io/IRODSFileImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/pub/io/IRODSFileImplTest.java @@ -28,12 +28,11 @@ import org.irods.jargon.testutils.TestingPropertiesHelper; import org.irods.jargon.testutils.filemanip.FileGenerator; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -import org.junit.Assert; - /** * @author Mike Conway - DICE (www.irods.org) * diff --git a/jargon-core/src/test/java/org/irods/jargon/core/query/GenQueryFunctionalTests.java b/jargon-core/src/test/java/org/irods/jargon/core/query/GenQueryFunctionalTests.java index 694dc1db7..af4705754 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/query/GenQueryFunctionalTests.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/query/GenQueryFunctionalTests.java @@ -19,7 +19,7 @@ /** * Tests of various types of gen query - * + * * @author conwaymc * */ diff --git a/jargon-core/src/test/java/org/irods/jargon/core/remoteexecute/RemoteExecuteServiceImplTest.java b/jargon-core/src/test/java/org/irods/jargon/core/remoteexecute/RemoteExecuteServiceImplTest.java index 7a40219ed..3e7dfa5d6 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/remoteexecute/RemoteExecuteServiceImplTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/remoteexecute/RemoteExecuteServiceImplTest.java @@ -21,13 +21,12 @@ import org.irods.jargon.testutils.filemanip.FileGenerator; import org.irods.jargon.testutils.filemanip.ScratchFileUtils; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.mockito.Mockito; -import org.junit.Assert; - public class RemoteExecuteServiceImplTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/rule/IRODSRuleTest.java b/jargon-core/src/test/java/org/irods/jargon/core/rule/IRODSRuleTest.java index 5683e901d..d79ee614b 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/rule/IRODSRuleTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/rule/IRODSRuleTest.java @@ -3,11 +3,10 @@ import java.util.ArrayList; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class IRODSRuleTest { @BeforeClass diff --git a/jargon-core/src/test/java/org/irods/jargon/core/rule/IrodsRuleEngineRuleTranslatorTest.java b/jargon-core/src/test/java/org/irods/jargon/core/rule/IrodsRuleEngineRuleTranslatorTest.java index d0868fa97..5478b668b 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/rule/IrodsRuleEngineRuleTranslatorTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/rule/IrodsRuleEngineRuleTranslatorTest.java @@ -7,11 +7,10 @@ import org.irods.jargon.core.connection.IRODSServerProperties.IcatEnabled; import org.irods.jargon.core.connection.SettableJargonProperties; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class IrodsRuleEngineRuleTranslatorTest { @BeforeClass diff --git a/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleEngineInstanceChooserTest.java b/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleEngineInstanceChooserTest.java index d402c9503..8eb407735 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleEngineInstanceChooserTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleEngineInstanceChooserTest.java @@ -5,9 +5,8 @@ import org.irods.jargon.core.connection.IRODSServerProperties; import org.irods.jargon.core.connection.IRODSServerProperties.IcatEnabled; import org.irods.jargon.core.connection.SettableJargonProperties; -import org.junit.Test; - import org.junit.Assert; +import org.junit.Test; public class RuleEngineInstanceChooserTest { diff --git a/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleTypeEvaluatorTest.java b/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleTypeEvaluatorTest.java index 760f88005..035f0c89a 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleTypeEvaluatorTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/rule/RuleTypeEvaluatorTest.java @@ -1,9 +1,8 @@ package org.irods.jargon.core.rule; import org.irods.jargon.core.utils.LocalFileUtils; -import org.junit.Test; - import org.junit.Assert; +import org.junit.Test; public class RuleTypeEvaluatorTest { diff --git a/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/AesCipherEncryptWrapperTest.java b/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/AesCipherEncryptWrapperTest.java index 5fc795fa3..833a79e45 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/AesCipherEncryptWrapperTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/AesCipherEncryptWrapperTest.java @@ -12,11 +12,10 @@ import org.irods.jargon.testutils.TestingPropertiesHelper; import org.junit.After; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class AesCipherEncryptWrapperTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/EncryptionWrapperFactoryTest.java b/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/EncryptionWrapperFactoryTest.java index a8b6cc47e..afe8553f2 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/EncryptionWrapperFactoryTest.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/transfer/encrypt/EncryptionWrapperFactoryTest.java @@ -8,11 +8,10 @@ import org.irods.jargon.core.exception.JargonRuntimeException; import org.irods.jargon.core.protovalues.EncryptionAlgorithmEnum; import org.irods.jargon.testutils.TestingPropertiesHelper; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class EncryptionWrapperFactoryTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-core/src/test/java/org/irods/jargon/core/unittest/AllTestIncludingLongRunningAndFunctionalTests.java b/jargon-core/src/test/java/org/irods/jargon/core/unittest/AllTestIncludingLongRunningAndFunctionalTests.java index 8abbe4ec9..139b2f26a 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/unittest/AllTestIncludingLongRunningAndFunctionalTests.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/unittest/AllTestIncludingLongRunningAndFunctionalTests.java @@ -14,7 +14,7 @@ import org.irods.jargon.core.unittest.functionaltest.pep.IRODSFileOutputStreamPEPFunctionalTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; - + @RunWith(Suite.class) @Suite.SuiteClasses({ AllTests.class, IRODSThousandFilesTest.class, IRODSThousandCollectionsTest.class, FileListingAndRecursiveGetReplicateTestingWithBigCollectionTest.class, ParallelTransferOperationsTest.class, diff --git a/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/EncryptedTransferTests.java b/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/EncryptedTransferTests.java index c758a2512..0c378d2a5 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/EncryptedTransferTests.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/EncryptedTransferTests.java @@ -21,13 +21,12 @@ import org.irods.jargon.testutils.TestingPropertiesHelper; import org.irods.jargon.testutils.filemanip.FileGenerator; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -import org.junit.Assert; - /** * Functional tests of various permutations of ssl negotiation and auth methods. * These tests are contingent on the iRODS configuration and various testing diff --git a/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/pep/package-info.java b/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/pep/package-info.java index 4ab4a2286..0fb8667d0 100644 --- a/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/pep/package-info.java +++ b/jargon-core/src/test/java/org/irods/jargon/core/unittest/functionaltest/pep/package-info.java @@ -1,6 +1,6 @@ /** * Tests that execute operations and assert on PEP behavior - * + * * @author Mike Conway - DICE * */ diff --git a/jargon-data-utils/pom.xml b/jargon-data-utils/pom.xml index d38cf1798..34b1b8cea 100644 --- a/jargon-data-utils/pom.xml +++ b/jargon-data-utils/pom.xml @@ -5,7 +5,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-data-utils diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteService.java index 343f1f83c..c833482b7 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteService.java @@ -7,7 +7,7 @@ * attributes and values. The service can provide a list of unique AVU * attributes based on a pattern, as well as a list of unique AVU values given * an attribute. - * + * * @author Mike Conway - NIEHS * */ @@ -21,12 +21,12 @@ public enum AvuTypeEnum { * Given an optional (blank if not used) prefix and an optional (0 if not used) * offset, get a list of unique AVU attributes visible to the user. These * represent metadata already in the system. - * + * * @param prefix * {@link String} which can be blank. If provided, it will limit the * attributes that begin with the provided prefix, otherwise, all * attributes will be returned - * + * * @param offset * {@link int} with the offset, or 0 if no offset is needed * @param avuTypeEnum @@ -41,7 +41,7 @@ AvuSearchResult gatherAvailableAttributes(String prefix, int offset, AvuTypeEnum * Given a required attributed name and an optional prefix (blank if ignored) * for the value and an optional (0 if not used) offset, return a list of unique * avu values for the attribute - * + * * @param forAttribute * {@link String} with the required attribute name that scopes the * values diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImpl.java index 7088bddb1..f04d92191 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImpl.java @@ -84,7 +84,7 @@ public AvuSearchResult gatherAvailableAttributes(final String prefix, final int } IRODSGenQueryFromBuilder irodsQuery = builder.exportIRODSQueryFromBuilder( - this.getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); + getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); IRODSGenQueryExecutor irodsGenQueryExecutor = getIrodsAccessObjectFactory() .getIRODSGenQueryExecutor(irodsAccount); @@ -151,15 +151,17 @@ public AvuSearchResult gatherAvailableValues(final String forAttribute, final St .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_NAME, QueryConditionOperators.LIKE, forAttribute) .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_VALUE, - QueryConditionOperators.LIKE, prefix).addOrderByGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_VALUE, OrderByType.ASC); + QueryConditionOperators.LIKE, prefix) + .addOrderByGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_VALUE, OrderByType.ASC); } else if (avuTypeEnum == AvuTypeEnum.DATA_OBJECT) { builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE) - .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_NAME, - QueryConditionOperators.LIKE, forAttribute) - .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, - QueryConditionOperators.LIKE, prefix).addOrderByGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, OrderByType.ASC); + .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_NAME, + QueryConditionOperators.LIKE, forAttribute) + .addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, + QueryConditionOperators.LIKE, prefix) + .addOrderByGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, OrderByType.ASC); } else if (avuTypeEnum == AvuTypeEnum.BOTH) { @@ -168,7 +170,7 @@ public AvuSearchResult gatherAvailableValues(final String forAttribute, final St } IRODSGenQueryFromBuilder irodsQuery = builder.exportIRODSQueryFromBuilder( - this.getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); + getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); IRODSGenQueryExecutor irodsGenQueryExecutor = getIrodsAccessObjectFactory() .getIRODSGenQueryExecutor(irodsAccount); diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuSearchResult.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuSearchResult.java index bd4675117..c542a68e6 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuSearchResult.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/AvuSearchResult.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.datautils.avuautocomplete; @@ -8,7 +8,7 @@ /** * Result of an AVU search - * + * * @author Mike Conway - NIEHS * */ @@ -30,7 +30,7 @@ public class AvuSearchResult { private int nextOffset = 0; /** - * + * */ public AvuSearchResult() { } @@ -39,7 +39,7 @@ public int getOffset() { return offset; } - public void setOffset(int offset) { + public void setOffset(final int offset) { this.offset = offset; } @@ -47,7 +47,7 @@ public boolean isMore() { return more; } - public void setMore(boolean more) { + public void setMore(final boolean more) { this.more = more; } @@ -55,7 +55,7 @@ public List getElements() { return elements; } - public void setElements(List elements) { + public void setElements(final List elements) { this.elements = elements; } @@ -82,7 +82,7 @@ public int getNextOffset() { * @param nextOffset * the nextOffset to set */ - public void setNextOffset(int nextOffset) { + public void setNextOffset(final int nextOffset) { this.nextOffset = nextOffset; } diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/package-info.java index 996635450..b6fd80124 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/avuautocomplete/package-info.java @@ -1,7 +1,7 @@ /** * Services for auto complete and data entry assistance of raw avu triples - * + * * @author Mike Conway - NIEHS * */ diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connection/TempPasswordCachingProtocolManager.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connection/TempPasswordCachingProtocolManager.java index ce60ceeed..adf28b6ee 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connection/TempPasswordCachingProtocolManager.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connection/TempPasswordCachingProtocolManager.java @@ -32,7 +32,7 @@ public class TempPasswordCachingProtocolManager extends IRODSProtocolManager { private final Logger log = LoggerFactory.getLogger(TempPasswordCachingProtocolManager.class); /** - * + * * Create a protocol manager that will cache a single temporary connection in a * pool for reuse. This is because temp passwords are one-time only. This allows * client applications to (somewhat) transparently simulate the ability to get a diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connectiontester/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connectiontester/package-info.java index 8d90773e0..7f9f9a3a8 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connectiontester/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/connectiontester/package-info.java @@ -1,6 +1,6 @@ /** * Service to test conections to iRODS - * + * * @author Mike Conway - DICE * */ diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/CacheEncryptor.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/CacheEncryptor.java index 8f51477e5..35ad3fc7c 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/CacheEncryptor.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/CacheEncryptor.java @@ -94,7 +94,7 @@ public byte[] decrypt(final byte[] data) throws JargonException { } /** - * + * * Takes a single String as an argument and returns an Encrypted version of that * String. * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/DataCacheService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/DataCacheService.java index 91e2a4fe9..ad0a0dbde 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/DataCacheService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/datacache/DataCacheService.java @@ -20,12 +20,12 @@ public interface DataCacheService { * and store the data in the appropriate iRODS file. This will be determined by * the given {@link CacheServiceConfiguration}. * - * + * * @param stringToCache * {@code String} with the data to be cached * @param key * {@code String} with the key that will be used to encrypt the data - * + * * @return {@code String} with the absolute path to the iRODS file that will * hold the encrypted data cache * @throws JargonException @@ -37,7 +37,7 @@ public interface DataCacheService { * Put the given object into a special place in the users home directory. Note * that this method uses the * - * + * * @param informationObject * {@code Object} that will be serialized and stored in encrypted * form in the appropriate cache directory @@ -56,7 +56,7 @@ String putSerializedEncryptedObjectIntoCache(final Object informationObject, fin * object. The file is located based on the parameters, and the settings in the * {@link CacheServiceConfiguration}. * - * + * * @param userName * {@code String} with the user name * @param key diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/AbstractArchiver.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/AbstractArchiver.java index 6998abf90..7612856d9 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/AbstractArchiver.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/AbstractArchiver.java @@ -51,7 +51,7 @@ public AbstractArchiver(final String sourceFileAbsolutePath, final String target } /** - * + * * Create an archive from the provided source file. This may be a file or a * collection * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/LocalFileGzipCompressor.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/LocalFileGzipCompressor.java index ffc02d512..84ee15900 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/LocalFileGzipCompressor.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filearchive/LocalFileGzipCompressor.java @@ -32,7 +32,7 @@ public class LocalFileGzipCompressor { public static final Logger log = LoggerFactory.getLogger(LocalFileGzipCompressor.class); /** - * + * * Take the given file and compress it to a gzip with a .gzip extension added * * @param inputFileAbsolutePath diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerService.java index 1c414451e..e37432d65 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerService.java @@ -28,8 +28,7 @@ public interface FileSamplerService { * if the file does not exist * @throws JargonException */ - byte[] sampleToByteArray(String irodsAbsolutePath, int sampleSize) - throws FileNotFoundException, JargonException; + byte[] sampleToByteArray(String irodsAbsolutePath, int sampleSize) throws FileNotFoundException, JargonException; /** * Convert the content of the given data object to a String @@ -37,31 +36,28 @@ byte[] sampleToByteArray(String irodsAbsolutePath, int sampleSize) * @param irodsAbsolutePath * String with absolute path to the iRODS file * @param maxSizeInKb - * long with the maximum file length (in kb) to - * convert, if it is too long an exception will be thrown. A 0 - * can be entered which will ignore maximums. - * @return String with the file contents. The method does NOT - * check the file to see if it makes sense to try and return as - * String data + * long with the maximum file length (in kb) to convert, + * if it is too long an exception will be thrown. A 0 can be entered + * which will ignore maximums. + * @return String with the file contents. The method does NOT check + * the file to see if it makes sense to try and return as String data * @throws FileNotFoundException * @throws FileTooLargeException * @throws JargonException */ - String convertFileContentsToString(String irodsAbsolutePath, - long maxSizeInKb) throws FileNotFoundException, - FileTooLargeException, JargonException; + String convertFileContentsToString(String irodsAbsolutePath, long maxSizeInKb) + throws FileNotFoundException, FileTooLargeException, JargonException; /** * Write (and overwrite) the contents of the given string to the iRODS file - * + * * @param data * String the data to write to iRODS * @param irodsAbsolutePath - * String of the absolute path in iRODS where the - * file should be written. + * String of the absolute path in iRODS where the file + * should be written. * @throws JargonException */ - void saveStringToFile(String data, String irodsAbsolutePath) - throws JargonException; + void saveStringToFile(String data, String irodsAbsolutePath) throws JargonException; } \ No newline at end of file diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImpl.java index c3ae661fd..ddb2692ee 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImpl.java @@ -29,18 +29,15 @@ * @author Mike Conway - DICE * */ -public class FileSamplerServiceImpl extends AbstractDataUtilsServiceImpl - implements FileSamplerService { +public class FileSamplerServiceImpl extends AbstractDataUtilsServiceImpl implements FileSamplerService { - public static final Logger log = LoggerFactory - .getLogger(FileSamplerServiceImpl.class); + public static final Logger log = LoggerFactory.getLogger(FileSamplerServiceImpl.class); /** * @param irodsAccessObjectFactory * @param irodsAccount */ - public FileSamplerServiceImpl( - final IRODSAccessObjectFactory irodsAccessObjectFactory, + public FileSamplerServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, final IRODSAccount irodsAccount) { super(irodsAccessObjectFactory, irodsAccount); } @@ -53,14 +50,14 @@ public FileSamplerServiceImpl() { /* * (non-Javadoc) - * + * * @see * org.irods.jargon.datautils.filesampler.FileSamplerService#sampleToByteArray * (java.lang.String, int) */ @Override - public byte[] sampleToByteArray(final String irodsAbsolutePath, - final int sampleSize) throws FileNotFoundException, JargonException { + public byte[] sampleToByteArray(final String irodsAbsolutePath, final int sampleSize) + throws FileNotFoundException, JargonException { log.info("sampleToByteArray()"); @@ -76,15 +73,13 @@ public byte[] sampleToByteArray(final String irodsAbsolutePath, log.info("sampleSize:{}", sampleSize); if (sampleSize > MAX_SAMPLE_SIZE) { - throw new IllegalArgumentException( - "sample size too large,use an input stream"); + throw new IllegalArgumentException("sample size too large,use an input stream"); } log.info("getting input stream..."); InputStream inputStream = null; try { - inputStream = new BufferedInputStream(getIrodsAccessObjectFactory() - .getIRODSFileFactory(getIrodsAccount()) + inputStream = new BufferedInputStream(getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()) .instanceIRODSFileInputStream(irodsAbsolutePath)); byte[] sample = IOUtils.toByteArray(inputStream, sampleSize); @@ -104,29 +99,25 @@ public byte[] sampleToByteArray(final String irodsAbsolutePath, /* * (non-Javadoc) - * + * * @see org.irods.jargon.datautils.filesampler.FileSamplerService# * convertFileContentsToString(java.lang.String, long) */ @Override - public String convertFileContentsToString(final String irodsAbsolutePath, - final long maxSizeInKb) throws FileNotFoundException, - FileTooLargeException, JargonException { + public String convertFileContentsToString(final String irodsAbsolutePath, final long maxSizeInKb) + throws FileNotFoundException, FileTooLargeException, JargonException { log.info("convertFileContentsToString()"); if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) { - throw new IllegalArgumentException( - "null or empty irodsAbsolutePath"); + throw new IllegalArgumentException("null or empty irodsAbsolutePath"); } log.info("irodsAbsolutePath:{}", irodsAbsolutePath); log.info("maxSizeInKb:{}", maxSizeInKb); - IRODSFileFactory irodsFileFactory = getIrodsAccessObjectFactory() - .getIRODSFileFactory(getIrodsAccount()); + IRODSFileFactory irodsFileFactory = getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()); - IRODSFile irodsFile = irodsFileFactory - .instanceIRODSFile(irodsAbsolutePath); + IRODSFile irodsFile = irodsFileFactory.instanceIRODSFile(irodsAbsolutePath); if (!irodsFile.exists()) { log.error("did not find file at path:{}", irodsAbsolutePath); throw new FileNotFoundException("file not found"); @@ -148,8 +139,7 @@ public String convertFileContentsToString(final String irodsAbsolutePath, } } - IRODSFileReader irodsFileReader = irodsFileFactory - .instanceIRODSFileReader(irodsAbsolutePath); + IRODSFileReader irodsFileReader = irodsFileFactory.instanceIRODSFileReader(irodsAbsolutePath); StringWriter writer = null; String fileAsString = null; @@ -184,14 +174,13 @@ public String convertFileContentsToString(final String irodsAbsolutePath, /* * (non-Javadoc) - * + * * @see * org.irods.jargon.datautils.filesampler.FileSamplerService#saveStringToFile * (java.lang.String, java.lang.String) */ @Override - public void saveStringToFile(String data, String irodsAbsolutePath) - throws JargonException { + public void saveStringToFile(final String data, final String irodsAbsolutePath) throws JargonException { log.info("saveStringToFile()"); if (data == null || data.isEmpty()) { @@ -199,23 +188,19 @@ public void saveStringToFile(String data, String irodsAbsolutePath) } if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) { - throw new IllegalArgumentException( - "null or empty irodsAbsolutePath"); + throw new IllegalArgumentException("null or empty irodsAbsolutePath"); } log.info("irodsAbsolutePath:{}", irodsAbsolutePath); log.info("data length:{}", data.length()); - IRODSFile irodsFile = getIrodsAccessObjectFactory() - .getIRODSFileFactory(getIrodsAccount()).instanceIRODSFile( - irodsAbsolutePath); + IRODSFile irodsFile = getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()) + .instanceIRODSFile(irodsAbsolutePath); - Stream2StreamAO stream2StreamAO = getIrodsAccessObjectFactory() - .getStream2StreamAO(getIrodsAccount()); + Stream2StreamAO stream2StreamAO = getIrodsAccessObjectFactory().getStream2StreamAO(getIrodsAccount()); try { - stream2StreamAO.streamBytesToIRODSFile(data - .getBytes(getIrodsAccessObjectFactory() - .getJargonProperties().getEncoding()), irodsFile); + stream2StreamAO.streamBytesToIRODSFile( + data.getBytes(getIrodsAccessObjectFactory().getJargonProperties().getEncoding()), irodsFile); } catch (UnsupportedEncodingException e) { log.error("unsupported encoding streaming to file", e); throw new JargonException("error writing file", e); diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileTooLargeException.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileTooLargeException.java index 92977101a..70b3309a4 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileTooLargeException.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/FileTooLargeException.java @@ -45,8 +45,7 @@ public FileTooLargeException(final Throwable cause) { * @param cause * @param underlyingIRODSExceptionCode */ - public FileTooLargeException(final String message, final Throwable cause, - final int underlyingIRODSExceptionCode) { + public FileTooLargeException(final String message, final Throwable cause, final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); // TODO Auto-generated constructor stub } @@ -55,8 +54,7 @@ public FileTooLargeException(final String message, final Throwable cause, * @param cause * @param underlyingIRODSExceptionCode */ - public FileTooLargeException(final Throwable cause, - final int underlyingIRODSExceptionCode) { + public FileTooLargeException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } @@ -64,8 +62,7 @@ public FileTooLargeException(final Throwable cause, * @param message * @param underlyingIRODSExceptionCode */ - public FileTooLargeException(final String message, - final int underlyingIRODSExceptionCode) { + public FileTooLargeException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/package-info.java index befc2b346..fc1a34b44 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/filesampler/package-info.java @@ -1,6 +1,8 @@ /** - * Utilities to sample files in iRODS for previews, format recognition, and other activities. Also supports reading - * and writing string content to files for in-place editing and previews of text data, including for the cloud browser + * Utilities to sample files in iRODS for previews, format recognition, and + * other activities. Also supports reading and writing string content to files + * for in-place editing and previews of text data, including for the cloud + * browser * * @author Mike Conway - DICE * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifest.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifest.java index 19a8a261e..4c64b4df5 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifest.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifest.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.datautils.metadatamanifest; @@ -8,7 +8,7 @@ /** * Represents metadata operations to be applied to files in iRODS - * + * * @author mcc * */ @@ -20,7 +20,7 @@ public enum Action { /** * How to treat failures in each operation - * + * * @author mcc * */ @@ -36,10 +36,10 @@ public enum FailureMode { private FailureMode failureMode = FailureMode.FAIL_FAST; /** - * a parent path. This should trigger processing of path information for - * each operation using the path information in each operation as a relative - * path underneath this parent path. Leaving this blank here will treat - * operation paths as absolute paths + * a parent path. This should trigger processing of path information for each + * operation using the path information in each operation as a relative path + * underneath this parent path. Leaving this blank here will treat operation + * paths as absolute paths */ private String parentIrodsTargetPath = ""; @@ -64,12 +64,15 @@ public String toString() { final int maxLen = 10; final StringBuilder builder = new StringBuilder(); builder.append("MetadataManifest ["); - if (operation != null) + if (operation != null) { builder.append("operation=").append(operation.subList(0, Math.min(operation.size(), maxLen))).append(", "); - if (failureMode != null) + } + if (failureMode != null) { builder.append("failureMode=").append(failureMode).append(", "); - if (parentIrodsTargetPath != null) + } + if (parentIrodsTargetPath != null) { builder.append("parentIrodsTargetPath=").append(parentIrodsTargetPath); + } builder.append("]"); return builder.toString(); } diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestOperation.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestOperation.java index d8d9a1c8c..6fee9f78f 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestOperation.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestOperation.java @@ -4,7 +4,7 @@ /** * Nested individual operation - * + * * @author mcc * */ @@ -18,7 +18,7 @@ public class MetadataManifestOperation { /** * Create an operation - * + * * @param attribute * String with the avu attribute * @param value @@ -26,8 +26,8 @@ public class MetadataManifestOperation { * @param unit * String with the avu unit * @param irodsPath - * String with the target iRODS path. If the - * containing {@link MetadataManifest} supplies a + * String with the target iRODS path. If the containing + * {@link MetadataManifest} supplies a * parentIrodsTargetPath then this path should be * relative with no leading / character * @param action @@ -71,16 +71,21 @@ public Action getAction() { public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("MetadataManifestOperation ["); - if (attribute != null) + if (attribute != null) { builder.append("attribute=").append(attribute).append(", "); - if (value != null) + } + if (value != null) { builder.append("value=").append(value).append(", "); - if (unit != null) + } + if (unit != null) { builder.append("unit=").append(unit).append(", "); - if (irodsPath != null) + } + if (irodsPath != null) { builder.append("irodsPath=").append(irodsPath).append(", "); - if (action != null) + } + if (action != null) { builder.append("action=").append(action); + } builder.append("]"); return builder.toString(); } diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessor.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessor.java index d3e435d5d..1b9914562 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessor.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessor.java @@ -9,7 +9,7 @@ public interface MetadataManifestProcessor { /** * Convert a MetadataManifest to string-ified json - * + * * @param metadataManifest * {@link MetadataManifest} * @return String containing JSON @@ -19,7 +19,7 @@ public interface MetadataManifestProcessor { /** * Convert a json string to a MetadataManifest - * + * * @param jsonString * String containing json * @return {@link MetadataManifest} diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessorImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessorImpl.java index b6eab04eb..062fa5d20 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessorImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/MetadataManifestProcessorImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.datautils.metadatamanifest; @@ -28,7 +28,7 @@ /** * Implementation of a manifest processor that can manage AVUs at a given path * via a bulk operation - * + * * @author mcc * */ @@ -36,8 +36,12 @@ public class MetadataManifestProcessorImpl extends AbstractJargonService impleme public static final Logger log = LoggerFactory.getLogger(MetadataManifestProcessorImpl.class); - /* (non-Javadoc) - * @see org.irods.jargon.datautils.metadatamanifest.MetdataManifest#metadataManifestToJson(org.irods.jargon.datautils.metadatamanifest.MetadataManifest) + /* + * (non-Javadoc) + * + * @see org.irods.jargon.datautils.metadatamanifest.MetdataManifest# + * metadataManifestToJson(org.irods.jargon.datautils.metadatamanifest. + * MetadataManifest) */ @Override public String metadataManifestToJson(final MetadataManifest metadataManifest) throws JargonException { @@ -57,8 +61,11 @@ public String metadataManifestToJson(final MetadataManifest metadataManifest) th } } - /* (non-Javadoc) - * @see org.irods.jargon.datautils.metadatamanifest.MetdataManifest#stringJsonToMetadataManifest(java.lang.String) + /* + * (non-Javadoc) + * + * @see org.irods.jargon.datautils.metadatamanifest.MetdataManifest# + * stringJsonToMetadataManifest(java.lang.String) */ @Override public MetadataManifest stringJsonToMetadataManifest(final String jsonString) throws JargonException { @@ -77,8 +84,12 @@ public MetadataManifest stringJsonToMetadataManifest(final String jsonString) th } - /* (non-Javadoc) - * @see org.irods.jargon.datautils.metadatamanifest.MetdataManifest#processManifest(org.irods.jargon.datautils.metadatamanifest.MetadataManifest) + /* + * (non-Javadoc) + * + * @see + * org.irods.jargon.datautils.metadatamanifest.MetdataManifest#processManifest( + * org.irods.jargon.datautils.metadatamanifest.MetadataManifest) */ @Override public List processManifest(final MetadataManifest metadataManifest) @@ -91,7 +102,7 @@ public List processManifest(final MetadataManifest met final List responses = new ArrayList<>(); // TODO: consider cache strategy for objStat data - mcc - final CollectionAndDataObjectListAndSearchAO collectionSearchAO = this.getIrodsAccessObjectFactory() + final CollectionAndDataObjectListAndSearchAO collectionSearchAO = getIrodsAccessObjectFactory() .getCollectionAndDataObjectListAndSearchAO(getIrodsAccount()); CollectionAO collectionAO = null; @@ -131,14 +142,14 @@ public List processManifest(final MetadataManifest met try { if (objStat.isSomeTypeOfCollection()) { if (collectionAO == null) { - collectionAO = this.getIrodsAccessObjectFactory().getCollectionAO(getIrodsAccount()); + collectionAO = getIrodsAccessObjectFactory().getCollectionAO(getIrodsAccount()); } collectionAO.addAVUMetadata(path, avuData); } else { if (dataObjectAO == null) { - dataObjectAO = this.getIrodsAccessObjectFactory().getDataObjectAO(getIrodsAccount()); + dataObjectAO = getIrodsAccessObjectFactory().getDataObjectAO(getIrodsAccount()); } dataObjectAO.addAVUMetadata(path, avuData); diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/package-info.java index 1241af47b..10d97eb62 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/metadatamanifest/package-info.java @@ -1,8 +1,11 @@ /** - * + * */ /** - * Support for metadata manifest. This supports the notion of a standard JSON format file that describes a set of metadata operations to be applied to iRODS based on file contents + * Support for metadata manifest. This supports the notion of a standard JSON + * format file that describes a set of metadata operations to be applied to + * iRODS based on file contents + * * @author mcc * */ diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/UserRuleService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/UserRuleService.java index 1ca5ce729..91836f881 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/UserRuleService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/UserRuleService.java @@ -20,7 +20,7 @@ public interface UserRuleService { * List the user defined rules that exist for the user in their user rules * catalog in their iRODS home directory for the given server * - * + * * @return {@code List} of {@link UserRuleDefinition}. This will be empty if no * rules are found * @throws JargonException diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/package-info.java index c1c862041..2d8f849a8 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/rule/package-info.java @@ -1,6 +1,6 @@ /** * Utilities for processing user rules, especially from interfaces - * + * * @author Mike Conway - DICE (www.irods.org) */ package org.irods.jargon.datautils.rule; \ No newline at end of file diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/FileShoppingCart.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/FileShoppingCart.java index 56316dfb7..f22868c91 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/FileShoppingCart.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/FileShoppingCart.java @@ -24,7 +24,7 @@ public class FileShoppingCart implements Serializable { /** * Static initializer takes creates a shopping cart * - * + * * @return {@code FileShoppingCart} instance. */ public static FileShoppingCart instance() { @@ -100,7 +100,7 @@ public String toString() { /** * Handy method to check if cart has any entries. * - * + * * @return {@code boolean} of {@code true} if cart has entries */ public boolean hasItems() { @@ -145,7 +145,7 @@ public void removeAnItem(final String fileName) { } /** - * + * * Get a {@code List} of the file names in the shopping cart * * @return {@code List} with the files in the shopping carts diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartService.java index 7e1a42add..7cf9589f4 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartService.java @@ -23,7 +23,7 @@ public interface ShoppingCartService extends DataUtilsService { * directory of the user represented by the {@code IRODSAccount} provided by * this service. * - * + * * @param fileShoppingCart * {@link FileShoppingCart} with the contents. Note that, if the cart * is empty, an empty cart file is generated. @@ -40,7 +40,7 @@ String serializeShoppingCartAsLoggedInUser(final FileShoppingCart fileShoppingCa /** * Get the factory (required) used to create data cache service components. * - * + * * * @return {@link DataCacheServiceFactory} */ @@ -57,7 +57,7 @@ String serializeShoppingCartAsLoggedInUser(final FileShoppingCart fileShoppingCa /** * Retrieve a {@code FileShoppingCart} from iRODS. This has been serialized and * encrypted by an arbitrary key for the user that is logged in. - * + * * * @param key * {@code String} that was used to serialize the shopping cart using diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartServiceImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartServiceImpl.java index d811e63e6..aec79900f 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartServiceImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/shoppingcart/ShoppingCartServiceImpl.java @@ -44,7 +44,7 @@ public ShoppingCartServiceImpl() { /** * Constructor creates a {@code ShoppingCartService} with necessary dependencies * - * + * * @param irodsAccessObjectFactory * {@link IRODSAccessObjectFactory} * @param irodsAccount diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesService.java index e0d92b8ac..d120fbbb0 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesService.java @@ -18,7 +18,7 @@ public interface SynchPropertiesService { * Get the information regarding the state of synchronization between iRODS and * a local file system for a given user and device. * - * + * * @param userName * {@code String} with the iRODS user name for the synch * @param deviceName @@ -38,7 +38,7 @@ UserSynchTarget getUserSynchTargetForUserAndAbsolutePath(final String userName, final String irodsAbsolutePath) throws DataNotFoundException, JargonException; /** - * + * * Given the device name and other information, set up a synchronizing device on * iRODS. * @@ -82,7 +82,7 @@ boolean synchDeviceExists(final String userName, final String deviceName, final * Get the local and iRODS timetamps that reflect the current system time on * each * - * + * * @return {@link SynchTimestamps} value with the local and iRODS current time * since epoch * @throws JargonException @@ -91,7 +91,7 @@ boolean synchDeviceExists(final String userName, final String deviceName, final SynchTimestamps getSynchTimestamps() throws JargonException; /** - * + * * Update the iRODS metadata about this synch to record the now time locally and * on iRODS as the last synch time * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesServiceImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesServiceImpl.java index 9bbe27b2f..139b38447 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesServiceImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/SynchPropertiesServiceImpl.java @@ -43,7 +43,7 @@ public class SynchPropertiesServiceImpl extends AbstractDataUtilsServiceImpl imp public static final Logger log = LoggerFactory.getLogger(SynchPropertiesServiceImpl.class); /** - * + * * Default (no-values) constructor. The account and {@code IRODSFileSystem} need * to be initialized va the setter methods. */ @@ -52,7 +52,7 @@ public SynchPropertiesServiceImpl() { } /** - * + * * Constructor initializes dependencies. These can also be set after using the * default constructor. * @@ -60,7 +60,7 @@ public SynchPropertiesServiceImpl() { * {@code IRODSAccessObjectFactory} that can create various access * objects to interact with iRODS * @param irodsAccount - * + * * {@code IRODSAccount} that describes the user and server to connect * to */ @@ -195,10 +195,10 @@ public List getUserSynchTargets(final String userName) } /** - * Parse the synch directory AVU value for component values to build a <<<<<<< + * Parse the synch directory AVU value for component values to build a * {@code UserSynchTarget} description. * - * + * * @param metaDataAndDomainData * {@link MetaDataAndDomainData} from an AVU query * @return {@link UserSynchTarget} describing a synch relationship for this diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/package-info.java index e753b3c9a..fd6678492 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/synchproperties/package-info.java @@ -1,5 +1,5 @@ /** - * + * * This utility package provides facilities to maintain information on a client * devices synchronizing with iRODS. This is meant to abstract out standard * metadata about the status of client to iRODS applications for general diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/DiffTreePostProcessor.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/DiffTreePostProcessor.java index c4bc02578..ec61f67c6 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/DiffTreePostProcessor.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/DiffTreePostProcessor.java @@ -29,7 +29,7 @@ public DiffTreePostProcessor() { } /** - * + * * Given a completed diff tree, post process it to roll up the counts of diffs * in children. This is useful for display to users * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffEntry.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffEntry.java index b413a6473..15afd924e 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffEntry.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffEntry.java @@ -33,7 +33,7 @@ public enum DiffType { private final CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry; /** - * + * * Classify this as a diff (an actual difference was noted), or as a non-diff * entry that simply describes the tree * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtility.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtility.java index 73f669b36..c855cce5e 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtility.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtility.java @@ -15,7 +15,7 @@ public interface FileTreeDiffUtility { * differ from the perspective of the 'left hand side' file. *

* The {@code FileTreeDiffEntry} will indicate the type of difference found. - * + * * This is the user data object that is kept in a {@code FileTreeNode} in the * resulting {@code FileTreeModel}. *

@@ -30,7 +30,7 @@ public interface FileTreeDiffUtility { * appropriate for an initial synch operation. * * @param localFileRoot - * + * * {@code File} that is the left hand side of the comparison * * @param irodsAbsolutePath @@ -57,7 +57,7 @@ public abstract FileTreeModel generateDiffLocalToIRODS(final File localFileRoot, throws JargonException; /** - * + * * Handy method that checks a local and iRODS file trees and verifies that there * are no differences * @@ -74,7 +74,7 @@ public abstract FileTreeModel generateDiffLocalToIRODS(final File localFileRoot, * date of the given left hand files, indicates that the file has * changed. Leave as zero to turn off this check. * @param timestampForLastSynchRightHandSide - * + * * {@code long} with the timestamp that, if before the last modified * date of the given right hand files, indicates that the file has * changed. Leave as zero to turn off this check. diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtilityImpl.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtilityImpl.java index a2e40e700..f5bdd0898 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtilityImpl.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeDiffUtilityImpl.java @@ -219,12 +219,9 @@ public FileTreeModel generateDiffLocalToIRODS(final File localFileRoot, final St return fileTreeModel; } - /** - * <<<<<<< HEAD Given two relative paths, do the diff. This is the recursive - * call that will descend into child directories and update a shared tree model. - * ======= Given two relative paths, do the diff. This is the recursive call + /* + * Given two relative paths, do the diff. This is the recursive call * that will descend into child directories and update a shared tree model. - * >>>>>>> master * * @param currentFileTreeNode * @param leftHandSide @@ -300,11 +297,9 @@ private int diffTwoFiles(final FileTreeNode currentFileTreeNode, final File left } - /** - * <<<<<<< HEAD Two relative paths are matched. Decide if they are files or - * directories, and diff appropriately. ======= Two relative paths are matched. - * Decide if they are files or directories, and diff appropriately. >>>>>>> - * master + /* + * Two relative paths are matched. Decide if they are files or + * directories, and diff appropriately. * * @param currentFileTreeNode * @param leftHandSide @@ -611,12 +606,10 @@ private void lhsChildIsUnmatched(final FileTreeNode currentFileTreeNode, final F currentFileTreeNode.add(new FileTreeNode(entry)); } - /** - * I've matched two files by relative paths. Now inspect for changes and <<<<<<< - * HEAD generate any appropriate diff. If either the right or left timestamp is - * set to no checks, then timestamps are not checked at all. ======= generate + /* + * I've matched two files by relative paths. Now inspect for changes and generate * any appropriate diff. If either the right or left timestamp is set to no - * checks, then timestamps are not checked at all. >>>>>>> master + * checks, then timestamps are not checked at all. * * @param currentFileTreeNode * @param leftHandSide diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeModel.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeModel.java index 9d7982382..9f739f958 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeModel.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/FileTreeModel.java @@ -14,7 +14,7 @@ public class FileTreeModel extends DefaultTreeModel { private static final long serialVersionUID = -4326229056412362449L; /** - * + * * Creates a tree specifying whether any node can have children, or whether only * certain nodes can have children. * diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/TreeSummarizingService.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/TreeSummarizingService.java index 26f54ba5d..8ab40fb5e 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/TreeSummarizingService.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/tree/TreeSummarizingService.java @@ -31,7 +31,7 @@ public interface TreeSummarizingService { /** * Create a summary describing the contents of a local file tree * - * + * * @param localFilePath * {@code String} with an absolute path to a local file system tree * @return {@link TreeSummary} diff --git a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/visitor/package-info.java b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/visitor/package-info.java index 76c1ef098..5b7e12db2 100644 --- a/jargon-data-utils/src/main/java/org/irods/jargon/datautils/visitor/package-info.java +++ b/jargon-data-utils/src/main/java/org/irods/jargon/datautils/visitor/package-info.java @@ -6,11 +6,11 @@ * The contents of this package should be considered provisional and are * certainly subject to change. *

- * + * * This package implements the Heirarchical Visitor Pattern described here: * http://wiki.c2.com/?HierarchicalVisitorPattern * * @author Mike Conway - DICE (www.irods.org) - * + * */ package org.irods.jargon.datautils.visitor; diff --git a/jargon-data-utils/src/test/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImplTest.java b/jargon-data-utils/src/test/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImplTest.java index eb38f0d65..b0271638e 100644 --- a/jargon-data-utils/src/test/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImplTest.java +++ b/jargon-data-utils/src/test/java/org/irods/jargon/datautils/avuautocomplete/AvuAutocompleteServiceImplTest.java @@ -227,59 +227,59 @@ public void testGatherAvailableAttributesForDataObjWithPrefix() throws Exception * testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties * ); IRODSAccessObjectFactory accessObjectFactory = * irodsFileSystem.getIRODSAccessObjectFactory(); - * + * * // Test instance for collection String testDirName = * "testGatherAvailableAttributesForBothCollNoPrefix"; String * targetIrodsCollection = * testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties( * testingProperties, IRODS_TEST_SUBDIR_PATH + '/' + testDirName); - * + * * // Adding collection IRODSFile irodsFile = * accessObjectFactory.getIRODSFileFactory(irodsAccount) * .instanceIRODSFile(targetIrodsCollection); irodsFile.mkdirs(); - * + * * CollectionAO collectionAO = * accessObjectFactory.getCollectionAO(irodsAccount); - * + * * // initialize the collection AVU data String expectedAttribName = * "testGatherAvailableAttributesForBothCollNoPrefix-testmdattrib1"; String * expectedAttribValue = * "testGatherAvailableAttributesForBothCollNoPrefix-testmdvalue1"; String * expectedAttribUnits = * "testGatherAvailableAttributesForBothCollNoPrefix-test1mdunits"; - * + * * AvuData avuData = AvuData.instance(expectedAttribName, expectedAttribValue, * expectedAttribUnits); collectionAO.deleteAVUMetadata(targetIrodsCollection, * avuData); collectionAO.addAVUMetadata(targetIrodsCollection, avuData); - * + * * // Test instance for DataObj String testFileName = * "testGatherAvailableAttributesForDataObjWithPrefix.dat"; String absPath = * scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); * String localFileName = * FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 10); - * + * * // Adding DataObj String dataObjectAbsPath = targetIrodsCollection + '/' + * testFileName; DataTransferOperations dto = * irodsFileSystem.getIRODSAccessObjectFactory() * .getDataTransferOperations(irodsAccount); dto.putOperation(localFileName, * targetIrodsCollection, irodsAccount.getDefaultStorageResource(), null, null); - * + * * DataObjectAO dataObjectAO = * irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount); - * + * * // initialize the AVU data String expectedAttribName2 = * "testGatherAvailableAttributesForBothDataObjNoPrefix-testmdattrib1"; String * expectedAttribValue2 = * "testGatherAvailableAttributesForBothDataObjNoPrefix-testmdvalue1"; String * expectedAttribUnits2 = * "testGatherAvailableAttributesForBothDataObjNoPrefix-testmdunits"; - * + * * avuData = AvuData.instance(expectedAttribName2, expectedAttribValue2, * expectedAttribUnits2); - * + * * dataObjectAO.deleteAVUMetadata(dataObjectAbsPath, avuData); * dataObjectAO.addAVUMetadata(dataObjectAbsPath, avuData); - * + * * // now test AvuAutocompleteService service = new * AvuAutocompleteServiceImpl(irodsFileSystem.getIRODSAccessObjectFactory(), * irodsAccount); AvuSearchResult actual = diff --git a/jargon-data-utils/src/test/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImplTest.java b/jargon-data-utils/src/test/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImplTest.java index 4214c2b51..528cae99e 100644 --- a/jargon-data-utils/src/test/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImplTest.java +++ b/jargon-data-utils/src/test/java/org/irods/jargon/datautils/filesampler/FileSamplerServiceImplTest.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.datautils.filesampler; @@ -31,7 +31,7 @@ /** * @author Mike Conway - DICE - * + * */ public class FileSamplerServiceImplTest { @@ -49,19 +49,15 @@ public static void setUpBeforeClass() throws Exception { irodsFileSystem.getJargonProperties()); settableJargonProperties.setInternalCacheBufferSize(-1); settableJargonProperties.setInternalOutputStreamBufferSize(65535); - irodsFileSystem.getIrodsSession().setJargonProperties( - settableJargonProperties); + irodsFileSystem.getIrodsSession().setJargonProperties(settableJargonProperties); org.irods.jargon.testutils.TestingPropertiesHelper testingPropertiesLoader = new TestingPropertiesHelper(); testingProperties = testingPropertiesLoader.getTestProperties(); - scratchFileUtils = new org.irods.jargon.testutils.filemanip.ScratchFileUtils( - testingProperties); - scratchFileUtils - .clearAndReinitializeScratchDirectory(IRODS_TEST_SUBDIR_PATH); + scratchFileUtils = new org.irods.jargon.testutils.filemanip.ScratchFileUtils(testingProperties); + scratchFileUtils.clearAndReinitializeScratchDirectory(IRODS_TEST_SUBDIR_PATH); irodsTestSetupUtilities = new org.irods.jargon.testutils.IRODSTestSetupUtilities(); irodsTestSetupUtilities.clearIrodsScratchDirectory(); irodsTestSetupUtilities.initializeIrodsScratchDirectory(); - irodsTestSetupUtilities - .initializeDirectoryForTest(IRODS_TEST_SUBDIR_PATH); + irodsTestSetupUtilities.initializeDirectoryForTest(IRODS_TEST_SUBDIR_PATH); } @AfterClass @@ -79,34 +75,24 @@ public void testSampleToByteArray() throws Exception { // generate a local scratch file String testFileName = "testSampleToByteArray.txt"; - String absPath = scratchFileUtils - .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); - String localFileName = FileGenerator - .generateFileOfFixedLengthGivenName(absPath, testFileName, - 100 * 1024); + String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); + String localFileName = FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 100 * 1024); String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - DataTransferOperations dto = accessObjectFactory - .getDataTransferOperations(irodsAccount); + DataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount); dto.putOperation(localFileName, targetIrodsCollection, "", null, null); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); int sampleSize = 10 * 1024; - byte[] actual = service.sampleToByteArray(targetIrodsCollection + "/" - + testFileName, sampleSize); + byte[] actual = service.sampleToByteArray(targetIrodsCollection + "/" + testFileName, sampleSize); Assert.assertFalse("empty result", actual.length == 0); - Assert.assertEquals("sampleSize not as requested", sampleSize, - actual.length); + Assert.assertEquals("sampleSize not as requested", sampleSize, actual.length); } @@ -115,20 +101,15 @@ public void testStringFromFileMissing() throws Exception { String testFileName = "testStringFromFileMissing.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); service.convertFileContentsToString(targetFile.getAbsolutePath(), 0); } @@ -138,28 +119,20 @@ public void testStringFromFile() throws Exception { String testFileName = "testStringFromFile.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - File localText = LocalFileUtils - .getClasspathResourceAsFile("/text/test1.txt"); + File localText = LocalFileUtils.getClasspathResourceAsFile("/text/test1.txt"); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - DataTransferOperations dto = accessObjectFactory - .getDataTransferOperations(irodsAccount); + DataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount); dto.putOperation(localText, targetFile, null, null); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); - String actual = service.convertFileContentsToString( - targetFile.getAbsolutePath(), 0); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); + String actual = service.convertFileContentsToString(targetFile.getAbsolutePath(), 0); Assert.assertFalse("no data returned", actual.isEmpty()); } @@ -169,26 +142,19 @@ public void testStringFromFileTooLarge() throws Exception { String testFileName = "testStringFromFileTooLarge.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - File localText = LocalFileUtils - .getClasspathResourceAsFile("/text/test1.txt"); + File localText = LocalFileUtils.getClasspathResourceAsFile("/text/test1.txt"); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - DataTransferOperations dto = accessObjectFactory - .getDataTransferOperations(irodsAccount); + DataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount); dto.putOperation(localText, targetFile, null, null); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); service.convertFileContentsToString(targetFile.getAbsolutePath(), 1); } @@ -198,33 +164,27 @@ public void testStringToFileTwice() throws Exception { String testFileName = "testStringToFileTwice.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); String hello = "hello there from jargon"; service.saveStringToFile(hello, targetFile.getAbsolutePath()); service.saveStringToFile(hello, targetFile.getAbsolutePath()); - String helloFromIrods = service.convertFileContentsToString( - targetFile.getAbsolutePath(), 0); + String helloFromIrods = service.convertFileContentsToString(targetFile.getAbsolutePath(), 0); Assert.assertEquals(hello, helloFromIrods); } /** * Test for https://github.com/DICE-UNC/jargon/issues/232 - * + * * @throws Exception */ @Test @@ -232,44 +192,34 @@ public void testStringToFileTwiceSaveMetadataBug232() throws Exception { String testFileName = "testStringToFileTwice.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); String hello = "hello there from jargon"; service.saveStringToFile(hello, targetFile.getAbsolutePath()); String expectedAttribName = "testStringToFileTwiceSaveMetadataBug232"; String expectedValueName = "testval1"; - AvuData avuData = AvuData.instance(expectedAttribName, - expectedValueName, ""); - DataObjectAO dataObjectAO = irodsFileSystem - .getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount); + AvuData avuData = AvuData.instance(expectedAttribName, expectedValueName, ""); + DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount); dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData); service.saveStringToFile(hello, targetFile.getAbsolutePath()); - String helloFromIrods = service.convertFileContentsToString( - targetFile.getAbsolutePath(), 0); + String helloFromIrods = service.convertFileContentsToString(targetFile.getAbsolutePath(), 0); Assert.assertEquals(hello, helloFromIrods); List avuQueryElements = new ArrayList(); - avuQueryElements.add(AVUQueryElement.instanceForValueQuery( - AVUQueryPart.ATTRIBUTE, QueryConditionOperators.EQUAL, - expectedAttribName)); + avuQueryElements.add(AVUQueryElement.instanceForValueQuery(AVUQueryPart.ATTRIBUTE, + QueryConditionOperators.EQUAL, expectedAttribName)); - List dataObjects = dataObjectAO - .findDomainByMetadataQuery(avuQueryElements); + List dataObjects = dataObjectAO.findDomainByMetadataQuery(avuQueryElements); int nonTrashCount = 0; @@ -290,24 +240,18 @@ public void testStringToFile() throws Exception { String testFileName = "testStringToFile.txt"; String targetIrodsCollection = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem - .getIRODSAccessObjectFactory(); + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); - IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory( - irodsAccount).instanceIRODSFile(targetIrodsCollection, - testFileName); + IRODSFile targetFile = accessObjectFactory.getIRODSFileFactory(irodsAccount) + .instanceIRODSFile(targetIrodsCollection, testFileName); - FileSamplerService service = new FileSamplerServiceImpl( - accessObjectFactory, irodsAccount); + FileSamplerService service = new FileSamplerServiceImpl(accessObjectFactory, irodsAccount); String hello = "hello there from jargon"; service.saveStringToFile(hello, targetFile.getAbsolutePath()); - String helloFromIrods = service.convertFileContentsToString( - targetFile.getAbsolutePath(), 0); + String helloFromIrods = service.convertFileContentsToString(targetFile.getAbsolutePath(), 0); Assert.assertEquals(hello, helloFromIrods); } diff --git a/jargon-mdquery/pom.xml b/jargon-mdquery/pom.xml index 728306bba..2d1f0a689 100644 --- a/jargon-mdquery/pom.xml +++ b/jargon-mdquery/pom.xml @@ -6,7 +6,7 @@ jargon org.irods - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-mdquery diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQuery.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQuery.java index 32d18af9c..60e0a9d8e 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQuery.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQuery.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery; @@ -11,9 +11,9 @@ /** * A POJO that represents a metadata (AVU) query in the same sort of manner as * imeta. This can be used as a basis for a virtual collection type. - * + * * @author Mike Conway - DICE - * + * * */ @XmlRootElement @@ -34,7 +34,7 @@ public enum QueryType { *

  • Check the zone from any path hint
  • *
  • Use the zone of the iRODS account
  • * - * + * * In that priority order */ private String targetZone = ""; @@ -51,7 +51,7 @@ public QueryType getQueryType() { return queryType; } - public void setQueryType(QueryType queryType) { + public void setQueryType(final QueryType queryType) { this.queryType = queryType; } @@ -59,7 +59,7 @@ public String getPathHint() { return pathHint; } - public void setPathHint(String pathHint) { + public void setPathHint(final String pathHint) { this.pathHint = pathHint; } @@ -67,8 +67,7 @@ public List getMetadataQueryElements() { return metadataQueryElements; } - public void setMetadataQueryElements( - List metadataQueryElements) { + public void setMetadataQueryElements(final List metadataQueryElements) { this.metadataQueryElements = metadataQueryElements; } @@ -87,9 +86,8 @@ public String toString() { builder.append("pathHint=").append(pathHint).append(", "); } if (metadataQueryElements != null) { - builder.append("metadataQueryElements=").append( - metadataQueryElements.subList(0, - Math.min(metadataQueryElements.size(), maxLen))); + builder.append("metadataQueryElements=") + .append(metadataQueryElements.subList(0, Math.min(metadataQueryElements.size(), maxLen))); } builder.append("]"); return builder.toString(); @@ -99,7 +97,7 @@ public String getTargetZone() { return targetZone; } - public void setTargetZone(String targetZone) { + public void setTargetZone(final String targetZone) { this.targetZone = targetZone; } diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQueryElement.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQueryElement.java index ccfe053ce..67479c13b 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQueryElement.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/MetadataQueryElement.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery; @@ -12,7 +12,7 @@ /** * Simple POJO for an element of a query, suitable for serialization - * + * * @author Mike Conway - DICE * */ @@ -28,13 +28,13 @@ public class MetadataQueryElement { */ private QueryConditionOperators operator = QueryConditionOperators.EQUAL; /** - * Value for the query, which may be an array of one for a normal query, or - * two for between, or many for an 'in' query + * Value for the query, which may be an array of one for a normal query, or two + * for between, or many for an 'in' query */ private List attributeValue = new ArrayList(); /** - * Connector to tie this query with the following entry, typically an AND, - * but will support one OR + * Connector to tie this query with the following entry, typically an AND, but + * will support one OR */ private Connector connector = Connector.AND; @@ -50,9 +50,7 @@ public String toString() { builder.append("operator=").append(operator).append(", "); } if (attributeValue != null) { - builder.append("value=") - .append(attributeValue.subList(0, - Math.min(attributeValue.size(), maxLen))) + builder.append("value=").append(attributeValue.subList(0, Math.min(attributeValue.size(), maxLen))) .append(", "); } if (connector != null) { @@ -71,7 +69,7 @@ public enum Connector { } /** - * + * */ public MetadataQueryElement() { @@ -81,7 +79,7 @@ public String getAttributeName() { return attributeName; } - public void setAttributeName(String attributeName) { + public void setAttributeName(final String attributeName) { this.attributeName = attributeName; } @@ -89,7 +87,7 @@ public QueryConditionOperators getOperator() { return operator; } - public void setOperator(QueryConditionOperators operator) { + public void setOperator(final QueryConditionOperators operator) { this.operator = operator; } @@ -97,15 +95,15 @@ public List getAttributeValue() { return attributeValue; } - public void setAttributeValue(List value) { - this.attributeValue = value; + public void setAttributeValue(final List value) { + attributeValue = value; } public Connector getConnector() { return connector; } - public void setConnector(Connector connector) { + public void setConnector(final Connector connector) { this.connector = connector; } diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryException.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryException.java index 9cd7d9d4a..b9a03d613 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryException.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery.exception; @@ -12,14 +12,14 @@ public class MetadataQueryException extends JargonException { /** - * + * */ private static final long serialVersionUID = -6215448904296396234L; /** * @param message */ - public MetadataQueryException(String message) { + public MetadataQueryException(final String message) { super(message); } @@ -27,14 +27,14 @@ public MetadataQueryException(String message) { * @param message * @param cause */ - public MetadataQueryException(String message, Throwable cause) { + public MetadataQueryException(final String message, final Throwable cause) { super(message, cause); } /** * @param cause */ - public MetadataQueryException(Throwable cause) { + public MetadataQueryException(final Throwable cause) { super(cause); // TODO Auto-genrated constructor stub } @@ -44,8 +44,7 @@ public MetadataQueryException(Throwable cause) { * @param cause * @param underlyingIRODSExceptionCode */ - public MetadataQueryException(String message, Throwable cause, - int underlyingIRODSExceptionCode) { + public MetadataQueryException(final String message, final Throwable cause, final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } @@ -53,8 +52,7 @@ public MetadataQueryException(String message, Throwable cause, * @param cause * @param underlyingIRODSExceptionCode */ - public MetadataQueryException(Throwable cause, - int underlyingIRODSExceptionCode) { + public MetadataQueryException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } @@ -62,8 +60,7 @@ public MetadataQueryException(Throwable cause, * @param message * @param underlyingIRODSExceptionCode */ - public MetadataQueryException(String message, - int underlyingIRODSExceptionCode) { + public MetadataQueryException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryRuntimeException.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryRuntimeException.java index 29e5ab104..0ea7c4b5f 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryRuntimeException.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/MetadataQueryRuntimeException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery.exception; @@ -7,19 +7,19 @@ /** * General unchecked exception for metadata queries - * + * * @author Mike Conway - DICE * */ public class MetadataQueryRuntimeException extends JargonRuntimeException { /** - * + * */ private static final long serialVersionUID = -5850439092572959832L; /** - * + * */ public MetadataQueryRuntimeException() { } @@ -27,14 +27,14 @@ public MetadataQueryRuntimeException() { /** * @param message */ - public MetadataQueryRuntimeException(String message) { + public MetadataQueryRuntimeException(final String message) { super(message); } /** * @param cause */ - public MetadataQueryRuntimeException(Throwable cause) { + public MetadataQueryRuntimeException(final Throwable cause) { super(cause); } @@ -42,7 +42,7 @@ public MetadataQueryRuntimeException(Throwable cause) { * @param message * @param cause */ - public MetadataQueryRuntimeException(String message, Throwable cause) { + public MetadataQueryRuntimeException(final String message, final Throwable cause) { super(message, cause); } diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/package-info.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/package-info.java index e077917b8..8303257d9 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/package-info.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/exception/package-info.java @@ -1,5 +1,6 @@ /** * General exceptions + * * @author Mike Conway - DICE * */ diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/package-info.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/package-info.java index 03a2b52a6..aab2a5f3f 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/package-info.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/package-info.java @@ -1,7 +1,6 @@ /** - * @author Mike Conway - DICE - * Metadata queryies wrap the GenQuery API to present an abstraction of an AVU query + * @author Mike Conway - DICE Metadata queryies wrap the GenQuery API to present + * an abstraction of an AVU query * */ package org.irods.jargon.mdquery; - diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonService.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonService.java index e3dd0e7b9..fa7b562fb 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonService.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonService.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery.serialization; @@ -16,28 +16,26 @@ import com.fasterxml.jackson.databind.ObjectMapper; /** - * + * * Service to create and parse JSON representations of metadata queries - * + * * @author Mike Conway - DICE * */ public class MetadataQueryJsonService { - public static final Logger log = LoggerFactory - .getLogger(MetadataQueryJsonService.class); + public static final Logger log = LoggerFactory.getLogger(MetadataQueryJsonService.class); private final ObjectMapper objectMapper; public MetadataQueryJsonService() { - this.objectMapper = new ObjectMapper(); + objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(Include.ALWAYS); } /** - * Create a String-ified JSON representation of the metadata - * query - * + * Create a String-ified JSON representation of the metadata query + * * @param metadataQuery * {@link MetadataQuery} transfer object * @return String with JSON representing the metadata query @@ -56,15 +54,14 @@ public String jsonFromMetadataQuery(final MetadataQuery metadataQuery) { /** * Turn JSON back to a metadata query - * + * * @param jsonString * String that is a valid JSON representation of a * metadata query * @return {@link MetadataQuery} based on the JSON serialization * @throws MetadataQueryException */ - public MetadataQuery metadataQueryFromJson(final String jsonString) - throws MetadataQueryException { + public MetadataQuery metadataQueryFromJson(final String jsonString) throws MetadataQueryException { if (jsonString == null || jsonString.isEmpty()) { throw new IllegalArgumentException("null or empty jsonString"); } diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/package-info.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/package-info.java index 0103445b7..bc745ea36 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/package-info.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/serialization/package-info.java @@ -1,5 +1,6 @@ /** * Serialization and data transfer objects for metadata queries + * * @author Mike Conway - DICE * */ diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryService.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryService.java index e9be3fc7d..7bfdcaf71 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryService.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryService.java @@ -6,7 +6,7 @@ /** * Service to query iRODS based on a POJO {@link MetadataQuery} - * + * * @author Mike Conway - DICE * */ @@ -14,26 +14,25 @@ public interface MetadataQueryService { /** * Execute the query and return a listing result - * + * * @param metadataQuery * {@link MetadataQuery} which is an abbreviated GenQuery format * @return {@link PagingAwareCollectionListing} with results * @throws MetadataQueryException */ - public abstract PagingAwareCollectionListing executeQuery( - MetadataQuery metadataQuery) throws MetadataQueryException; + public abstract PagingAwareCollectionListing executeQuery(MetadataQuery metadataQuery) + throws MetadataQueryException; /** - * Convenience method that can take a metadata query as a serialized JSON - * string and handle the deserialization, chaining to call the executeQuery - * method that takes the MetadataQuery as a parameter - * + * Convenience method that can take a metadata query as a serialized JSON string + * and handle the deserialization, chaining to call the executeQuery method that + * takes the MetadataQuery as a parameter + * * @param jsonString * Stringified JSON that is a {@link MetadataQuery} * @return {@link PagingAwareCollectionListing} with results * @throws MetadataQueryException */ - public abstract PagingAwareCollectionListing executeQuery( - final String jsonString) throws MetadataQueryException; + public abstract PagingAwareCollectionListing executeQuery(final String jsonString) throws MetadataQueryException; } \ No newline at end of file diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImpl.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImpl.java index e9ede5297..36642cd79 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImpl.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.mdquery.service; @@ -40,56 +40,50 @@ * level services simpler, and to centralize functional testing (e.g. iRODS gen * query limitiations) at this layer. Thus this class can enforce any necessary * restrictions on queries (number of elements, etc) - * + * * @author Mike Conway - DICE * */ -public class MetadataQueryServiceImpl extends AbstractJargonService implements - MetadataQueryService { +public class MetadataQueryServiceImpl extends AbstractJargonService implements MetadataQueryService { static Logger log = LoggerFactory.getLogger(MetadataQueryServiceImpl.class); /** * Constructor takes dependencies - * + * * @param irodsAccessObjectFactory * {@link IRODSAccessObjectFactory} to create various connected * services * @param irodsAccount * {@link IRODSAccount} with authentication credentials */ - public MetadataQueryServiceImpl( - IRODSAccessObjectFactory irodsAccessObjectFactory, - IRODSAccount irodsAccount) { + public MetadataQueryServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, + final IRODSAccount irodsAccount) { super(irodsAccessObjectFactory, irodsAccount); } /** - * + * */ public MetadataQueryServiceImpl() { } @Override - public PagingAwareCollectionListing executeQuery(final String jsonString) - throws MetadataQueryException { + public PagingAwareCollectionListing executeQuery(final String jsonString) throws MetadataQueryException { MetadataQueryJsonService metadataQueryJsonService = new MetadataQueryJsonService(); - MetadataQuery query = metadataQueryJsonService - .metadataQueryFromJson(jsonString); + MetadataQuery query = metadataQueryJsonService.metadataQueryFromJson(jsonString); return this.executeQuery(query); } /* * (non-Javadoc) - * - * @see - * org.irods.jargon.mdquery.service.MetadataQueryService#executeQuery(org + * + * @see org.irods.jargon.mdquery.service.MetadataQueryService#executeQuery(org * .irods.jargon.mdquery.MetadataQuery) */ @Override - public PagingAwareCollectionListing executeQuery( - final MetadataQuery metadataQuery) throws MetadataQueryException { + public PagingAwareCollectionListing executeQuery(final MetadataQuery metadataQuery) throws MetadataQueryException { log.info("executeQuery()"); if (metadataQuery == null) { @@ -101,48 +95,36 @@ public PagingAwareCollectionListing executeQuery( PagingAwareCollectionListing listing = new PagingAwareCollectionListing(); try { - listing.getPagingAwareCollectionListingDescriptor() - .setPageSizeUtilized( - this.getIrodsAccessObjectFactory() - .getJargonProperties() - .getMaxFilesAndDirsQueryMax()); + listing.getPagingAwareCollectionListingDescriptor().setPageSizeUtilized( + getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); } catch (JargonException e) { log.error("jargon exception in query", e); throw new MetadataQueryException(e); } - if (metadataQuery.getQueryType() == QueryType.BOTH - || metadataQuery.getQueryType() == QueryType.COLLECTIONS) { + if (metadataQuery.getQueryType() == QueryType.BOTH || metadataQuery.getQueryType() == QueryType.COLLECTIONS) { ListAndCount collections = queryCollections(metadataQuery); - listing.setCollectionAndDataObjectListingEntries(collections - .getCollectionAndDataObjectListingEntries()); - listing.getPagingAwareCollectionListingDescriptor() - .setCollectionsComplete(collections.isEndOfRecords()); - listing.getPagingAwareCollectionListingDescriptor().setCount( - collections.getCountThisPage()); + listing.setCollectionAndDataObjectListingEntries(collections.getCollectionAndDataObjectListingEntries()); + listing.getPagingAwareCollectionListingDescriptor().setCollectionsComplete(collections.isEndOfRecords()); + listing.getPagingAwareCollectionListingDescriptor().setCount(collections.getCountThisPage()); } else { - listing.getPagingAwareCollectionListingDescriptor() - .setCollectionsComplete(true); + listing.getPagingAwareCollectionListingDescriptor().setCollectionsComplete(true); } - if (metadataQuery.getQueryType() == QueryType.BOTH - || metadataQuery.getQueryType() == QueryType.DATA) { + if (metadataQuery.getQueryType() == QueryType.BOTH || metadataQuery.getQueryType() == QueryType.DATA) { log.info("querying data objects"); ListAndCount dataObjects = queryDataObjects(metadataQuery); - listing.getCollectionAndDataObjectListingEntries().addAll( - dataObjects.getCollectionAndDataObjectListingEntries()); - listing.getPagingAwareCollectionListingDescriptor() - .setDataObjectsComplete(dataObjects.isEndOfRecords()); - listing.getPagingAwareCollectionListingDescriptor() - .setDataObjectsCount(dataObjects.getCountThisPage()); + listing.getCollectionAndDataObjectListingEntries() + .addAll(dataObjects.getCollectionAndDataObjectListingEntries()); + listing.getPagingAwareCollectionListingDescriptor().setDataObjectsComplete(dataObjects.isEndOfRecords()); + listing.getPagingAwareCollectionListingDescriptor().setDataObjectsCount(dataObjects.getCountThisPage()); } else { - listing.getPagingAwareCollectionListingDescriptor() - .setDataObjectsComplete(true); + listing.getPagingAwareCollectionListingDescriptor().setDataObjectsComplete(true); } @@ -151,8 +133,7 @@ public PagingAwareCollectionListing executeQuery( } - private ListAndCount queryDataObjects(MetadataQuery metadataQuery) - throws MetadataQueryException { + private ListAndCount queryDataObjects(final MetadataQuery metadataQuery) throws MetadataQueryException { log.info("queryDataObjects()"); IRODSGenQueryBuilder builder = new IRODSGenQueryBuilder(true, null); @@ -161,216 +142,166 @@ private ListAndCount queryDataObjects(MetadataQuery metadataQuery) try { builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_NAME) .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_DATA_NAME) - .addSelectAsAgregateGenQueryValue( - RodsGenQueryEnum.COL_DATA_SIZE, - SelectFieldTypes.MAX) + .addSelectAsAgregateGenQueryValue(RodsGenQueryEnum.COL_DATA_SIZE, SelectFieldTypes.MAX) // .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_DATA_SIZE) - .addSelectAsAgregateGenQueryValue( - RodsGenQueryEnum.COL_D_CREATE_TIME, - SelectFieldTypes.MAX) - .addSelectAsAgregateGenQueryValue( - RodsGenQueryEnum.COL_D_MODIFY_TIME, - SelectFieldTypes.MAX) + .addSelectAsAgregateGenQueryValue(RodsGenQueryEnum.COL_D_CREATE_TIME, SelectFieldTypes.MAX) + .addSelectAsAgregateGenQueryValue(RodsGenQueryEnum.COL_D_MODIFY_TIME, SelectFieldTypes.MAX) .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_D_OWNER_NAME) .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_D_OWNER_ZONE); } catch (GenQueryBuilderException e) { - log.error("error building query for data objects:{}", - metadataQuery, e); + log.error("error building query for data objects:{}", metadataQuery, e); throw new MetadataQueryException("gen query error", e); } if (!metadataQuery.getPathHint().isEmpty()) { log.info("adding path hint for :{}", metadataQuery.getPathHint()); - builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_COLL_NAME, - QueryConditionOperators.LIKE, metadataQuery.getPathHint() - .trim() + "%"); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_COLL_NAME, QueryConditionOperators.LIKE, + metadataQuery.getPathHint().trim() + "%"); } /** * Add an AVU query for each element */ - for (MetadataQueryElement element : metadataQuery - .getMetadataQueryElements()) { + for (MetadataQueryElement element : metadataQuery.getMetadataQueryElements()) { log.info("element:{}", element); - builder.addConditionAsGenQueryField( - RodsGenQueryEnum.COL_META_DATA_ATTR_NAME, - QueryConditionOperators.EQUAL, element.getAttributeName() - .trim()); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_NAME, QueryConditionOperators.EQUAL, + element.getAttributeName().trim()); if (element.getAttributeValue().size() > 1) { - throw new UnsupportedOperationException( - "in and between not coded yet"); + throw new UnsupportedOperationException("in and between not coded yet"); } if (element.getAttributeValue().size() == 1) { log.info("single value operation"); - builder.addConditionAsGenQueryField( - RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, - QueryConditionOperators - .getOperatorFromEnumStringValue(element - .getOperator().toString()), element - .getAttributeValue().get(0).trim()); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_DATA_ATTR_VALUE, + QueryConditionOperators.getOperatorFromEnumStringValue(element.getOperator().toString()), + element.getAttributeValue().get(0).trim()); } } IRODSGenQueryFromBuilder irodsQuery; try { - irodsQuery = builder.exportIRODSQueryFromBuilder(this - .getIrodsAccessObjectFactory().getJargonProperties() - .getMaxFilesAndDirsQueryMax()); + irodsQuery = builder.exportIRODSQueryFromBuilder( + getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); String targetZone = deriveTargetZone(metadataQuery); - resultSet = this - .getIrodsAccessObjectFactory() - .getIRODSGenQueryExecutor(getIrodsAccount()) - .executeIRODSQueryAndCloseResultInZone(irodsQuery, 0, - targetZone); + resultSet = getIrodsAccessObjectFactory().getIRODSGenQueryExecutor(getIrodsAccount()) + .executeIRODSQueryAndCloseResultInZone(irodsQuery, 0, targetZone); - List entries = buildListFromQueryResult( - MetadataDomain.DATA, resultSet); + List entries = buildListFromQueryResult(MetadataDomain.DATA, + resultSet); ListAndCount listAndCount = new ListAndCount(); listAndCount.setCollectionAndDataObjectListingEntries(entries); /* - * see if the query had total records, if it did not, do a separate - * query to establish total records + * see if the query had total records, if it did not, do a separate query to + * establish total records */ - if (listAndCount.getCollectionAndDataObjectListingEntries() - .isEmpty()) { + if (listAndCount.getCollectionAndDataObjectListingEntries().isEmpty()) { listAndCount.setCountTotal(0); log.info("empty results returned"); listAndCount.setEndOfRecords(true); return listAndCount; } - int lastEntryIdx = listAndCount - .getCollectionAndDataObjectListingEntries().size() - 1; - CollectionAndDataObjectListingEntry lastEntry = listAndCount - .getCollectionAndDataObjectListingEntries().get( - lastEntryIdx); + int lastEntryIdx = listAndCount.getCollectionAndDataObjectListingEntries().size() - 1; + CollectionAndDataObjectListingEntry lastEntry = listAndCount.getCollectionAndDataObjectListingEntries() + .get(lastEntryIdx); listAndCount.setCountThisPage(lastEntry.getCount()); listAndCount.setEndOfRecords(lastEntry.isLastResult()); - listAndCount.setOffsetStart(listAndCount - .getCollectionAndDataObjectListingEntries().get(0) - .getCount()); + listAndCount.setOffsetStart(listAndCount.getCollectionAndDataObjectListingEntries().get(0).getCount()); return listAndCount; - } catch (GenQueryBuilderException | JargonException - | JargonQueryException e) { + } catch (GenQueryBuilderException | JargonException | JargonQueryException e) { log.error("error in query for collections:{}", metadataQuery, e); throw new MetadataQueryException("gen query error", e); } } - private ListAndCount queryCollections(MetadataQuery metadataQuery) - throws MetadataQueryException { + private ListAndCount queryCollections(final MetadataQuery metadataQuery) throws MetadataQueryException { log.info("queryCollections()"); IRODSGenQueryBuilder builder = new IRODSGenQueryBuilder(true, null); IRODSQueryResultSetInterface resultSet = null; try { - builder.addSelectAsGenQueryValue( - RodsGenQueryEnum.COL_COLL_PARENT_NAME) + builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_PARENT_NAME) .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_NAME) - .addSelectAsGenQueryValue( - RodsGenQueryEnum.COL_COLL_CREATE_TIME) - .addSelectAsGenQueryValue( - RodsGenQueryEnum.COL_COLL_MODIFY_TIME) - .addSelectAsGenQueryValue( - RodsGenQueryEnum.COL_COLL_OWNER_NAME) - .addSelectAsGenQueryValue( - RodsGenQueryEnum.COL_COLL_OWNER_ZONE); + .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_CREATE_TIME) + .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_MODIFY_TIME) + .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_OWNER_NAME) + .addSelectAsGenQueryValue(RodsGenQueryEnum.COL_COLL_OWNER_ZONE); } catch (GenQueryBuilderException e) { - log.error("error building query for collections:{}", metadataQuery, - e); + log.error("error building query for collections:{}", metadataQuery, e); throw new MetadataQueryException("gen query error", e); } if (!metadataQuery.getPathHint().isEmpty()) { log.info("adding path hint for :{}", metadataQuery.getPathHint()); - builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_COLL_NAME, - QueryConditionOperators.LIKE, metadataQuery.getPathHint() - .trim() + "%"); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_COLL_NAME, QueryConditionOperators.LIKE, + metadataQuery.getPathHint().trim() + "%"); } /** * Add an AVU query for each element */ - for (MetadataQueryElement element : metadataQuery - .getMetadataQueryElements()) { + for (MetadataQueryElement element : metadataQuery.getMetadataQueryElements()) { log.info("element:{}", element); - builder.addConditionAsGenQueryField( - RodsGenQueryEnum.COL_META_COLL_ATTR_NAME, - QueryConditionOperators.EQUAL, element.getAttributeName() - .trim()); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_NAME, QueryConditionOperators.EQUAL, + element.getAttributeName().trim()); if (element.getAttributeValue().size() > 1) { - throw new UnsupportedOperationException( - "in and between not coded yet"); + throw new UnsupportedOperationException("in and between not coded yet"); } if (element.getAttributeValue().size() == 1) { log.info("single value operation"); - builder.addConditionAsGenQueryField( - RodsGenQueryEnum.COL_META_COLL_ATTR_VALUE, - QueryConditionOperators - .getOperatorFromEnumStringValue(element - .getOperator().toString()), element - .getAttributeValue().get(0).trim()); + builder.addConditionAsGenQueryField(RodsGenQueryEnum.COL_META_COLL_ATTR_VALUE, + QueryConditionOperators.getOperatorFromEnumStringValue(element.getOperator().toString()), + element.getAttributeValue().get(0).trim()); } } IRODSGenQueryFromBuilder irodsQuery; try { - irodsQuery = builder.exportIRODSQueryFromBuilder(this - .getIrodsAccessObjectFactory().getJargonProperties() - .getMaxFilesAndDirsQueryMax()); + irodsQuery = builder.exportIRODSQueryFromBuilder( + getIrodsAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()); String targetZone = deriveTargetZone(metadataQuery); - resultSet = this - .getIrodsAccessObjectFactory() - .getIRODSGenQueryExecutor(getIrodsAccount()) - .executeIRODSQueryAndCloseResultInZone(irodsQuery, 0, - targetZone); + resultSet = getIrodsAccessObjectFactory().getIRODSGenQueryExecutor(getIrodsAccount()) + .executeIRODSQueryAndCloseResultInZone(irodsQuery, 0, targetZone); - List entries = buildListFromQueryResult( - MetadataDomain.COLLECTION, resultSet); + List entries = buildListFromQueryResult(MetadataDomain.COLLECTION, + resultSet); ListAndCount listAndCount = new ListAndCount(); listAndCount.setCollectionAndDataObjectListingEntries(entries); /* - * see if the query had total records, if it did not, do a separate - * query to establish total records + * see if the query had total records, if it did not, do a separate query to + * establish total records */ - if (listAndCount.getCollectionAndDataObjectListingEntries() - .isEmpty()) { + if (listAndCount.getCollectionAndDataObjectListingEntries().isEmpty()) { listAndCount.setCountTotal(0); log.info("empty results returned"); listAndCount.setEndOfRecords(true); return listAndCount; } - int lastEntryIdx = listAndCount - .getCollectionAndDataObjectListingEntries().size() - 1; - CollectionAndDataObjectListingEntry lastEntry = listAndCount - .getCollectionAndDataObjectListingEntries().get( - lastEntryIdx); + int lastEntryIdx = listAndCount.getCollectionAndDataObjectListingEntries().size() - 1; + CollectionAndDataObjectListingEntry lastEntry = listAndCount.getCollectionAndDataObjectListingEntries() + .get(lastEntryIdx); listAndCount.setCountThisPage(lastEntry.getCount()); listAndCount.setEndOfRecords(lastEntry.isLastResult()); - listAndCount.setOffsetStart(listAndCount - .getCollectionAndDataObjectListingEntries().get(0) - .getCount()); + listAndCount.setOffsetStart(listAndCount.getCollectionAndDataObjectListingEntries().get(0).getCount()); return listAndCount; - } catch (GenQueryBuilderException | JargonException - | JargonQueryException e) { + } catch (GenQueryBuilderException | JargonException | JargonQueryException e) { log.error("error in query for collections:{}", metadataQuery, e); throw new MetadataQueryException("gen query error", e); } @@ -378,8 +309,7 @@ private ListAndCount queryCollections(MetadataQuery metadataQuery) } private static List buildListFromQueryResult( - final MetadataDomain metaDataDomain, - final IRODSQueryResultSetInterface irodsQueryResultSet) + final MetadataDomain metaDataDomain, final IRODSQueryResultSetInterface irodsQueryResultSet) throws JargonException { if (metaDataDomain == null) { throw new JargonException("null metaDataDomain"); @@ -391,17 +321,16 @@ private static List buildListFromQueryResul List metaDataResults = new ArrayList(); for (IRODSQueryResultRow row : irodsQueryResultSet.getResults()) { - metaDataResults.add(buildListingFromResultSetRow(metaDataDomain, - row, irodsQueryResultSet.getTotalRecords())); + metaDataResults + .add(buildListingFromResultSetRow(metaDataDomain, row, irodsQueryResultSet.getTotalRecords())); } return metaDataResults; } private static CollectionAndDataObjectListingEntry buildListingFromResultSetRow( - final MetaDataAndDomainData.MetadataDomain metadataDomain, - final IRODSQueryResultRow row, final int totalRecordCount) - throws JargonException { + final MetaDataAndDomainData.MetadataDomain metadataDomain, final IRODSQueryResultRow row, + final int totalRecordCount) throws JargonException { CollectionAndDataObjectListingEntry entry = new CollectionAndDataObjectListingEntry(); entry.setCount(row.getRecordCount()); @@ -434,7 +363,7 @@ private static CollectionAndDataObjectListingEntry buildListingFromResultSetRow( return entry; } - private String deriveTargetZone(MetadataQuery metadataQuery) { + private String deriveTargetZone(final MetadataQuery metadataQuery) { if (!metadataQuery.getTargetZone().isEmpty()) { return metadataQuery.getTargetZone(); } else if (!metadataQuery.getPathHint().isEmpty()) { diff --git a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/package-info.java b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/package-info.java index ef23ff7d4..70a594b04 100644 --- a/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/package-info.java +++ b/jargon-mdquery/src/main/java/org/irods/jargon/mdquery/service/package-info.java @@ -1,5 +1,6 @@ /** * API for metadata query + * * @author Mike Conway - DICE * */ diff --git a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonServiceTest.java b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonServiceTest.java index cf94a66c5..f5f44a78e 100644 --- a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonServiceTest.java +++ b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/serialization/MetadataQueryJsonServiceTest.java @@ -3,12 +3,11 @@ import java.util.ArrayList; import java.util.List; -import org.junit.Assert; - import org.irods.jargon.core.query.QueryConditionOperators; import org.irods.jargon.core.utils.LocalFileUtils; import org.irods.jargon.mdquery.MetadataQuery; import org.irods.jargon.mdquery.MetadataQueryElement; +import org.junit.Assert; import org.junit.Test; public class MetadataQueryJsonServiceTest { @@ -33,8 +32,7 @@ public void testMetadataQueryToJson() { metadataQuery.getMetadataQueryElements().add(metadataElement); MetadataQueryJsonService metadataQueryJsonService = new MetadataQueryJsonService(); - String actual = metadataQueryJsonService - .jsonFromMetadataQuery(metadataQuery); + String actual = metadataQueryJsonService.jsonFromMetadataQuery(metadataQuery); Assert.assertNotNull(actual); Assert.assertFalse(actual.isEmpty()); System.out.println(actual); @@ -45,10 +43,8 @@ public void testMetadataQueryToJson() { public void testJsonToMetadataQuery() throws Exception { MetadataQueryJsonService metadataQueryJsonService = new MetadataQueryJsonService(); - String queryString = LocalFileUtils - .getClasspathResourceFileAsString("/metadata-queries/basicquery.txt"); - MetadataQuery actual = metadataQueryJsonService - .metadataQueryFromJson(queryString); + String queryString = LocalFileUtils.getClasspathResourceFileAsString("/metadata-queries/basicquery.txt"); + MetadataQuery actual = metadataQueryJsonService.metadataQueryFromJson(queryString); Assert.assertNotNull(actual); System.out.println(actual); Assert.assertTrue(actual instanceof MetadataQuery); diff --git a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImplTest.java b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImplTest.java index adcafd28d..19288927f 100644 --- a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImplTest.java +++ b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/service/MetadataQueryServiceImplTest.java @@ -86,6 +86,11 @@ public void testSimpleAvuQueryNoPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 3768525818721463742L; + { add(expectedAttribValue); } @@ -150,6 +155,11 @@ public void testSimpleAvuQueryCollectionWithPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -2454688619503603024L; + { add(expectedAttribValue); } @@ -237,6 +247,11 @@ public void testMultiAvuQueryCollectionWithPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 7311594785598163913L; + { add(expectedAttribValue); } @@ -250,6 +265,11 @@ public void testMultiAvuQueryCollectionWithPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals2 = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -6654229958410438278L; + { add(expectedAttribValue2); } @@ -263,6 +283,11 @@ public void testMultiAvuQueryCollectionWithPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals3 = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 1422486670335140648L; + { add(expectedAttribValue3); } @@ -313,8 +338,6 @@ public void testMultiAvuQueryCollectionWithPathHintShouldNotMatch() throws Excep final String expectedAttribName3 = "testSimpleAvuQueryCollectionWithPathHintattrib3"; final String expectedAttribValue3 = "testSimpleAvuQueryCollectionWithPathHintvalue3"; - final String expectedAttribUnits3 = "testSimpleAvuQueryCollectionWithPathHintunits"; - IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); CollectionAO collectionAO = accessObjectFactory.getCollectionAO(irodsAccount); @@ -349,6 +372,11 @@ public void testMultiAvuQueryCollectionWithPathHintShouldNotMatch() throws Excep element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -2421933826367225199L; + { add(expectedAttribValue); } @@ -362,6 +390,11 @@ public void testMultiAvuQueryCollectionWithPathHintShouldNotMatch() throws Excep element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals2 = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -1865812672570745880L; + { add(expectedAttribValue2); } @@ -375,6 +408,11 @@ public void testMultiAvuQueryCollectionWithPathHintShouldNotMatch() throws Excep element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals3 = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -9184949440646674338L; + { add(expectedAttribValue3); } @@ -454,6 +492,11 @@ public void testSimpleAvuQueryBothWithNoPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 4071941050619506448L; + { add(expectedAttribValue); } @@ -505,6 +548,11 @@ public void testSimpleAvuQueryAsJsonNoPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -1532506013030117943L; + { add(expectedAttribValue); } @@ -589,6 +637,11 @@ public void testSimpleAvuQueryOneDataObjectNoPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -8013696243369062357L; + { add(expectedAttribValue); } @@ -702,6 +755,11 @@ public void testSimpleAvuQueryOneDataObjectWithPathHint() throws Exception { element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 7473144390114916964L; + { add(expectedAttribValue); } @@ -821,6 +879,11 @@ public void testSimpleAvuQueryOneDataObjectWithRecursivePathHint() throws Except element.setOperator(QueryConditionOperators.EQUAL); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = -835166182864893893L; + { add(expectedAttribValue); } @@ -846,7 +909,7 @@ public void testSimpleAvuQueryOneDataObjectWithRecursivePathHint() throws Except /** * Test for issue with query metadata tags size > 0 #187 (this passes) * https://github.com/DICE-UNC/irods-cloud-browser/issues/187 - * + * * @throws Exception */ @Test @@ -911,6 +974,11 @@ public void testNoResultQueryGreaterZeroBug187() throws Exception { element.setOperator(QueryConditionOperators.GREATER_THAN); @SuppressWarnings("serial") List vals = new ArrayList() { + /** + * + */ + private static final long serialVersionUID = 3970267173962675539L; + { add("0"); } diff --git a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/AllTests.java b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/AllTests.java index c8bd0f3d5..2c1c1b43f 100644 --- a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/AllTests.java +++ b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/AllTests.java @@ -7,8 +7,7 @@ import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses({ MetadataQueryJsonServiceTest.class, - MetadataQueryServiceImplTest.class }) +@SuiteClasses({ MetadataQueryJsonServiceTest.class, MetadataQueryServiceImplTest.class }) public class AllTests { } diff --git a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/package-info.java b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/package-info.java index 98a9fa5df..666935c1b 100644 --- a/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/package-info.java +++ b/jargon-mdquery/src/test/java/org/irods/jargon/mdquery/unittest/package-info.java @@ -1,6 +1,6 @@ /** * unit test support - * + * * @author Mike Conway - DICE * */ diff --git a/jargon-pool/pom.xml b/jargon-pool/pom.xml index 2a8caa6da..2ed35ac27 100644 --- a/jargon-pool/pom.xml +++ b/jargon-pool/pom.xml @@ -6,7 +6,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-pool diff --git a/jargon-pool/src/test/java/org/irods/jargon/pool/conncache/JargonConnectionCacheTest.java b/jargon-pool/src/test/java/org/irods/jargon/pool/conncache/JargonConnectionCacheTest.java index 4ac3e413c..e1acf5425 100644 --- a/jargon-pool/src/test/java/org/irods/jargon/pool/conncache/JargonConnectionCacheTest.java +++ b/jargon-pool/src/test/java/org/irods/jargon/pool/conncache/JargonConnectionCacheTest.java @@ -7,11 +7,10 @@ import org.irods.jargon.core.pub.IRODSFileSystem; import org.irods.jargon.testutils.TestingPropertiesHelper; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; - public class JargonConnectionCacheTest { private static Properties testingProperties = new Properties(); diff --git a/jargon-ruleservice/pom.xml b/jargon-ruleservice/pom.xml index 629564916..ca623057e 100644 --- a/jargon-ruleservice/pom.xml +++ b/jargon-ruleservice/pom.xml @@ -3,7 +3,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-ruleservice diff --git a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionService.java b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionService.java index 6ef47db9b..f363f4c97 100644 --- a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionService.java +++ b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionService.java @@ -24,7 +24,7 @@ public interface RuleCompositionService { /** * Return a String which is the raw contents of an iRODS rule file * on iRODS - * + * * @param absolutePathToRuleFile * String with an iRODS absolute path to a rules file * @return String with the raw rule contents @@ -38,7 +38,7 @@ String loadRuleFromIrodsAsString(final String absolutePathToRuleFile) /** * Store a rule presented as a raw String. This method will parse the String out * as a level of validation. - * + * * @param ruleAbsolutePath * String with the iRODS absolute path where the rule * will be stored @@ -51,7 +51,7 @@ String loadRuleFromIrodsAsString(final String absolutePathToRuleFile) /** * Run a rule based on an arbitrary raw string that holds the desired rule - * + * * @param rule * String with the raw rule text * @return {@link IRODSRuleExecResult} with the output parameters and log from diff --git a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionServiceImpl.java b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionServiceImpl.java index 0bbb234e0..cd68ffe72 100644 --- a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionServiceImpl.java +++ b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/RuleCompositionServiceImpl.java @@ -233,12 +233,7 @@ public Rule loadRuleFromIrods(final String absolutePathToRuleFile) } } - /* - * (non-Javadoc) <<<<<<< HEAD - * - * @see org.irods.jargon.ruleservice.composition.RuleCompositionService# - * loadRuleFromIrodsAsString(java.lang.String) - */ + @Override public String loadRuleFromIrodsAsString(final String absolutePathToRuleFile) throws FileNotFoundException, MissingOrInvalidRuleException, JargonException { @@ -597,7 +592,7 @@ public RuleCompositionServiceImpl(final IRODSAccessObjectFactory irodsAccessObje /* * (non-Javadoc) - * + * * @see * org.irods.jargon.ruleservice.composition.RuleCompositionService#storeRule * (java.lang.String, java.lang.String) @@ -638,4 +633,4 @@ public IRODSRuleExecResult executeRuleAsRawString(final String rule) throws Jarg } -} \ No newline at end of file +} diff --git a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/package-info.java b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/package-info.java index 8fb8ce4d5..01b67ecc0 100644 --- a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/package-info.java +++ b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/composition/package-info.java @@ -1,6 +1,6 @@ /** * General services for composing rules (useful for rule builder interfaces) - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/formatting/package-info.java b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/formatting/package-info.java index b383675ce..bf9f894a4 100644 --- a/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/formatting/package-info.java +++ b/jargon-ruleservice/src/main/java/org/irods/jargon/ruleservice/formatting/package-info.java @@ -1,7 +1,7 @@ /** * Handy formatters supporting rule editing and interactive running in various * types of interfaces - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-ruleservice/src/test/java/org/irods/jargon/ruleservice/unittest/package-info.java b/jargon-ruleservice/src/test/java/org/irods/jargon/ruleservice/unittest/package-info.java index 56f5c4047..674345ea1 100644 --- a/jargon-ruleservice/src/test/java/org/irods/jargon/ruleservice/unittest/package-info.java +++ b/jargon-ruleservice/src/test/java/org/irods/jargon/ruleservice/unittest/package-info.java @@ -1,6 +1,6 @@ /** * Unit test suites - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-ticket/pom.xml b/jargon-ticket/pom.xml index 5f41f27ae..dcb0d5ad1 100644 --- a/jargon-ticket/pom.xml +++ b/jargon-ticket/pom.xml @@ -3,7 +3,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-ticket diff --git a/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketClientOperationsImplTest.java b/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketClientOperationsImplTest.java index 0adc4315c..c7dbe30e1 100644 --- a/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketClientOperationsImplTest.java +++ b/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketClientOperationsImplTest.java @@ -486,8 +486,8 @@ public final void testGetFileFromIRODSUsingTicketOnFileAsAnonymousNoTicketAccess /** * [#637] nested subdirs with ticket issued on parent up the tree - no access? - * - * + * + * * @throws Exception */ @Ignore @@ -565,7 +565,7 @@ public final void testGetCollectionFromIRODSUsingTicketOnCollectionAsAnonymous() /** * [#637] nested subdirs with ticket issued on parent up the tree - no access? - * + * * @throws Exception */ @Ignore @@ -724,7 +724,7 @@ public final void redeemTicketGetDataObjectAndStreamBack() throws Exception { /** * Get a ticket on a data object whose abs path has embedded spaces, then get * the data back as a stream - * + * * @throws Exception */ @Test diff --git a/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketDistributionServiceImplTest.java b/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketDistributionServiceImplTest.java index 37f5b23ae..c2a996a36 100644 --- a/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketDistributionServiceImplTest.java +++ b/jargon-ticket/src/test/java/org/irods/jargon/ticket/TicketDistributionServiceImplTest.java @@ -174,8 +174,8 @@ public final void testGetTicketDistributionForTicketWithSSL() throws Exception { /* * Get a ticket distribution for a valid ticket and context where I don't have a - * mid-tier host, so no URL generated <<<<<<< HEAD - * + * mid-tier host, so no URL generated + * */ @Test public final void testGetTicketDistributionForTicketNoHostInContext() throws Exception { diff --git a/jargon-user-profile/pom.xml b/jargon-user-profile/pom.xml index 425507e92..d4bde83be 100644 --- a/jargon-user-profile/pom.xml +++ b/jargon-user-profile/pom.xml @@ -4,7 +4,7 @@ jargon org.irods - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-user-profile diff --git a/jargon-user-profile/src/test/java/org/irods/jargon/userprofile/unittest/package-info.java b/jargon-user-profile/src/test/java/org/irods/jargon/userprofile/unittest/package-info.java index 21a7fafd4..15eac9498 100644 --- a/jargon-user-profile/src/test/java/org/irods/jargon/userprofile/unittest/package-info.java +++ b/jargon-user-profile/src/test/java/org/irods/jargon/userprofile/unittest/package-info.java @@ -1,6 +1,6 @@ /** * Unit test helpers and suites - * + * * @author Mike Conway - DICE (www.irods.org) see http://code.renci.org for * trackers, access info, and documentation * diff --git a/jargon-user-tagging/pom.xml b/jargon-user-tagging/pom.xml index 9e69a2f3b..21e76763a 100644 --- a/jargon-user-tagging/pom.xml +++ b/jargon-user-tagging/pom.xml @@ -2,7 +2,7 @@ org.irods jargon - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE 4.0.0 org.irods.jargon diff --git a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/domain/IRODSStarredFileOrCollection.java b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/domain/IRODSStarredFileOrCollection.java index d4cda5c7d..968d029e0 100644 --- a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/domain/IRODSStarredFileOrCollection.java +++ b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/domain/IRODSStarredFileOrCollection.java @@ -58,20 +58,19 @@ public IRODSStarredFileOrCollection(final MetadataDomain metadataDomain, final S * * Constructor describes the user and object that is being starred, and * providing a description. Includes information on data size, create, and * modified dates - * + * * @param metadataDomain - * MetaDataAndDomainData.MetadataDomain enum value - * that identifies the domain object type that is tagged (e.g. - * DataObject, Collection) + * MetaDataAndDomainData.MetadataDomain enum value that + * identifies the domain object type that is tagged (e.g. DataObject, + * Collection) * @param domainUniqueName - * String with the unque name for the tagged data - * object (e.g. iRODS absolute path for a data object or - * collection). + * String with the unque name for the tagged data object + * (e.g. iRODS absolute path for a data object or collection). * @param description * String with a description of the favorite. * @param userName - * String with the user name who is associated with - * the tags. + * String with the user name who is associated with the + * tags. * @param dataSize * long with the data size * @param createdAt @@ -79,12 +78,10 @@ public IRODSStarredFileOrCollection(final MetadataDomain metadataDomain, final S * @param modifiedAt * {@link Date} modified, can be null */ - public IRODSStarredFileOrCollection(MetadataDomain metadataDomain, - String domainUniqueName, final String description, String userName, - long dataSize, Date createdAt, Date modifiedAt) - throws JargonException { - super(metadataDomain, domainUniqueName, userName, dataSize, createdAt, - modifiedAt); + public IRODSStarredFileOrCollection(final MetadataDomain metadataDomain, final String domainUniqueName, + final String description, final String userName, final long dataSize, final Date createdAt, + final Date modifiedAt) throws JargonException { + super(metadataDomain, domainUniqueName, userName, dataSize, createdAt, modifiedAt); if (description == null) { throw new JargonException("null spaceDelimitedTagsForDomain"); } diff --git a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/sharing/IRODSSharingServiceImpl.java b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/sharing/IRODSSharingServiceImpl.java index e99c41895..2bfb46d1a 100644 --- a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/sharing/IRODSSharingServiceImpl.java +++ b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/sharing/IRODSSharingServiceImpl.java @@ -732,7 +732,7 @@ private void indicateSharingSupport(final boolean isSupported) { /* * Will return {@code true} if I have already checked, and know that the sharing * specific queries are not set up on iRODS. - * + * */ private boolean isDeterminedThatSharingQueriesNotSupported() { if (getIrodsAccessObjectFactory().isUsingDynamicServerPropertiesCache()) { diff --git a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/starring/package-info.java b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/starring/package-info.java index 5eb7b8d03..4fb40fb8e 100644 --- a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/starring/package-info.java +++ b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/starring/package-info.java @@ -1,6 +1,6 @@ /** * Manages the starring of folders (setting as favorites) - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/IRODSTaggingServiceImpl.java b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/IRODSTaggingServiceImpl.java index 9eb11c53d..1606edab1 100644 --- a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/IRODSTaggingServiceImpl.java +++ b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/IRODSTaggingServiceImpl.java @@ -43,7 +43,7 @@ * does ensure that tag query/maintenance operations are done as the logged-in * user. Generally, the caller of this lower level service is responsible for * allowing or preventing updates on behalf of other users. - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/package-info.java b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/package-info.java index ec8656025..b1fd61f34 100644 --- a/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/package-info.java +++ b/jargon-user-tagging/src/main/java/org/irods/jargon/usertagging/tags/package-info.java @@ -1,6 +1,6 @@ /** * Manages the tagging of files or folders as free text tags and comments - * + * * @author Mike Conway - DICE (www.irods.org) * */ diff --git a/jargon-zipservice/pom.xml b/jargon-zipservice/pom.xml index 478d54a80..cc4d8def1 100644 --- a/jargon-zipservice/pom.xml +++ b/jargon-zipservice/pom.xml @@ -5,7 +5,7 @@ jargon org.irods - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE org.irods.jargon jargon-zipservice diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleClosingInputStream.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleClosingInputStream.java index 42f3197df..6dbf08e4a 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleClosingInputStream.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleClosingInputStream.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api; @@ -17,15 +17,15 @@ */ public class BundleClosingInputStream extends IRODSFileInputStream { - public BundleClosingInputStream(IRODSFile irodsFile, - FileIOOperations fileIOOperations) throws FileNotFoundException { + public BundleClosingInputStream(final IRODSFile irodsFile, final FileIOOperations fileIOOperations) + throws FileNotFoundException { super(irodsFile, fileIOOperations); } /* * (non-Javadoc) - * + * * @see org.irods.jargon.core.pub.io.IRODSFileInputStream#close() */ @Override diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleStreamWrapper.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleStreamWrapper.java index 911ecd4b9..645b4b9a0 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleStreamWrapper.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/BundleStreamWrapper.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api; @@ -8,7 +8,7 @@ /** * Wraps an imput stream from a bundle with extra info (such as length), useful * in - * + * * @author Mike Conway - DICE * */ @@ -19,8 +19,7 @@ public class BundleStreamWrapper { * @param length * @param bundleFileName */ - public BundleStreamWrapper(InputStream inputStream, long length, - String bundleFileName) { + public BundleStreamWrapper(final InputStream inputStream, final long length, final String bundleFileName) { super(); this.inputStream = inputStream; this.length = length; @@ -64,7 +63,7 @@ public String getBundleFileName() { /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipService.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipService.java index 6f853df4b..35b1537a5 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipService.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipService.java @@ -9,7 +9,7 @@ /** * Interface to a service to bundle up groups of files or collections and obtain * handles of various sources. This is a useful service for interfaces. - * + * * @author Mike Conway - DICE * */ @@ -24,68 +24,64 @@ public interface JargonZipService { * @param zipServiceConfiguration * the zipServiceConfiguration to set */ - public abstract void setZipServiceConfiguration( - ZipServiceConfiguration zipServiceConfiguration); + public abstract void setZipServiceConfiguration(ZipServiceConfiguration zipServiceConfiguration); /** - * Given a list of iRODS paths, obtain a bundle as an iRODS file that - * represents the files at those paths. + * Given a list of iRODS paths, obtain a bundle as an iRODS file that represents + * the files at those paths. *

    * Note that bundle type, failure modes, etc are all configured in the - * {@link ZipServiceConfiguration}. Any temporary directories will be - * cleaned up, and it is up to the caller to delete the bundle when done. - * + * {@link ZipServiceConfiguration}. Any temporary directories will be cleaned + * up, and it is up to the caller to delete the bundle when done. + * * @param irodsAbsolutePaths * List of iRODS paths * @return {@link IRODSFile} with the reference to the bundle * @throws ZipServiceException */ - public abstract IRODSFile obtainBundleAsIrodsFileGivenPaths( - List irodsAbsolutePaths) throws ZipServiceException; + public abstract IRODSFile obtainBundleAsIrodsFileGivenPaths(List irodsAbsolutePaths) + throws ZipServiceException; /** * Get the estimated size of the bundle given the provided paths - * + * * @param irodsAbsolutePaths * List of iRODS paths * @return long with the length of the * @throws ZipServiceException */ - public abstract long computeBundleSizeInBytes( - List irodsAbsolutePaths) throws ZipServiceException; + public abstract long computeBundleSizeInBytes(List irodsAbsolutePaths) throws ZipServiceException; /** - * Given a list of iRODS paths, obtain a bundle as an iRODS file that - * represents the files at those paths, represented by an input stream + * Given a list of iRODS paths, obtain a bundle as an iRODS file that represents + * the files at those paths, represented by an input stream *

    * Note that bundle type, failure modes, etc are all configured in the - * {@link ZipServiceConfiguration}. Note that closing the stream will cause - * the bundle and any temporary files to be cleaned up. - * + * {@link ZipServiceConfiguration}. Note that closing the stream will cause the + * bundle and any temporary files to be cleaned up. + * * @param irodsAbsolutePaths * List of iRODS paths * @return {@link InputStream} with the reference to the bundle * @throws ZipServiceException */ - InputStream obtainBundleAsInputStreamGivenPaths( - List irodsAbsolutePaths) throws ZipServiceException; + InputStream obtainBundleAsInputStreamGivenPaths(List irodsAbsolutePaths) throws ZipServiceException; /** - * Given a list of iRODS paths, obtain a bundle as an iRODS file that - * represents the files at those paths, represented by an input stream, - * wrapped in an object that contains data about the length of the file and - * its actual name. + * Given a list of iRODS paths, obtain a bundle as an iRODS file that represents + * the files at those paths, represented by an input stream, wrapped in an + * object that contains data about the length of the file and its actual name. *

    * Note that bundle type, failure modes, etc are all configured in the - * {@link ZipServiceConfiguration}. Note that closing the stream will cause - * the bundle and any temporary files to be cleaned up. - * + * {@link ZipServiceConfiguration}. Note that closing the stream will cause the + * bundle and any temporary files to be cleaned up. + * * @param irodsAbsolutePaths * List of iRODS paths * @return {@link InputStream} with the reference to the bundle * @throws ZipServiceException */ - BundleStreamWrapper obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths( - List irodsAbsolutePaths) throws ZipServiceException; + BundleStreamWrapper obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths(List irodsAbsolutePaths) + throws ZipServiceException; } \ No newline at end of file diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipServiceImpl.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipServiceImpl.java index 6d8a68e37..df4880572 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipServiceImpl.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/JargonZipServiceImpl.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api; @@ -30,22 +30,20 @@ /** * Abstract service to handle zipping and transferring a set of iRODS paths as * one bundle - * + * * @author Mike Conway - DICE * */ -public class JargonZipServiceImpl extends AbstractJargonService implements - JargonZipService { +public class JargonZipServiceImpl extends AbstractJargonService implements JargonZipService { private ZipServiceConfiguration zipServiceConfiguration = null; private final Random random; - public static final Logger log = LoggerFactory - .getLogger(JargonZipServiceImpl.class); + public static final Logger log = LoggerFactory.getLogger(JargonZipServiceImpl.class); public JargonZipServiceImpl() { super(); - this.random = new Random(); + random = new Random(); } /** @@ -53,22 +51,20 @@ public JargonZipServiceImpl() { * @param irodsAccessObjectFactory * @param irodsAccount */ - public JargonZipServiceImpl( - final ZipServiceConfiguration zipServiceConfiguration, - final IRODSAccessObjectFactory irodsAccessObjectFactory, - final IRODSAccount irodsAccount) { + public JargonZipServiceImpl(final ZipServiceConfiguration zipServiceConfiguration, + final IRODSAccessObjectFactory irodsAccessObjectFactory, final IRODSAccount irodsAccount) { super(irodsAccessObjectFactory, irodsAccount); if (zipServiceConfiguration == null) { throw new IllegalArgumentException("null zipServiceConfiguration"); } this.zipServiceConfiguration = zipServiceConfiguration; - this.random = new Random(); + random = new Random(); } /* * (non-Javadoc) - * + * * @see * org.irods.jargon.zipservice.api.JargonZipService#getZipServiceConfiguration * () @@ -80,25 +76,22 @@ public ZipServiceConfiguration getZipServiceConfiguration() { /* * (non-Javadoc) - * + * * @see * org.irods.jargon.zipservice.api.JargonZipService#setZipServiceConfiguration * (org.irods.jargon.zipservice.api.ZipServiceConfiguration) */ @Override - public void setZipServiceConfiguration( - ZipServiceConfiguration zipServiceConfiguration) { + public void setZipServiceConfiguration(final ZipServiceConfiguration zipServiceConfiguration) { this.zipServiceConfiguration = zipServiceConfiguration; } /** - * Handy method to verify configuration of this service before any - * opeerations - * + * Handy method to verify configuration of this service before any opeerations + * * @throws ZipServiceConfigurationException */ - protected void validateConfiguration() - throws ZipServiceConfigurationException { + protected void validateConfiguration() throws ZipServiceConfigurationException { if (zipServiceConfiguration == null) { throw new ZipServiceConfigurationException( "null zipServiceConfiguration, needs to be set before operations"); @@ -107,7 +100,7 @@ protected void validateConfiguration() /* * (non-Javadoc) - * + * * @see org.irods.jargon.zipservice.api.JargonZipService# * obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths(java.util.List) */ @@ -118,56 +111,50 @@ public BundleStreamWrapper obtainBundleAsInputStreamWithAdditionalMetadataGivenP log.info("obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths()"); FileIOOperations fileIOOperations; try { - fileIOOperations = new FileIOOperationsAOImpl(this - .getIrodsAccessObjectFactory().getIrodsSession(), - this.getIrodsAccount()); + fileIOOperations = new FileIOOperationsAOImpl(getIrodsAccessObjectFactory().getIrodsSession(), + getIrodsAccount()); IRODSFile bundleFile = obtainBundleAsIrodsFileGivenPaths(irodsAbsolutePaths); - BundleClosingInputStream inputStream = new BundleClosingInputStream( - bundleFile, fileIOOperations); - return new BundleStreamWrapper(inputStream, bundleFile.length(), - bundleFile.getName()); + BundleClosingInputStream inputStream = new BundleClosingInputStream(bundleFile, fileIOOperations); + return new BundleStreamWrapper(inputStream, bundleFile.length(), bundleFile.getName()); } catch (JargonException | FileNotFoundException e) { log.error("JargonException getting input stream", e); - throw new ZipServiceException( - "Jargon exception getting input stream", e); + throw new ZipServiceException("Jargon exception getting input stream", e); } } /* * (non-Javadoc) - * + * * @see org.irods.jargon.zipservice.api.JargonZipService# * obtainBundleAsInputStreamGivenPaths(java.util.List) */ @Override - public InputStream obtainBundleAsInputStreamGivenPaths( - final List irodsAbsolutePaths) throws ZipServiceException { + public InputStream obtainBundleAsInputStreamGivenPaths(final List irodsAbsolutePaths) + throws ZipServiceException { log.info("obtainInputStreamForBundleGivenPaths()"); FileIOOperations fileIOOperations; try { - fileIOOperations = new FileIOOperationsAOImpl(this - .getIrodsAccessObjectFactory().getIrodsSession(), - this.getIrodsAccount()); + fileIOOperations = new FileIOOperationsAOImpl(getIrodsAccessObjectFactory().getIrodsSession(), + getIrodsAccount()); IRODSFile bundleFile = obtainBundleAsIrodsFileGivenPaths(irodsAbsolutePaths); return new BundleClosingInputStream(bundleFile, fileIOOperations); } catch (JargonException | FileNotFoundException e) { log.error("JargonException getting input stream", e); - throw new ZipServiceException( - "Jargon exception getting input stream", e); + throw new ZipServiceException("Jargon exception getting input stream", e); } } /* * (non-Javadoc) - * + * * @see org.irods.jargon.zipservice.api.JargonZipService# * obtainBundleAsIrodsFileGivenPaths(java.util.List) */ @Override - public IRODSFile obtainBundleAsIrodsFileGivenPaths( - final List irodsAbsolutePaths) throws ZipServiceException { + public IRODSFile obtainBundleAsIrodsFileGivenPaths(final List irodsAbsolutePaths) + throws ZipServiceException { log.info("obtainInputStreamForBundleGivenPaths()"); if (irodsAbsolutePaths == null) { @@ -182,13 +169,9 @@ public IRODSFile obtainBundleAsIrodsFileGivenPaths( log.info("computed total size:{}", totalLength); - if (totalLength > this.getZipServiceConfiguration() - .getMaxTotalBytesForZip()) { - log.error( - "bundle total size is:{} and is larger than the configured maximum", - totalLength); - throw new ZipRequestTooLargeException( - "total size is larger than configured bundle max"); + if (totalLength > getZipServiceConfiguration().getMaxTotalBytesForZip()) { + log.error("bundle total size is:{} and is larger than the configured maximum", totalLength); + throw new ZipRequestTooLargeException("total size is larger than configured bundle max"); } log.info("copy phase, building a local subdir"); @@ -197,38 +180,31 @@ public IRODSFile obtainBundleAsIrodsFileGivenPaths( String parentPath = createOrReturnZipParentPath(); log.info("parent path:{}", parentPath); long currentTime = System.currentTimeMillis(); - IRODSFile bundleParent = createOrReturnBundlePath(currentTime, - parentPath); + IRODSFile bundleParent = createOrReturnBundlePath(currentTime, parentPath); log.info("begin the copy phase..."); copyFilesToBundleDir(irodsAbsolutePaths, bundleParent); log.info("create the bundle..."); BulkFileOperationsAO bulkFileOperationsAO; try { - bulkFileOperationsAO = this.getIrodsAccessObjectFactory() - .getBulkFileOperationsAO(getIrodsAccount()); + bulkFileOperationsAO = getIrodsAccessObjectFactory().getBulkFileOperationsAO(getIrodsAccount()); } catch (JargonException e) { log.error("JargonException getting bulkFileOperationsAO", e); - throw new ZipServiceException( - "Jargon exception getting bulkFileOperationsAO", e); + throw new ZipServiceException("Jargon exception getting bulkFileOperationsAO", e); } StringBuilder sb = new StringBuilder(parentPath); sb.append("/"); sb.append(bundleParent.getName()); - sb.append(BulkFileOperationsAOImpl - .fileExtensionForBundleType(zipServiceConfiguration - .getPreferredBundleType())); + sb.append( + BulkFileOperationsAOImpl.fileExtensionForBundleType(zipServiceConfiguration.getPreferredBundleType())); String zipFileName = sb.toString(); IRODSFile zipFile; try { - bulkFileOperationsAO.createABundleFromIrodsFilesAndStoreInIrods( - zipFileName, bundleParent.getAbsolutePath(), "", this - .getZipServiceConfiguration() - .getPreferredBundleType()); - zipFile = this.getIrodsAccessObjectFactory() - .getIRODSFileFactory(this.getIrodsAccount()) + bulkFileOperationsAO.createABundleFromIrodsFilesAndStoreInIrods(zipFileName, bundleParent.getAbsolutePath(), + "", getZipServiceConfiguration().getPreferredBundleType()); + zipFile = getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()) .instanceIRODSFile(zipFileName); log.info("delete temp files before returning the bundle file"); bundleParent.deleteWithForceOption(); @@ -244,52 +220,43 @@ public IRODSFile obtainBundleAsIrodsFileGivenPaths( /** * Copy files from the disparate paths to the bundle dir - * + * * @param irodsAbsolutePaths - * List with the paths that will be copied - * to the bundle directory + * List with the paths that will be copied to + * the bundle directory * @param bundleParent - * String with the absolute path of the bundle - * directory + * String with the absolute path of the bundle directory * @throws ZipServiceException * for any exception that occurs, there are subclasses of this * top-level exception that can be discerened */ - private void copyFilesToBundleDir(final List irodsAbsolutePaths, - IRODSFile bundleParent) throws ZipServiceException { + private void copyFilesToBundleDir(final List irodsAbsolutePaths, final IRODSFile bundleParent) + throws ZipServiceException { // now bundle parent exists and is blank, start the copies log.info("starting copies, may take a while..."); DataTransferOperations dataTransferOperations; try { - dataTransferOperations = this.getIrodsAccessObjectFactory() - .getDataTransferOperations(getIrodsAccount()); + dataTransferOperations = getIrodsAccessObjectFactory().getDataTransferOperations(getIrodsAccount()); } catch (JargonException e) { log.error("JargonException getting data transfer operations:{}", e); - throw new ZipServiceException( - "Jargon exception getting data transfer operations", e); + throw new ZipServiceException("Jargon exception getting data transfer operations", e); } for (String path : irodsAbsolutePaths) { log.info("copy {}", path); try { - TransferControlBlock tcb = this.irodsAccessObjectFactory + TransferControlBlock tcb = irodsAccessObjectFactory .buildDefaultTransferControlBlockBasedOnJargonProperties(); tcb.getTransferOptions().setForceOption(ForceOption.USE_FORCE); - dataTransferOperations.copy(path, "", - bundleParent.getAbsolutePath(), null, tcb); + dataTransferOperations.copy(path, "", bundleParent.getAbsolutePath(), null, tcb); } catch (JargonException e) { - if (this.zipServiceConfiguration.isFailFast()) { - log.error( - "JargonException copying to bundle dir for:{}, fail fast is set", - path, e); - throw new ZipServiceException( - "Unable to copy a file into the bundle dir - fail fast is set", - e); + if (zipServiceConfiguration.isFailFast()) { + log.error("JargonException copying to bundle dir for:{}, fail fast is set", path, e); + throw new ZipServiceException("Unable to copy a file into the bundle dir - fail fast is set", e); } else { - log.warn( - "JargonException copying to bundle dir for:{}, fail fast is not set, so we will proceed", + log.warn("JargonException copying to bundle dir for:{}, fail fast is not set, so we will proceed", path, e); } } @@ -301,26 +268,25 @@ private void copyFilesToBundleDir(final List irodsAbsolutePaths, * empty) bundle path exists *

    * Default algo is configured prefix + time stamp + a random int - * + * * @param currentTime * long with the timestamp of the request, used to * differentiate the files * @param parentPath - * String with the absolute path to the main parent - * of bundle files in general + * String with the absolute path to the main parent of + * bundle files in general * @return String with the absolute path to the parent for this * particular bundle, which will be cleared and created * @throws ZipServiceException */ - private IRODSFile createOrReturnBundlePath(long currentTime, - String parentPath) throws ZipServiceException { + private IRODSFile createOrReturnBundlePath(final long currentTime, final String parentPath) + throws ZipServiceException { log.info("createOrReturnBundlePath()"); if (parentPath == null || parentPath.isEmpty()) { throw new IllegalArgumentException("null or empty parentPath"); } - StringBuilder sb = new StringBuilder(this.getZipServiceConfiguration() - .getBundlePrefix()); + StringBuilder sb = new StringBuilder(getZipServiceConfiguration().getBundlePrefix()); sb.append('-'); sb.append(currentTime); sb.append('-'); @@ -328,8 +294,7 @@ private IRODSFile createOrReturnBundlePath(long currentTime, IRODSFile subdirFile; try { - subdirFile = this.getIrodsAccessObjectFactory() - .getIRODSFileFactory(getIrodsAccount()) + subdirFile = getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()) .instanceIRODSFile(parentPath, sb.toString()); subdirFile.deleteWithForceOption(); subdirFile.mkdirs(); @@ -343,31 +308,27 @@ private IRODSFile createOrReturnBundlePath(long currentTime, } /** - * Given the configuration, return a path to the subdir under which bundle - * dirs will be created. The subdirs are guaranteed to exist at least when - * this method returns - * - * @return String with the iRODS absloute path to the bundle - * parent + * Given the configuration, return a path to the subdir under which bundle dirs + * will be created. The subdirs are guaranteed to exist at least when this + * method returns + * + * @return String with the iRODS absloute path to the bundle parent * @throws ZipServiceException */ private String createOrReturnZipParentPath() throws ZipServiceException { log.info("createOrReturnZipParentPath()"); - if (!this.zipServiceConfiguration.isGenerateTempDirInUserHome()) { + if (!zipServiceConfiguration.isGenerateTempDirInUserHome()) { log.error("currently needs a subdir under the user home"); - throw new ZipServiceConfigurationException( - "unsupported zip location"); + throw new ZipServiceConfigurationException("unsupported zip location"); } StringBuilder sb = new StringBuilder(); - sb.append(MiscIRODSUtils - .buildIRODSUserHomeForAccountUsingDefaultScheme(getIrodsAccount())); + sb.append(MiscIRODSUtils.buildIRODSUserHomeForAccountUsingDefaultScheme(getIrodsAccount())); sb.append('/'); sb.append(zipServiceConfiguration.getBundleSubDirPath()); IRODSFile subdirFile; try { - subdirFile = this.getIrodsAccessObjectFactory() - .getIRODSFileFactory(getIrodsAccount()) + subdirFile = getIrodsAccessObjectFactory().getIRODSFileFactory(getIrodsAccount()) .instanceIRODSFile(sb.toString()); subdirFile.mkdirs(); } catch (JargonException e) { @@ -382,14 +343,13 @@ private String createOrReturnZipParentPath() throws ZipServiceException { /* * (non-Javadoc) - * + * * @see * org.irods.jargon.zipservice.api.JargonZipService#computeBundleSizeInBytes * (java.util.List) */ @Override - public long computeBundleSizeInBytes(List irodsAbsolutePaths) - throws ZipServiceException { + public long computeBundleSizeInBytes(final List irodsAbsolutePaths) throws ZipServiceException { log.info("computeBundleSizeInBytes()"); if (irodsAbsolutePaths == null) { @@ -400,16 +360,11 @@ public long computeBundleSizeInBytes(List irodsAbsolutePaths) } CollectionAndDataObjectListAndSearchAO collectionAndDataObjectAO; try { - collectionAndDataObjectAO = this.getIrodsAccessObjectFactory() - .getCollectionAndDataObjectListAndSearchAO( - getIrodsAccount()); + collectionAndDataObjectAO = getIrodsAccessObjectFactory() + .getCollectionAndDataObjectListAndSearchAO(getIrodsAccount()); } catch (JargonException e) { - log.error( - "JargonException getting CollectionAndDataObjectListAndSearchAO", - e); - throw new ZipServiceException( - "Jargon exception getting CollectionAndDataObjectListAndSearchAO", - e); + log.error("JargonException getting CollectionAndDataObjectListAndSearchAO", e); + throw new ZipServiceException("Jargon exception getting CollectionAndDataObjectListAndSearchAO", e); } long totalCount = 0; @@ -417,13 +372,10 @@ public long computeBundleSizeInBytes(List irodsAbsolutePaths) for (String path : irodsAbsolutePaths) { log.info("getting count for path:{}", path); try { - totalCount += collectionAndDataObjectAO - .totalDataObjectSizesUnderPath(path); + totalCount += collectionAndDataObjectAO.totalDataObjectSizesUnderPath(path); } catch (JargonException e) { log.error("JargonException counting under paths", e); - throw new ZipServiceException( - "Jargon exception getting CollectionAndDataObjectListAndSearchAO", - e); + throw new ZipServiceException("Jargon exception getting CollectionAndDataObjectListAndSearchAO", e); } } diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipRequestTooLargeException.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipRequestTooLargeException.java index 6a8eef4a0..248b3809f 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipRequestTooLargeException.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipRequestTooLargeException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api; @@ -7,21 +7,21 @@ /** * The requested bundle would be larger than the size configured - * + * * @author Mike Conway - DICE * */ public class ZipRequestTooLargeException extends ZipServiceException { /** - * + * */ private static final long serialVersionUID = 5159072487608024771L; /** * @param message */ - public ZipRequestTooLargeException(String message) { + public ZipRequestTooLargeException(final String message) { super(message); } @@ -29,14 +29,14 @@ public ZipRequestTooLargeException(String message) { * @param message * @param cause */ - public ZipRequestTooLargeException(String message, Throwable cause) { + public ZipRequestTooLargeException(final String message, final Throwable cause) { super(message, cause); } /** * @param cause */ - public ZipRequestTooLargeException(Throwable cause) { + public ZipRequestTooLargeException(final Throwable cause) { super(cause); } @@ -45,8 +45,8 @@ public ZipRequestTooLargeException(Throwable cause) { * @param cause * @param underlyingIRODSExceptionCode */ - public ZipRequestTooLargeException(String message, Throwable cause, - int underlyingIRODSExceptionCode) { + public ZipRequestTooLargeException(final String message, final Throwable cause, + final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } @@ -54,8 +54,7 @@ public ZipRequestTooLargeException(String message, Throwable cause, * @param cause * @param underlyingIRODSExceptionCode */ - public ZipRequestTooLargeException(Throwable cause, - int underlyingIRODSExceptionCode) { + public ZipRequestTooLargeException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } @@ -63,8 +62,7 @@ public ZipRequestTooLargeException(Throwable cause, * @param message * @param underlyingIRODSExceptionCode */ - public ZipRequestTooLargeException(String message, - int underlyingIRODSExceptionCode) { + public ZipRequestTooLargeException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipServiceConfiguration.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipServiceConfiguration.java index b667f2003..f4d1046eb 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipServiceConfiguration.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/ZipServiceConfiguration.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api; @@ -9,20 +9,19 @@ * Basic configuration for the zip service. *

    * Current assumptions for first round of service - * + * *

      - *
    • Bundles will be subdirectories under the bundleSubdirPath
    • - * * + *
    • Bundles will be subdirectories under the bundleSubdirPath
    • * *
    • The bundleSubdirPath will be under the logged-in user home
    • *
    • A bundle is created as a directory under that bundle path with the * bundlePrefix and a time stamp
    • *
    • The resulting bundle is underneath the bundleSubDirPath at the same level * as the child dir that was bundled up
    • - * + * *
    - * - * - * + * + * + * * @author Mike Conway - DICE * */ @@ -32,13 +31,13 @@ public class ZipServiceConfiguration { */ private long maxTotalBytesForZip = 5 * 1024 * 1024 * 1024; // default to 5GB /** - * Treat the temp bundle creation dir as a relative path in user home - * currently defaults to true + * Treat the temp bundle creation dir as a relative path in user home currently + * defaults to true */ private boolean generateTempDirInUserHome = true; /** - * The subdir that will be used under the bundle directory for creating - * child bundle folders + * The subdir that will be used under the bundle directory for creating child + * bundle folders */ private String bundleSubDirPath = ".jargonZipService"; /** @@ -52,8 +51,8 @@ public class ZipServiceConfiguration { private boolean failFast = true; /** - * Type of bundle to generate, note that for now it should stand at default - * and generate a tar. + * Type of bundle to generate, note that for now it should stand at default and + * generate a tar. */ private BundleType preferredBundleType = BundleType.DEFAULT; @@ -68,7 +67,7 @@ public long getMaxTotalBytesForZip() { * @param maxTotalBytesForZip * the maxTotalBytesForZip to set */ - public void setMaxTotalBytesForZip(long maxTotalBytesForZip) { + public void setMaxTotalBytesForZip(final long maxTotalBytesForZip) { this.maxTotalBytesForZip = maxTotalBytesForZip; } @@ -122,7 +121,7 @@ public String getBundleSubDirPath() { * @param bundleSubDirPath * the bundleSubDirPath to set */ - public void setBundleSubDirPath(String bundleSubDirPath) { + public void setBundleSubDirPath(final String bundleSubDirPath) { this.bundleSubDirPath = bundleSubDirPath; } @@ -137,7 +136,7 @@ public String getBundlePrefix() { * @param bundlePrefix * the bundlePrefix to set */ - public void setBundlePrefix(String bundlePrefix) { + public void setBundlePrefix(final String bundlePrefix) { this.bundlePrefix = bundlePrefix; } @@ -152,7 +151,7 @@ public boolean isFailFast() { * @param failFast * the failFast to set */ - public void setFailFast(boolean failFast) { + public void setFailFast(final boolean failFast) { this.failFast = failFast; } @@ -160,7 +159,7 @@ public BundleType getPreferredBundleType() { return preferredBundleType; } - public void setPreferredBundleType(BundleType preferredBundleType) { + public void setPreferredBundleType(final BundleType preferredBundleType) { this.preferredBundleType = preferredBundleType; } @@ -168,7 +167,7 @@ public void setPreferredBundleType(BundleType preferredBundleType) { * @param generateTempDirInUserHome * the generateTempDirInUserHome to set */ - public void setGenerateTempDirInUserHome(boolean generateTempDirInUserHome) { + public void setGenerateTempDirInUserHome(final boolean generateTempDirInUserHome) { this.generateTempDirInUserHome = generateTempDirInUserHome; } diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceConfigurationException.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceConfigurationException.java index e31134881..a7c49b3eb 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceConfigurationException.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceConfigurationException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api.exception; @@ -9,14 +9,14 @@ public class ZipServiceConfigurationException extends ZipServiceException { /** - * + * */ private static final long serialVersionUID = -2164051501532502589L; /** * @param message */ - public ZipServiceConfigurationException(String message) { + public ZipServiceConfigurationException(final String message) { super(message); } @@ -24,14 +24,14 @@ public ZipServiceConfigurationException(String message) { * @param message * @param cause */ - public ZipServiceConfigurationException(String message, Throwable cause) { + public ZipServiceConfigurationException(final String message, final Throwable cause) { super(message, cause); } /** * @param cause */ - public ZipServiceConfigurationException(Throwable cause) { + public ZipServiceConfigurationException(final Throwable cause) { super(cause); } @@ -40,8 +40,8 @@ public ZipServiceConfigurationException(Throwable cause) { * @param cause * @param underlyingIRODSExceptionCode */ - public ZipServiceConfigurationException(String message, Throwable cause, - int underlyingIRODSExceptionCode) { + public ZipServiceConfigurationException(final String message, final Throwable cause, + final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } @@ -49,8 +49,7 @@ public ZipServiceConfigurationException(String message, Throwable cause, * @param cause * @param underlyingIRODSExceptionCode */ - public ZipServiceConfigurationException(Throwable cause, - int underlyingIRODSExceptionCode) { + public ZipServiceConfigurationException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } @@ -58,8 +57,7 @@ public ZipServiceConfigurationException(Throwable cause, * @param message * @param underlyingIRODSExceptionCode */ - public ZipServiceConfigurationException(String message, - int underlyingIRODSExceptionCode) { + public ZipServiceConfigurationException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceException.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceException.java index 491dbb1bc..292a1857c 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceException.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/ZipServiceException.java @@ -1,5 +1,5 @@ /** - * + * */ package org.irods.jargon.zipservice.api.exception; @@ -12,14 +12,14 @@ public class ZipServiceException extends JargonException { /** - * + * */ private static final long serialVersionUID = 3527136057177654744L; /** * @param message */ - public ZipServiceException(String message) { + public ZipServiceException(final String message) { super(message); } @@ -27,14 +27,14 @@ public ZipServiceException(String message) { * @param message * @param cause */ - public ZipServiceException(String message, Throwable cause) { + public ZipServiceException(final String message, final Throwable cause) { super(message, cause); } /** * @param cause */ - public ZipServiceException(Throwable cause) { + public ZipServiceException(final Throwable cause) { super(cause); } @@ -43,8 +43,7 @@ public ZipServiceException(Throwable cause) { * @param cause * @param underlyingIRODSExceptionCode */ - public ZipServiceException(String message, Throwable cause, - int underlyingIRODSExceptionCode) { + public ZipServiceException(final String message, final Throwable cause, final int underlyingIRODSExceptionCode) { super(message, cause, underlyingIRODSExceptionCode); } @@ -52,7 +51,7 @@ public ZipServiceException(String message, Throwable cause, * @param cause * @param underlyingIRODSExceptionCode */ - public ZipServiceException(Throwable cause, int underlyingIRODSExceptionCode) { + public ZipServiceException(final Throwable cause, final int underlyingIRODSExceptionCode) { super(cause, underlyingIRODSExceptionCode); } @@ -60,7 +59,7 @@ public ZipServiceException(Throwable cause, int underlyingIRODSExceptionCode) { * @param message * @param underlyingIRODSExceptionCode */ - public ZipServiceException(String message, int underlyingIRODSExceptionCode) { + public ZipServiceException(final String message, final int underlyingIRODSExceptionCode) { super(message, underlyingIRODSExceptionCode); } diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/package-info.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/package-info.java index c53328766..b16d2dc1b 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/package-info.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/exception/package-info.java @@ -1,6 +1,5 @@ /** - * @author Mike Conway - DICE - * Various exceptions for the zip service + * @author Mike Conway - DICE Various exceptions for the zip service * */ package org.irods.jargon.zipservice.api.exception; \ No newline at end of file diff --git a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/package-info.java b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/package-info.java index 203920796..b6b995dc0 100644 --- a/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/package-info.java +++ b/jargon-zipservice/src/main/java/org/irods/jargon/zipservice/api/package-info.java @@ -1,6 +1,8 @@ /** - * Interfaces and core objects for the zip service, which handles creating bundles in iRODS and streaming them back, and other such convenience operations. - * + * Interfaces and core objects for the zip service, which handles creating + * bundles in iRODS and streaming them back, and other such convenience + * operations. + * * @author Mike Conway - DICE * */ diff --git a/jargon-zipservice/src/test/java/org/irods/jargon/zipservice/api/JargonZipServiceImplTest.java b/jargon-zipservice/src/test/java/org/irods/jargon/zipservice/api/JargonZipServiceImplTest.java index 09c4f9464..4d083ff96 100644 --- a/jargon-zipservice/src/test/java/org/irods/jargon/zipservice/api/JargonZipServiceImplTest.java +++ b/jargon-zipservice/src/test/java/org/irods/jargon/zipservice/api/JargonZipServiceImplTest.java @@ -6,8 +6,6 @@ import java.util.List; import java.util.Properties; -import org.junit.Assert; - import org.irods.jargon.core.connection.IRODSAccount; import org.irods.jargon.core.connection.JargonProperties; import org.irods.jargon.core.pub.DataTransferOperations; @@ -17,6 +15,7 @@ import org.irods.jargon.testutils.TestingPropertiesHelper; import org.irods.jargon.testutils.filemanip.FileGenerator; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -35,12 +34,10 @@ public class JargonZipServiceImplTest { public static void setUpBeforeClass() throws Exception { org.irods.jargon.testutils.TestingPropertiesHelper testingPropertiesLoader = new TestingPropertiesHelper(); testingProperties = testingPropertiesLoader.getTestProperties(); - scratchFileUtils = new org.irods.jargon.testutils.filemanip.ScratchFileUtils( - testingProperties); + scratchFileUtils = new org.irods.jargon.testutils.filemanip.ScratchFileUtils(testingProperties); irodsTestSetupUtilities = new org.irods.jargon.testutils.IRODSTestSetupUtilities(); irodsTestSetupUtilities.initializeIrodsScratchDirectory(); - irodsTestSetupUtilities - .initializeDirectoryForTest(IRODS_TEST_SUBDIR_PATH); + irodsTestSetupUtilities.initializeDirectoryForTest(IRODS_TEST_SUBDIR_PATH); irodsFileSystem = IRODSFileSystem.instance(); jargonOriginalProperties = irodsFileSystem.getJargonProperties(); } @@ -52,8 +49,7 @@ public static void tearDownAfterClass() throws Exception { @Before public void before() throws Exception { - irodsFileSystem.getIrodsSession().setJargonProperties( - jargonOriginalProperties); + irodsFileSystem.getIrodsSession().setJargonProperties(jargonOriginalProperties); } @Test @@ -61,91 +57,67 @@ public void testObtainBundleAsIrodsFileGivenPaths() throws Exception { String rootCollection = "testObtainBundleAsIrodsFileGivenPaths"; String localCollectionAbsolutePath = scratchFileUtils - .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH - + '/' + rootCollection); + .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/' + rootCollection); String irodsCollectionRootAbsolutePath = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); - - FileGenerator - .generateManyFilesAndCollectionsInParentCollectionByAbsolutePath( - localCollectionAbsolutePath, - "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", - ".txt", 3, 2, 20, 200); - - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - - IRODSFileFactory irodsFileFactory = irodsFileSystem - .getIRODSFileFactory(irodsAccount); - IRODSFile destFile = irodsFileFactory - .instanceIRODSFile(irodsCollectionRootAbsolutePath); - DataTransferOperations dataTransferOperationsAO = irodsFileSystem - .getIRODSAccessObjectFactory().getDataTransferOperations( - irodsAccount); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); + + FileGenerator.generateManyFilesAndCollectionsInParentCollectionByAbsolutePath(localCollectionAbsolutePath, + "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", ".txt", 3, 2, 20, 200); + + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + + IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(irodsAccount); + IRODSFile destFile = irodsFileFactory.instanceIRODSFile(irodsCollectionRootAbsolutePath); + DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory() + .getDataTransferOperations(irodsAccount); File localFile = new File(localCollectionAbsolutePath); dataTransferOperationsAO.putOperation(localFile, destFile, null, null); ZipServiceConfiguration zipServiceConfiguration = new ZipServiceConfiguration(); - JargonZipService jargonZipService = new JargonZipServiceImpl( - zipServiceConfiguration, + JargonZipService jargonZipService = new JargonZipServiceImpl(zipServiceConfiguration, irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); List paths = new ArrayList(); paths.add(irodsCollectionRootAbsolutePath + "/" + rootCollection); - IRODSFile bundle = jargonZipService - .obtainBundleAsIrodsFileGivenPaths(paths); + IRODSFile bundle = jargonZipService.obtainBundleAsIrodsFileGivenPaths(paths); Assert.assertTrue("did not return bundle", bundle.exists()); } @Test - public void testObtainBundleAsInputStreamWithAdditionalMetadataGivenPaths() - throws Exception { + public void testObtainBundleAsInputStreamWithAdditionalMetadataGivenPaths() throws Exception { String rootCollection = "testObtainBundleAsInputStreamGivenPaths"; String localCollectionAbsolutePath = scratchFileUtils - .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH - + '/' + rootCollection); + .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/' + rootCollection); String irodsCollectionRootAbsolutePath = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); - - FileGenerator - .generateManyFilesAndCollectionsInParentCollectionByAbsolutePath( - localCollectionAbsolutePath, - "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", - ".txt", 3, 2, 20, 200); - - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - - IRODSFileFactory irodsFileFactory = irodsFileSystem - .getIRODSFileFactory(irodsAccount); - IRODSFile destFile = irodsFileFactory - .instanceIRODSFile(irodsCollectionRootAbsolutePath); - DataTransferOperations dataTransferOperationsAO = irodsFileSystem - .getIRODSAccessObjectFactory().getDataTransferOperations( - irodsAccount); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); + + FileGenerator.generateManyFilesAndCollectionsInParentCollectionByAbsolutePath(localCollectionAbsolutePath, + "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", ".txt", 3, 2, 20, 200); + + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + + IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(irodsAccount); + IRODSFile destFile = irodsFileFactory.instanceIRODSFile(irodsCollectionRootAbsolutePath); + DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory() + .getDataTransferOperations(irodsAccount); File localFile = new File(localCollectionAbsolutePath); dataTransferOperationsAO.putOperation(localFile, destFile, null, null); ZipServiceConfiguration zipServiceConfiguration = new ZipServiceConfiguration(); - JargonZipService jargonZipService = new JargonZipServiceImpl( - zipServiceConfiguration, + JargonZipService jargonZipService = new JargonZipServiceImpl(zipServiceConfiguration, irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); List paths = new ArrayList(); paths.add(irodsCollectionRootAbsolutePath + "/" + rootCollection); - BundleStreamWrapper wrapper = jargonZipService - .obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths(paths); + BundleStreamWrapper wrapper = jargonZipService.obtainBundleAsInputStreamWithAdditionalMetadataGivenPaths(paths); Assert.assertNotNull("did not return bundle", wrapper); Assert.assertNotNull("no input stream", wrapper.getInputStream()); Assert.assertFalse("length incorrect", wrapper.getLength() == 0); - Assert.assertFalse("missing name", wrapper.getBundleFileName() - .isEmpty()); + Assert.assertFalse("missing name", wrapper.getBundleFileName().isEmpty()); } @@ -154,41 +126,30 @@ public void testObtainBundleAsInputStreamGivenPaths() throws Exception { String rootCollection = "testObtainBundleAsInputStreamGivenPaths"; String localCollectionAbsolutePath = scratchFileUtils - .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH - + '/' + rootCollection); + .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/' + rootCollection); String irodsCollectionRootAbsolutePath = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); - - FileGenerator - .generateManyFilesAndCollectionsInParentCollectionByAbsolutePath( - localCollectionAbsolutePath, - "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", - ".txt", 3, 2, 20, 200); - - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - - IRODSFileFactory irodsFileFactory = irodsFileSystem - .getIRODSFileFactory(irodsAccount); - IRODSFile destFile = irodsFileFactory - .instanceIRODSFile(irodsCollectionRootAbsolutePath); - DataTransferOperations dataTransferOperationsAO = irodsFileSystem - .getIRODSAccessObjectFactory().getDataTransferOperations( - irodsAccount); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); + + FileGenerator.generateManyFilesAndCollectionsInParentCollectionByAbsolutePath(localCollectionAbsolutePath, + "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", ".txt", 3, 2, 20, 200); + + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + + IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(irodsAccount); + IRODSFile destFile = irodsFileFactory.instanceIRODSFile(irodsCollectionRootAbsolutePath); + DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory() + .getDataTransferOperations(irodsAccount); File localFile = new File(localCollectionAbsolutePath); dataTransferOperationsAO.putOperation(localFile, destFile, null, null); ZipServiceConfiguration zipServiceConfiguration = new ZipServiceConfiguration(); - JargonZipService jargonZipService = new JargonZipServiceImpl( - zipServiceConfiguration, + JargonZipService jargonZipService = new JargonZipServiceImpl(zipServiceConfiguration, irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); List paths = new ArrayList(); paths.add(irodsCollectionRootAbsolutePath + "/" + rootCollection); - InputStream bundle = jargonZipService - .obtainBundleAsInputStreamGivenPaths(paths); + InputStream bundle = jargonZipService.obtainBundleAsInputStreamGivenPaths(paths); Assert.assertNotNull("did not return bundle", bundle); bundle.close(); // check for no errors @@ -200,35 +161,25 @@ public void testComputeBundleSizeInBytes() throws Exception { String rootCollection = "testComputeBundleSizeInBytes"; String localCollectionAbsolutePath = scratchFileUtils - .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH - + '/' + rootCollection); + .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/' + rootCollection); String irodsCollectionRootAbsolutePath = testingPropertiesHelper - .buildIRODSCollectionAbsolutePathFromTestProperties( - testingProperties, IRODS_TEST_SUBDIR_PATH); - - FileGenerator - .generateManyFilesAndCollectionsInParentCollectionByAbsolutePath( - localCollectionAbsolutePath, - "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", - ".txt", 3, 2, 20, 200); - - IRODSAccount irodsAccount = testingPropertiesHelper - .buildIRODSAccountFromTestProperties(testingProperties); - - IRODSFileFactory irodsFileFactory = irodsFileSystem - .getIRODSFileFactory(irodsAccount); - IRODSFile destFile = irodsFileFactory - .instanceIRODSFile(irodsCollectionRootAbsolutePath); - DataTransferOperations dataTransferOperationsAO = irodsFileSystem - .getIRODSAccessObjectFactory().getDataTransferOperations( - irodsAccount); + .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); + + FileGenerator.generateManyFilesAndCollectionsInParentCollectionByAbsolutePath(localCollectionAbsolutePath, + "testPutCollectionWithTwoFiles", 1, 2, 2, "testFile", ".txt", 3, 2, 20, 200); + + IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); + + IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(irodsAccount); + IRODSFile destFile = irodsFileFactory.instanceIRODSFile(irodsCollectionRootAbsolutePath); + DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory() + .getDataTransferOperations(irodsAccount); File localFile = new File(localCollectionAbsolutePath); dataTransferOperationsAO.putOperation(localFile, destFile, null, null); ZipServiceConfiguration zipServiceConfiguration = new ZipServiceConfiguration(); - JargonZipService jargonZipService = new JargonZipServiceImpl( - zipServiceConfiguration, + JargonZipService jargonZipService = new JargonZipServiceImpl(zipServiceConfiguration, irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); List paths = new ArrayList(); paths.add(irodsCollectionRootAbsolutePath + "/" + rootCollection); diff --git a/pom.xml b/pom.xml index cadea98bd..120a30efc 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.irods jargon-pom - 4.3.0.0-SNAPSHOT + 4.3.0.0-RELEASE Jargon Core Java API and related libraries for iRODS