source: trunk/CrossPare/src/de/ugoe/cs/cpdp/decentApp/ARFFxResourceTool.java @ 46

Last change on this file since 46 was 41, checked in by sherbold, 9 years ago
  • formatted code and added copyrights
  • Property svn:mime-type set to text/plain
File size: 1.7 KB
Line 
1// Copyright 2015 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.cpdp.decentApp;
16
17import org.eclipse.emf.ecore.EValidator;
18import org.eclipse.emf.ecore.util.EObjectValidator;
19
20import de.ugoe.cs.cpdp.decentApp.models.arffx.ARFFxPackage;
21import de.ugoe.cs.cpdp.decentApp.models.arffx.impl.ARFFxPackageImpl;
22
23/**
24 * Class for handling arffx model files
25 *
26 * @author Philip Makedonski, Fabian Trautsch
27 *
28 */
29public class ARFFxResourceTool extends ResourceTool {
30
31    /**
32     * Initializes the Tool Factory, from which the models can be loaded and inizializes the
33     * validator.
34     */
35    public ARFFxResourceTool() {
36        super(ARFFxResourceTool.class.getName());
37        ARFFxPackageImpl.init();
38
39        // Commented, because simulation has problems with this
40        initializeValidator();
41    }
42
43    /**
44     * Inizializes the model validator
45     */
46    @Override
47    protected void initializeValidator() {
48        super.initializeValidator();
49        EObjectValidator validator = new EObjectValidator();
50        EValidator.Registry.INSTANCE.put(ARFFxPackage.eINSTANCE, validator);
51    }
52
53}
Note: See TracBrowser for help on using the repository browser.