Skip to content
Snippets Groups Projects
DO.ocl 1.43 KiB
Newer Older
Dominique Marcadet's avatar
Dominique Marcadet committed
/**
 *  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'

import '../Helpers/BaseSimpleTypes.ocl'

package scl

context DO
-- extends AbstractDataObject
Dominique Marcadet's avatar
Dominique Marcadet committed

    -- The name attribute shall be present
    -- In AbstractDataObject.ocl
    
    -- The name attribute shall be valid
    -- must be done in subclass because the rule is not the same between DO and SDO
    inv DO_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 )
Dominique Marcadet's avatar
Dominique Marcadet committed

    -- The type attribute shall be present and valid
    -- In AbstractDataObject.ocl
Dominique Marcadet's avatar
Dominique Marcadet committed

    -- accessControl is a normalizedString
    -- transient is a boolean

Dominique Marcadet's avatar
Dominique Marcadet committed
endpackage