Search in sources :

Example 21 with WSDataModel

use of com.amalto.workbench.webservices.WSDataModel in project tmdm-studio-se by Talend.

the class DataModelMainPage2 method updateSchemaToItem.

// 
public Item updateSchemaToItem(Item item) {
    WSDataModelE wsDataModelE = ((WSDataModelItem) item).getWsDataModel();
    WSDataModel wsDataModel = (WSDataModel) xobject.getWsObject();
    wsDataModelE.setXsdSchema(wsDataModel.getXsdSchema());
    return item;
}
Also used : WSDataModel(com.amalto.workbench.webservices.WSDataModel) WSDataModelItem(org.talend.mdm.repository.model.mdmproperties.WSDataModelItem) WSDataModelE(org.talend.mdm.repository.model.mdmserverobject.WSDataModelE)

Example 22 with WSDataModel

use of com.amalto.workbench.webservices.WSDataModel in project tmdm-studio-se by Talend.

the class UserSecurityComboBoxDialogCellEditor method getSchemaFromServer.

private String getSchemaFromServer() {
    String schema = null;
    MDMServerDef serverDef = getServerDef();
    if (isAccessible(serverDef)) {
        TMDMService service = getService(serverDef);
        WSDataModel wsDataModel = service.getDataModel(new WSGetDataModel(new WSDataModelPK(dataModelName)));
        schema = wsDataModel.getXsdSchema();
    }
    return schema;
}
Also used : WSDataModel(com.amalto.workbench.webservices.WSDataModel) TMDMService(com.amalto.workbench.webservices.TMDMService) MDMServerDef(org.talend.mdm.repository.model.mdmmetadata.MDMServerDef) WSGetDataModel(com.amalto.workbench.webservices.WSGetDataModel) WSDataModelPK(com.amalto.workbench.webservices.WSDataModelPK)

Example 23 with WSDataModel

use of com.amalto.workbench.webservices.WSDataModel in project tmdm-studio-se by Talend.

the class DataModelInteractiveHandler method convert.

@Override
public Object convert(Item item, MDMServerObject serverObj) {
    WSDataModel dataModel = (WSDataModel) super.convert(item, serverObj);
    IFile file = RepositoryResourceUtil.findReferenceFile(getRepositoryObjectType(), item, FILE_EXTENSION);
    String schema = RepositoryResourceUtil.getTextFileContent(file, ENCODE);
    dataModel.setXsdSchema(schema);
    return dataModel;
}
Also used : WSDataModel(com.amalto.workbench.webservices.WSDataModel) IFile(org.eclipse.core.resources.IFile)

Aggregations

WSDataModel (com.amalto.workbench.webservices.WSDataModel)23 WSDataModelPK (com.amalto.workbench.webservices.WSDataModelPK)10 WSGetDataModel (com.amalto.workbench.webservices.WSGetDataModel)10 SAXParseException (org.xml.sax.SAXParseException)8 TMDMService (com.amalto.workbench.webservices.TMDMService)6 PartInitException (org.eclipse.ui.PartInitException)6 TreeObject (com.amalto.workbench.models.TreeObject)5 XSDSchema (org.eclipse.xsd.XSDSchema)5 ByteArrayInputStream (java.io.ByteArrayInputStream)4 IFile (org.eclipse.core.resources.IFile)4 CoreException (org.eclipse.core.runtime.CoreException)4 TreeParent (com.amalto.workbench.models.TreeParent)3 WSDataCluster (com.amalto.workbench.webservices.WSDataCluster)3 WSDataClusterPK (com.amalto.workbench.webservices.WSDataClusterPK)3 WSGetDataCluster (com.amalto.workbench.webservices.WSGetDataCluster)3 WSGetMenu (com.amalto.workbench.webservices.WSGetMenu)3 WSGetRoutingRule (com.amalto.workbench.webservices.WSGetRoutingRule)3 WSGetStoredProcedure (com.amalto.workbench.webservices.WSGetStoredProcedure)3 WSGetTransformerV2 (com.amalto.workbench.webservices.WSGetTransformerV2)3 WSGetView (com.amalto.workbench.webservices.WSGetView)3