Skip to content

Commit

Permalink
#1 init impl profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Dec 28, 2017
1 parent 4f17014 commit 5289b69
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/**
*
*/
package org.irodsext.dataprofiler;

import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.exception.DataNotFoundException;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
import org.irods.jargon.core.pub.domain.Collection;
import org.irods.jargon.core.pub.domain.DataObject;
import org.irods.jargon.extensions.dataprofiler.DataProfile;
import org.irods.jargon.extensions.dataprofiler.DataProfileService;
import org.irods.jargon.extensions.dataprofiler.DataProfilerSettings;
import org.irods.jargon.extensions.datatyper.DataTypeResolutionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Mike Conway - NIEHS
*
*/
public class IrodsextDataProfilerService extends DataProfileService {

public static final Logger log = LoggerFactory.getLogger(IrodsextDataProfilerService.class);

/**
* @param defaultDataProfilerSettings
* @param dataTypeResolutionService
* @param irodsAccessObjectFactory
* @param irodsAccount
*/
public IrodsextDataProfilerService(DataProfilerSettings defaultDataProfilerSettings,
DataTypeResolutionService dataTypeResolutionService, IRODSAccessObjectFactory irodsAccessObjectFactory,
IRODSAccount irodsAccount) {
super(defaultDataProfilerSettings, dataTypeResolutionService, irodsAccessObjectFactory, irodsAccount);
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfile(java.lang.String)
*/
@Override
public DataProfile retrieveDataProfile(String irodsAbsolutePath) throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfile(java.lang.String,
* org.irods.jargon.extensions.dataprofiler.DataProfilerSettings)
*/
@Override
public DataProfile retrieveDataProfile(String irodsAbsolutePath, DataProfilerSettings dataProfilerSettings)
throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfileForCollection(java.lang.String)
*/
@Override
public DataProfile<Collection> retrieveDataProfileForCollection(String irodsAbsolutePath)
throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfileForCollection(java.lang.String,
* org.irods.jargon.extensions.dataprofiler.DataProfilerSettings)
*/
@Override
public DataProfile<Collection> retrieveDataProfileForCollection(String irodsAbsolutePath,
DataProfilerSettings dataProfilerSettings) throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfileForDataObject(java.lang.String)
*/
@Override
public DataProfile<DataObject> retrieveDataProfileForDataObject(String irodsAbsolutePath)
throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.extensions.dataprofiler.DataProfileService#
* retrieveDataProfileForDataObject(java.lang.String,
* org.irods.jargon.extensions.dataprofiler.DataProfilerSettings)
*/
@Override
public DataProfile<DataObject> retrieveDataProfileForDataObject(String irodsAbsolutePath,
DataProfilerSettings dataProfilerSettings) throws DataNotFoundException, JargonException {
// TODO Auto-generated method stub
return null;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

/**
* Data profiler associated with 'info' page functions of metalnx/irods-ext
* schema and conventions
*
* @author Mike Conway - NIEHS
*
*/
package org.irodsext.dataprofiler;
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/**
*
*/
package org.irodsext.dataprofiler;

import static org.junit.Assert.fail;

import java.util.Properties;

import org.irods.jargon.core.connection.JargonProperties;
import org.irods.jargon.core.connection.SettableJargonProperties;
import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.testutils.IRODSTestSetupUtilities;
import org.irods.jargon.testutils.TestingPropertiesHelper;
import org.irods.jargon.testutils.filemanip.ScratchFileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
* @author Mike Conway - NIEHS
*
*/
public class IrodsextDataProfilerServiceTest {

private static Properties testingProperties = new Properties();
private static TestingPropertiesHelper testingPropertiesHelper = new TestingPropertiesHelper();
private static ScratchFileUtils scratchFileUtils = null;
public static final String IRODS_TEST_SUBDIR_PATH = "IrodsextDataProfilerServiceTest";
private static IRODSTestSetupUtilities irodsTestSetupUtilities = null;
private static IRODSFileSystem irodsFileSystem;
private static JargonProperties jargonOriginalProperties = null;

@BeforeClass
public static void setUpBeforeClass() throws Exception {
TestingPropertiesHelper testingPropertiesLoader = new TestingPropertiesHelper();
testingProperties = testingPropertiesLoader.getTestProperties();
scratchFileUtils = new ScratchFileUtils(testingProperties);
scratchFileUtils.clearAndReinitializeScratchDirectory(IRODS_TEST_SUBDIR_PATH);
irodsTestSetupUtilities = new IRODSTestSetupUtilities();
irodsTestSetupUtilities.initializeIrodsScratchDirectory();
irodsTestSetupUtilities.initializeDirectoryForTest(IRODS_TEST_SUBDIR_PATH);
irodsFileSystem = IRODSFileSystem.instance();
SettableJargonProperties settableJargonProperties = new SettableJargonProperties(
irodsFileSystem.getJargonProperties());
jargonOriginalProperties = settableJargonProperties;
}

@AfterClass
public static void tearDownAfterClass() throws Exception {
irodsFileSystem.closeAndEatExceptions();
}

@Before
public void before() throws Exception {
// be sure that normal config is set up
irodsFileSystem.getIrodsSession().setJargonProperties(jargonOriginalProperties);
}

@After
public void afterEach() throws Exception {
irodsFileSystem.closeAndEatExceptions();
}

/**
* Test method for
* {@link org.irodsext.dataprofiler.IrodsextDataProfilerService#retrieveDataProfile(java.lang.String, org.irods.jargon.extensions.dataprofiler.DataProfilerSettings)}.
*/
@Test
public void testRetrieveDataProfileStringDataProfilerSettings() {
fail("Not yet implemented");
}

}

0 comments on commit 5289b69

Please sign in to comment.