Package org.apache.hop.imp
Class HopImportBase
- java.lang.Object
-
- org.apache.hop.imp.HopImportBase
-
- All Implemented Interfaces:
IHopImport
public abstract class HopImportBase extends Object implements IHopImport
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HopImportBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddDatabaseMeta(String filename, DatabaseMeta databaseMeta)protected voidcollectVariablesFromKettleProperties()abstract voidfindFilesToImport()IVariablesgetCollectedVariables()Gets collectedVariablesintgetConnectionCounter()Gets connectionCounterTreeMap<String,String>getConnectionFileMap()Gets connectionFileListList<DatabaseMeta>getConnectionsList()Gets connectionsListStringgetDefaultPipelineRunConfiguration()StringgetDefaultWorkflowRunConfiguration()abstract StringgetImportReport()Generate a report with statistics and advice.org.apache.commons.vfs2.FileObjectgetInputFolder()StringgetInputFolderName()Gets inputFolderNameStringgetJdbcPropertiesFilename()Gets jdbcPropertiesFilenameStringgetKettlePropertiesFilename()Gets kettlePropertiesFilenameILogChannelgetLog()Gets logMultiMetadataProvidergetMetadataProvider()Gets metadataProviderStringgetMetadataTargetFolder()Gets metadataTargetFolderHashMap<String,DOMSource>getMigratedFilesMap()Gets migratedFilesMapIProgressMonitorgetMonitor()Gets monitororg.apache.commons.vfs2.FileObjectgetOutputFolder()StringgetOutputFolderName()Gets outputFolderNameStringgetSharedXmlFilename()Gets sharedXmlFilenameStringgetTargetConfigFilename()Gets targetConfigFilenameintgetVariableCounter()Gets variableCounterIVariablesgetVariables()Gets variablesabstract voidimportConnections()Import connections from the specified source files/foldersabstract voidimportFiles()Import all files from the specified source folder to the targetabstract voidimportVariables()Import variables from the specified source files/foldersvoidinit(IVariables variables, ILogChannel log)Initialize the importerbooleanisSkippingExistingTargetFiles()Gets skippingExistingTargetFilesbooleanisSkippingFolders()Gets skippingFoldersbooleanisSkippingHiddenFilesAndFolders()Gets skippingHiddenFilesAndFoldersvoidrunImport(IProgressMonitor monitor)Perform the actual import of all filesvoidsetCollectedVariables(IVariables collectedVariables)voidsetConnectionCounter(int connectionCounter)voidsetConnectionFileMap(TreeMap<String,String> connectionFileMap)voidsetConnectionsList(List<DatabaseMeta> connectionsList)voidsetDefaultPipelineRunConfiguration(String defaultPipelineRunConfiguration)voidsetDefaultWorkflowRunConfiguration(String defaultWorkflowRunConfiguration)voidsetInputFolder(org.apache.commons.vfs2.FileObject inputFolder)voidsetInputFolderName(String inputFolderName)voidsetJdbcPropertiesFilename(String jdbcPropertiesFilename)voidsetKettlePropertiesFilename(String kettlePropertiesFilename)voidsetMetadataProvider(MultiMetadataProvider metadataProvider)voidsetMetadataTargetFolder(String metadataTargetFolder)voidsetMigratedFilesMap(HashMap<String,DOMSource> migratedFilesMap)voidsetMonitor(IProgressMonitor monitor)voidsetOutputFolder(org.apache.commons.vfs2.FileObject outputFolder)voidsetOutputFolderName(String outputFolderName)voidsetSharedXmlFilename(String sharedXmlFilename)voidsetSkippingExistingTargetFiles(boolean skippingExistingTargetFiles)voidsetSkippingFolders(boolean skippingFolders)voidsetSkippingHiddenFilesAndFolders(boolean skippingHiddenFilesAndFolders)voidsetTargetConfigFilename(String targetConfigFilename)voidsetValidateInputFolder(String inputFolderName)voidsetValidateOutputFolder(String outputFolderName)voidsetVariableCounter(int variableCounter)
-
-
-
Field Detail
-
log
protected ILogChannel log
-
variables
protected IVariables variables
-
inputFolderName
protected String inputFolderName
-
outputFolderName
protected String outputFolderName
-
sharedXmlFilename
protected String sharedXmlFilename
-
kettlePropertiesFilename
protected String kettlePropertiesFilename
-
jdbcPropertiesFilename
protected String jdbcPropertiesFilename
-
skippingExistingTargetFiles
protected boolean skippingExistingTargetFiles
-
targetConfigFilename
protected String targetConfigFilename
-
defaultPipelineRunConfiguration
protected String defaultPipelineRunConfiguration
-
defaultWorkflowRunConfiguration
protected String defaultWorkflowRunConfiguration
-
skippingHiddenFilesAndFolders
protected boolean skippingHiddenFilesAndFolders
-
skippingFolders
protected boolean skippingFolders
-
connectionsList
protected List<DatabaseMeta> connectionsList
-
collectedVariables
protected IVariables collectedVariables
-
inputFolder
protected org.apache.commons.vfs2.FileObject inputFolder
-
outputFolder
protected org.apache.commons.vfs2.FileObject outputFolder
-
connectionCounter
protected int connectionCounter
-
variableCounter
protected int variableCounter
-
metadataProvider
protected MultiMetadataProvider metadataProvider
-
monitor
protected IProgressMonitor monitor
-
metadataTargetFolder
protected String metadataTargetFolder
-
-
Method Detail
-
init
public void init(IVariables variables, ILogChannel log) throws HopException
Description copied from interface:IHopImportInitialize the importer- Specified by:
initin interfaceIHopImport- Throws:
HopException
-
runImport
public void runImport(IProgressMonitor monitor) throws HopException
Description copied from interface:IHopImportPerform the actual import of all files- Specified by:
runImportin interfaceIHopImport- Throws:
HopException
-
importFiles
public abstract void importFiles() throws HopExceptionDescription copied from interface:IHopImportImport all files from the specified source folder to the target- Specified by:
importFilesin interfaceIHopImport- Throws:
HopException
-
findFilesToImport
public abstract void findFilesToImport() throws HopException- Throws:
HopException
-
importConnections
public abstract void importConnections() throws HopExceptionDescription copied from interface:IHopImportImport connections from the specified source files/folders- Specified by:
importConnectionsin interfaceIHopImport- Throws:
HopException
-
importVariables
public abstract void importVariables() throws HopExceptionDescription copied from interface:IHopImportImport variables from the specified source files/folders- Specified by:
importVariablesin interfaceIHopImport- Throws:
HopException
-
collectVariablesFromKettleProperties
protected void collectVariablesFromKettleProperties() throws HopException- Throws:
HopException
-
addDatabaseMeta
public void addDatabaseMeta(String filename, DatabaseMeta databaseMeta) throws HopException
- Throws:
HopException
-
getInputFolder
public org.apache.commons.vfs2.FileObject getInputFolder()
- Specified by:
getInputFolderin interfaceIHopImport
-
setValidateInputFolder
public void setValidateInputFolder(String inputFolderName) throws HopException
- Specified by:
setValidateInputFolderin interfaceIHopImport- Throws:
HopException
-
getOutputFolder
public org.apache.commons.vfs2.FileObject getOutputFolder()
- Specified by:
getOutputFolderin interfaceIHopImport
-
setValidateOutputFolder
public void setValidateOutputFolder(String outputFolderName) throws HopException
- Specified by:
setValidateOutputFolderin interfaceIHopImport- Throws:
HopException
-
getInputFolderName
public String getInputFolderName()
Gets inputFolderName- Specified by:
getInputFolderNamein interfaceIHopImport- Returns:
- value of inputFolderName
-
setInputFolderName
public void setInputFolderName(String inputFolderName)
- Parameters:
inputFolderName- The inputFolderName to set
-
getOutputFolderName
public String getOutputFolderName()
Gets outputFolderName- Specified by:
getOutputFolderNamein interfaceIHopImport- Returns:
- value of outputFolderName
-
setOutputFolderName
public void setOutputFolderName(String outputFolderName)
- Parameters:
outputFolderName- The outputFolderName to set
-
getConnectionFileMap
public TreeMap<String,String> getConnectionFileMap()
Gets connectionFileList- Returns:
- value of connectionFileList
-
setConnectionFileMap
public void setConnectionFileMap(TreeMap<String,String> connectionFileMap)
- Parameters:
connectionFileMap- The connectionFileList to set
-
getConnectionsList
public List<DatabaseMeta> getConnectionsList()
Gets connectionsList- Returns:
- value of connectionsList
-
setConnectionsList
public void setConnectionsList(List<DatabaseMeta> connectionsList)
- Parameters:
connectionsList- The connectionsList to set
-
setInputFolder
public void setInputFolder(org.apache.commons.vfs2.FileObject inputFolder)
- Parameters:
inputFolder- The inputFolder to set
-
setOutputFolder
public void setOutputFolder(org.apache.commons.vfs2.FileObject outputFolder)
- Parameters:
outputFolder- The outputFolder to set
-
getLog
public ILogChannel getLog()
Gets log- Returns:
- value of log
-
getMigratedFilesMap
public HashMap<String,DOMSource> getMigratedFilesMap()
Gets migratedFilesMap- Returns:
- value of migratedFilesMap
-
setMigratedFilesMap
public void setMigratedFilesMap(HashMap<String,DOMSource> migratedFilesMap)
- Parameters:
migratedFilesMap- The migratedFilesMap to set
-
getConnectionCounter
public int getConnectionCounter()
Gets connectionCounter- Returns:
- value of connectionCounter
-
setConnectionCounter
public void setConnectionCounter(int connectionCounter)
- Parameters:
connectionCounter- The connectionCounter to set
-
getVariableCounter
public int getVariableCounter()
Gets variableCounter- Returns:
- value of variableCounter
-
setVariableCounter
public void setVariableCounter(int variableCounter)
- Parameters:
variableCounter- The variableCounter to set
-
isSkippingExistingTargetFiles
public boolean isSkippingExistingTargetFiles()
Gets skippingExistingTargetFiles- Specified by:
isSkippingExistingTargetFilesin interfaceIHopImport- Returns:
- value of skippingExistingTargetFiles
-
setSkippingExistingTargetFiles
public void setSkippingExistingTargetFiles(boolean skippingExistingTargetFiles)
- Specified by:
setSkippingExistingTargetFilesin interfaceIHopImport- Parameters:
skippingExistingTargetFiles- The skippingExistingTargetFiles to set
-
getSharedXmlFilename
public String getSharedXmlFilename()
Gets sharedXmlFilename- Specified by:
getSharedXmlFilenamein interfaceIHopImport- Returns:
- value of sharedXmlFilename
-
setSharedXmlFilename
public void setSharedXmlFilename(String sharedXmlFilename)
- Specified by:
setSharedXmlFilenamein interfaceIHopImport- Parameters:
sharedXmlFilename- The sharedXmlFilename to set
-
getKettlePropertiesFilename
public String getKettlePropertiesFilename()
Gets kettlePropertiesFilename- Specified by:
getKettlePropertiesFilenamein interfaceIHopImport- Returns:
- value of kettlePropertiesFilename
-
setKettlePropertiesFilename
public void setKettlePropertiesFilename(String kettlePropertiesFilename)
- Specified by:
setKettlePropertiesFilenamein interfaceIHopImport- Parameters:
kettlePropertiesFilename- The kettlePropertiesFilename to set
-
getJdbcPropertiesFilename
public String getJdbcPropertiesFilename()
Gets jdbcPropertiesFilename- Specified by:
getJdbcPropertiesFilenamein interfaceIHopImport- Returns:
- value of jdbcPropertiesFilename
-
setJdbcPropertiesFilename
public void setJdbcPropertiesFilename(String jdbcPropertiesFilename)
- Specified by:
setJdbcPropertiesFilenamein interfaceIHopImport- Parameters:
jdbcPropertiesFilename- The jdbcPropertiesFilename to set
-
getVariables
public IVariables getVariables()
Gets variables- Returns:
- value of variables
-
getMetadataProvider
public MultiMetadataProvider getMetadataProvider()
Gets metadataProvider- Specified by:
getMetadataProviderin interfaceIHopImport- Returns:
- value of metadataProvider
-
setMetadataProvider
public void setMetadataProvider(MultiMetadataProvider metadataProvider)
- Specified by:
setMetadataProviderin interfaceIHopImport- Parameters:
metadataProvider- The metadataProvider to set
-
getTargetConfigFilename
public String getTargetConfigFilename()
Gets targetConfigFilename- Specified by:
getTargetConfigFilenamein interfaceIHopImport- Returns:
- value of targetConfigFilename
-
setTargetConfigFilename
public void setTargetConfigFilename(String targetConfigFilename)
- Specified by:
setTargetConfigFilenamein interfaceIHopImport- Parameters:
targetConfigFilename- The targetConfigFilename to set
-
getDefaultPipelineRunConfiguration
public String getDefaultPipelineRunConfiguration()
-
setDefaultPipelineRunConfiguration
public void setDefaultPipelineRunConfiguration(String defaultPipelineRunConfiguration)
-
getDefaultWorkflowRunConfiguration
public String getDefaultWorkflowRunConfiguration()
-
setDefaultWorkflowRunConfiguration
public void setDefaultWorkflowRunConfiguration(String defaultWorkflowRunConfiguration)
-
getCollectedVariables
public IVariables getCollectedVariables()
Gets collectedVariables- Returns:
- value of collectedVariables
-
setCollectedVariables
public void setCollectedVariables(IVariables collectedVariables)
- Parameters:
collectedVariables- The collectedVariables to set
-
getMonitor
public IProgressMonitor getMonitor()
Gets monitor- Returns:
- value of monitor
-
setMonitor
public void setMonitor(IProgressMonitor monitor)
- Parameters:
monitor- The monitor to set
-
getMetadataTargetFolder
public String getMetadataTargetFolder()
Gets metadataTargetFolder- Returns:
- value of metadataTargetFolder
-
setMetadataTargetFolder
public void setMetadataTargetFolder(String metadataTargetFolder)
- Parameters:
metadataTargetFolder- The metadataTargetFolder to set
-
isSkippingHiddenFilesAndFolders
public boolean isSkippingHiddenFilesAndFolders()
Gets skippingHiddenFilesAndFolders- Specified by:
isSkippingHiddenFilesAndFoldersin interfaceIHopImport- Returns:
- value of skippingHiddenFilesAndFolders
-
setSkippingHiddenFilesAndFolders
public void setSkippingHiddenFilesAndFolders(boolean skippingHiddenFilesAndFolders)
- Specified by:
setSkippingHiddenFilesAndFoldersin interfaceIHopImport- Parameters:
skippingHiddenFilesAndFolders- The skippingHiddenFilesAndFolders to set
-
isSkippingFolders
public boolean isSkippingFolders()
Gets skippingFolders- Specified by:
isSkippingFoldersin interfaceIHopImport- Returns:
- value of skippingFolders
-
setSkippingFolders
public void setSkippingFolders(boolean skippingFolders)
- Specified by:
setSkippingFoldersin interfaceIHopImport- Parameters:
skippingFolders- The skippingFolders to set
-
getImportReport
public abstract String getImportReport()
Generate a report with statistics and advice.- Specified by:
getImportReportin interfaceIHopImport- Returns:
- The import report
-
-