/** * Copyright (c) 2017 CentraleSupélec & EDF. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * This file is part of the RiseClipse tool * * Contributors: * Computer Science Department, CentraleSupélec * EDF R&D * Contacts: * dominique.marcadet@centralesupelec.fr * aurelie.dehouck-neveu@edf.fr * Web site: * http://wdi.supelec.fr/software/RiseClipse/ */ import scl: 'http://www.iec.ch/61850/2003/SCL' include '../Helpers/BaseSimpleTypes.ocl' package scl context AbstractDataObject -- extends UnNaming -- The name attribute shall be present inv AbstractDataObject_name_required ( '[OCL validation] name attribute shall be present in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + ')' ) : self.name <> null -- The name attribute shall be valid -- must be done in subclasses because the rule is not the same between DO and SDO -- inv AbstractDataObject_name_valid -- ( '[OCL validation] name attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). ' -- + 'Current value is ' + self.name.toString() -- ) -- : -- self.name <> null implies self.validSclDataName( name ) inv AbstractDataObject_type_required ( '[OCL validation] type attribute shall be present in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + ')' ) : self.type <> null -- The type attribute shall be valid inv AbstractDataObject_type_valid ( '[OCL validation] type attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). ' + 'Current value is ' + self.type.toString() ) : self.type <> null implies self.validSclName( type ) endpackage