// Copied from org.eclipse.ocl.examples.test.xtext.PivotDocumentationExamples.java | |
// create an OCL helper object | |
OCLHelper helper = ocl.createOCLHelper(EXTLibraryPackage.Literals.LIBRARY); | |
ExpressionInOCL invariant = helper.createInvariant( | |
"books->forAll(b1, b2 | b1 <> b2 implies b1.title <> b2.title)"); | |
ExpressionInOCL query = helper.createQuery( | |
"books->collect(b : Book | b.category)->asSet()"); |