[86] | 1 | // Copyright 2015 Georg-August-Universität Göttingen, Germany |
---|
[41] | 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 | |
---|
[32] | 15 | package de.ugoe.cs.cpdp.decentApp; |
---|
| 16 | |
---|
| 17 | import org.eclipse.emf.ecore.EValidator; |
---|
| 18 | import org.eclipse.emf.ecore.util.EObjectValidator; |
---|
| 19 | |
---|
[36] | 20 | import de.ugoe.cs.cpdp.decentApp.models.arffx.ARFFxPackage; |
---|
| 21 | import de.ugoe.cs.cpdp.decentApp.models.arffx.impl.ARFFxPackageImpl; |
---|
[32] | 22 | |
---|
| 23 | /** |
---|
| 24 | * Class for handling arffx model files |
---|
| 25 | * |
---|
| 26 | * @author Philip Makedonski, Fabian Trautsch |
---|
[41] | 27 | * |
---|
[32] | 28 | */ |
---|
| 29 | public class ARFFxResourceTool extends ResourceTool { |
---|
| 30 | |
---|
[41] | 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 | |
---|
[32] | 53 | } |
---|