01: package org.andromda.repositories.emf.uml2;
02:
03: import java.net.URL;
04:
05: import org.apache.log4j.Logger;
06:
07: public class TestModel {
08: private static final Logger logger = Logger
09: .getLogger(TestModel.class);
10:
11: public static URL getModel() {
12: try {
13: String testModel = "/Test-Model.emx";
14: URL modelUri = TestModel.class.getResource(testModel);
15: if (modelUri == null) {
16: throw new RuntimeException("Could not load '"
17: + testModel + "'");
18: }
19: return modelUri;
20: } catch (Throwable th) {
21: String errMsg = "Error performing TestModel.getModel()";
22: logger.error(errMsg, th);
23: throw new RuntimeException(errMsg, th);
24: }
25: }
26: }
|