Search in sources :

Example 1 with DQStructureManager

use of org.talend.dataprofiler.core.manager.DQStructureManager in project tdq-studio-se by Talend.

the class CreateExchangeFolderTask method doExecute.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.dataprofiler.core.migration.AMigrationTask#doExecute()
     */
@Override
protected boolean doExecute() throws Exception {
    DQStructureManager manager = DQStructureManager.getInstance();
    IFolder folder = manager.createNewFolder(ResourceManager.getLibrariesFolder(), EResourceConstant.EXCHANGE.getName());
    return folder != null && folder.exists();
}
Also used : DQStructureManager(org.talend.dataprofiler.core.manager.DQStructureManager) IFolder(org.eclipse.core.resources.IFolder)

Example 2 with DQStructureManager

use of org.talend.dataprofiler.core.manager.DQStructureManager in project tdq-studio-se by Talend.

the class CreateSystemIndicatorTask method copyToFolder.

/**
 * create the related folder with the path.
 *
 * @param folder
 */
private void copyToFolder(IFolder folder) {
    try {
        DQStructureManager manager = DQStructureManager.getInstance();
        folder.create(false, true, null);
        // $NON-NLS-1$
        manager.copyFilesToFolder(// $NON-NLS-1$
        CorePlugin.getDefault(), // $NON-NLS-1$
        new Path("/indicators/" + getFoldername()).toString(), // $NON-NLS-1$
        false, folder, null);
    } catch (Exception e1) {
        // $NON-NLS-1$ //$NON-NLS-2$
        log.error("do migration for " + getFoldername() + " failed:", e1);
    }
}
Also used : IPath(org.eclipse.core.runtime.IPath) Path(org.eclipse.core.runtime.Path) DQStructureManager(org.talend.dataprofiler.core.manager.DQStructureManager)

Example 3 with DQStructureManager

use of org.talend.dataprofiler.core.manager.DQStructureManager in project tdq-studio-se by Talend.

the class CreateUserDefIndicatorFolderTask method doExecute.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.dataprofiler.core.migration.AMigrationTask#doExecute()
     */
@Override
protected boolean doExecute() throws Exception {
    DQStructureManager manager = DQStructureManager.getInstance();
    // creator Indicators
    IFolder folder = manager.createNewFolder(ResourceManager.getLibrariesFolder(), EResourceConstant.INDICATORS.getName());
    ResourceService.setNoSubFolderProperty(folder);
    // create User Defined Indicators
    folder = manager.createNewFolder(folder, EResourceConstant.USER_DEFINED_INDICATORS.getName());
    return folder != null && folder.exists();
}
Also used : DQStructureManager(org.talend.dataprofiler.core.manager.DQStructureManager) IFolder(org.eclipse.core.resources.IFolder)

Example 4 with DQStructureManager

use of org.talend.dataprofiler.core.manager.DQStructureManager in project tdq-studio-se by Talend.

the class AddEastAsiaPatternFrequencyIndicatorTask method doExecute.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.dataprofiler.migration.AMigrationTask#doExecute()
     */
@Override
protected boolean doExecute() throws Exception {
    DQStructureManager manager = DQStructureManager.getInstance();
    // if the project version is lower than 6.1 and import from logon window, the target folder is "Pattern Finder".
    // or else, the target folder is renamed to "Pattern Frequency Statistics" by TDQ-11101.
    IFolder desFolder = ResourceManager.getSystemIndicatorFolder().getFolder(DESFOLDERNAME);
    if (!desFolder.exists()) {
        // $NON-NLS-1$
        desFolder = ResourceManager.getSystemIndicatorFolder().getFolder("Pattern Frequency Statistics");
    }
    manager.copyFilesToFolder(CorePlugin.getDefault(), new Path(SRCFOLDERPATH).toString(), false, desFolder, null);
    return true;
}
Also used : Path(org.eclipse.core.runtime.Path) DQStructureManager(org.talend.dataprofiler.core.manager.DQStructureManager) IFolder(org.eclipse.core.resources.IFolder)

Example 5 with DQStructureManager

use of org.talend.dataprofiler.core.manager.DQStructureManager in project tdq-studio-se by Talend.

the class CreateDQRulesFolderTask method doExecute.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.dataprofiler.core.migration.AMigrationTask#doExecute()
     */
@Override
protected boolean doExecute() throws Exception {
    DQStructureManager manager = DQStructureManager.getInstance();
    IFolder folder = manager.createNewFolder(ResourceManager.getLibrariesFolder(), DQ_RULES);
    manager.copyFilesToFolder(CorePlugin.getDefault(), DQStructureManager.RULES_PATH, true, folder, null);
    return folder != null && folder.exists();
}
Also used : DQStructureManager(org.talend.dataprofiler.core.manager.DQStructureManager) IFolder(org.eclipse.core.resources.IFolder)

Aggregations

DQStructureManager (org.talend.dataprofiler.core.manager.DQStructureManager)6 IFolder (org.eclipse.core.resources.IFolder)5 Path (org.eclipse.core.runtime.Path)2 Collection (java.util.Collection)1 IFile (org.eclipse.core.resources.IFile)1 IPath (org.eclipse.core.runtime.IPath)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 URI (org.eclipse.emf.common.util.URI)1 Analysis (org.talend.dataquality.analysis.Analysis)1 CompositeIndicator (org.talend.dataquality.indicators.CompositeIndicator)1 Indicator (org.talend.dataquality.indicators.Indicator)1 UserDefIndicator (org.talend.dataquality.indicators.sql.UserDefIndicator)1