use of orgomg.cwmx.analysis.informationreporting.Report in project tdq-studio-se by Talend.
the class UnitTestBuildHelper method createRealReport.
/**
* DOC talend Comment method "createRealReport".
*
* @param name the name of report
* @param folder the path which report location
* @param isDelete the report whether is logic delate
*/
public static Report createRealReport(String name, IFolder folder, Boolean isDelete) {
IPath createPath = Path.EMPTY;
if (folder != null) {
createPath = new Path(folder.getFullPath().lastSegment());
}
Report report1 = ReportHelper.createReport(name);
TDQReportItem item1 = PropertiesFactoryImpl.eINSTANCE.createTDQReportItem();
org.talend.core.model.properties.Property property1 = PropertiesFactory.eINSTANCE.createProperty();
property1.setId(EcoreUtil.generateUUID());
property1.setItem(item1);
property1.setLabel(report1.getName());
item1.setProperty(property1);
item1.setReport(report1);
ItemState itemState = org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createItemState();
itemState.setDeleted(isDelete);
item1.setState(itemState);
try {
ProxyRepositoryFactory.getInstance().create(item1, createPath, false);
} catch (PersistenceException e) {
Assert.fail(e.getMessage());
}
return report1;
}
use of orgomg.cwmx.analysis.informationreporting.Report in project tdq-studio-se by Talend.
the class UnitTestBuildHelper method createRealReportNode.
/**
* create a real ReportRepNode.
*
* @param name report name
* @param folder report's parent folder
* @param isDelete delete flag
* @return
*/
public static ReportRepNode createRealReportNode(String name, RepositoryNode parentNode, IPath createPath, Boolean isDelete) {
ReportRepNode reportRepNode = null;
Report report = ReportHelper.createReport(name);
TDQReportItem reportItem = PropertiesFactoryImpl.eINSTANCE.createTDQReportItem();
org.talend.core.model.properties.Property reportProperty = PropertiesFactory.eINSTANCE.createProperty();
reportProperty.setId(EcoreUtil.generateUUID());
reportProperty.setItem(reportItem);
reportProperty.setLabel(report.getName());
reportItem.setProperty(reportProperty);
reportItem.setReport(report);
ItemState itemState = org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createItemState();
itemState.setDeleted(isDelete);
reportItem.setState(itemState);
try {
ProxyRepositoryFactory.getInstance().create(reportItem, createPath, false);
IRepositoryViewObject reportViewObject = new RepositoryViewObject(reportProperty);
reportRepNode = new ReportRepNode(reportViewObject, parentNode, ENodeType.REPOSITORY_ELEMENT, null);
} catch (PersistenceException e) {
Assert.fail(e.getMessage());
}
return reportRepNode;
}
use of orgomg.cwmx.analysis.informationreporting.Report in project tdq-studio-se by Talend.
the class ResourceViewLabelProviderTest method createReport.
private void createReport(String name, IPath createPath, Boolean isDelete) {
Report report1 = ReportHelper.createReport(name);
TDQReportItem item1 = PropertiesFactoryImpl.eINSTANCE.createTDQReportItem();
org.talend.core.model.properties.Property property1 = PropertiesFactory.eINSTANCE.createProperty();
property1.setId(EcoreUtil.generateUUID());
property1.setItem(item1);
property1.setLabel(report1.getName());
item1.setProperty(property1);
item1.setReport(report1);
ItemState itemState = org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createItemState();
itemState.setDeleted(isDelete);
item1.setState(itemState);
try {
ProxyRepositoryFactory.getInstance().create(item1, createPath, false);
} catch (PersistenceException e) {
Assert.fail(e.getMessage());
}
}
use of orgomg.cwmx.analysis.informationreporting.Report in project tdq-studio-se by Talend.
the class RespositoryDetailView method createTechnicalDetail.
private void createTechnicalDetail(IRepositoryViewObject reposViewObj) {
// MOD klliu the DQRepositoryview unified with tos, so refactor as follow bug 19154 2011-02-28
if (reposViewObj.getProperty() != null) {
Item item = reposViewObj.getProperty().getItem();
if (item instanceof ConnectionItem) {
Connection conn = ((ConnectionItem) item).getConnection();
createTechnicalDetail(conn);
} else if (item instanceof TDQAnalysisItem) {
Analysis analysis = ((TDQAnalysisItem) item).getAnalysis();
createTechnicalDetail(analysis);
} else if (item instanceof TDQPatternItem) {
Pattern pattern = ((TDQPatternItem) item).getPattern();
createTechnicalDetail(pattern);
} else if (item instanceof TDQReportItem) {
Report report = ((TDQReportItem) item).getReport();
createTechnicalDetail(report);
}
}
}
use of orgomg.cwmx.analysis.informationreporting.Report in project tdq-studio-se by Talend.
the class TDQReportItemImpl method setReport.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setReport(Report newReport) {
Report oldReport = report;
report = newReport;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.TDQ_REPORT_ITEM__REPORT, oldReport, report));
}
Aggregations