private void addGetTextFilesProcedure(ModelResource mr) throws ModelerCoreException { EObject stringType = datatypeManager.findDatatype("string"); // $NON-NLS-1$ EObject clobType = datatypeManager.findDatatype("clob"); // $NON-NLS-1$ Procedure proc = factory.createProcedure(); proc.setName("getTextFiles"); // $NON-NLS-1$ ProcedureParameter param = factory.createProcedureParameter(); param.setProcedure(proc); param.setName("pathAndExt"); // $NON-NLS-1$ param.setProcedure(proc); if (stringType != null) { param.setType(stringType); } ProcedureResult result = factory.createProcedureResult(); result.setName("Result"); // $NON-NLS-1$ result.setProcedure(proc); Column column_1 = factory.createColumn(); column_1.setName("file"); // $NON-NLS-1$ if (clobType != null) { column_1.setType(clobType); } addValue(result, column_1, result.getColumns()); Column column_2 = factory.createColumn(); column_2.setName("filePath"); // $NON-NLS-1$ if (stringType != null) { column_2.setType(stringType); } addValue(result, column_2, result.getColumns()); addValue(mr, proc, getModelResourceContents(mr)); }
private void addSaveFileProcedure(ModelResource mr) throws ModelerCoreException { EObject stringType = datatypeManager.findDatatype("string"); // $NON-NLS-1$ EObject objectType = datatypeManager.findDatatype("object"); // $NON-NLS-1$ Procedure proc = factory.createProcedure(); proc.setName("saveFile"); // $NON-NLS-1$ ProcedureParameter param = factory.createProcedureParameter(); param.setProcedure(proc); param.setName("filePath"); // $NON-NLS-1$ param.setProcedure(proc); if (stringType != null) { param.setType(stringType); } param = factory.createProcedureParameter(); param.setProcedure(proc); param.setName("value"); // $NON-NLS-1$ param.setProcedure(proc); if (objectType != null) { param.setType(objectType); } addValue(mr, proc, getModelResourceContents(mr)); }