01: /**
02: *
03: */package core;
04:
05: import model.ModelEditor;
06:
07: import org.openarchitectureware.workflow.issues.Issues;
08:
09: /**
10: * @author sh
11: *
12: */
13: public class ModelAccessTest {
14:
15: // singleton
16: public static final ModelAccessTest INSTANCE = new ModelAccessTest();
17:
18: /**
19: * This is a method used for ModelEditor.loadModels method.
20: * If no models were found or a meta model file could't be
21: * found and exception is returned which is added as error.
22: * All problems e.g. errors and warnings found during loading
23: * the models are returned by an Issues object.
24: *
25: * @return an issues object containing errors and warings
26: */
27: public Issues readModel() {
28: // try to load the models
29: ModelEditor.INSTANCE.loadModels();
30:
31: // get the problems
32: return ModelEditor.INSTANCE.getIssues();
33: }
34: }
|