Previous Table of Contents Next


14.5 OCL Representation of Business Nomenclature Constraints

   [C-1] A Concept may not relate to itself.context Conceptinv: self.relatedConcept->forAll ( p | p <> self )

   [C-2] The parent of a Glossary must be a Glossary.context Glossaryinv: self.parent.oclIsKindOf( Glossary )

   [C-3] The child of a Glossary must be a Glossary.context Glossaryinv: self.child->forAll( p | p.oclIsKindOf( Glossary ) )

   [C-4] The parent of a Taxonomy must be a Taxonomy.context Taxonomyinv: self.parent.oclIsKindOf( Taxonomy )

   [C-5] The child of a Taxonomy must be a Taxonomy.context Taxonomyinv: self.child->forAll( p | p.oclIsKindOf( Taxonomy ) )

   [C-6] A Term may not relate to itself.context Terminv: self.relatedTerm->forAll ( p | p <> self )

   [C-7] A VocabularyElement may not relate to itself.context Vocabularyinv: self.relatedElement->forAll ( p | p <> self )

   [C-8] The RelatedConcepts association is derived from the RelatedVocabularyElements association. All ends of the RelatedConcepts association must be Concepts.

   context RelatedConcepts

   inv: RelatedVocabularyElements.allInstances.select( element.oclIsKindOf( Concept ) and relatedElement.oclIsKindOf( Concept ) )

   [C-9] The RelatedTerms association is derived from the RelatedVocabularyElements association. All ends of the RelatedTerms association must beTerms.

   context RelatedTerms

   inv: RelatedVocabularyElements.allInstances.select( element.oclIsKindOf( Term ) and relatedElement.oclIsKindOf( Term ) )