Page last modified 08:34, 30 May 2018 by villes

.oclIsTypeOf() Redirected from User Guides/myXML/5: OCL Rules/Available methods for OCL base types/.OclIsTypeOf()

    Table of contents

    Description of the method

     

    Description: .oclIsTypeOf() method checks if the given value corresponds to the type given as a parameter.
    Available for: any
    Parameters: format type
    Return type: boolean

     

    Example

    Context: HeaderType1
    OCL: self.Dt.oclIsTypeOf(ISODate)
    Description: The example rule checks if the type of the value of <Dt> matches the ISO Date type.

     

    The XML snippet below would pass this check.

    <Dt>2018-05-28</Dt>

    The other snippet below however would not pass this check.

    <Dt>28.05.2018</Dt>

    Menu