package pt.ist.fenixframework.example.oo7.domain; /**************** CLASSES *********************/ class OO7Application { } class DesignObj { Long id; String type; Long buildDate; } class Assembly extends DesignObj { } class ComplexAssembly extends Assembly { } class BaseAssembly extends Assembly { } class CompositePart extends DesignObj { } class Document { String title; Long id; String text; } class Manual { String title; Long id; String text; Long textLength; } class AtomicPart extends DesignObj { Integer x; Integer y; Long docId; } class Conn { Long id; Integer length; String type; } class Module extends DesignObj { } /**************** RELATIONS ************************/ // Application relation ApplicationHasAtomicParts { OO7Application playsRole appAtomicParts; AtomicPart playsRole atomicParts { multiplicity *; } } relation ApplicationHasModules { OO7Application playsRole appModules; Module playsRole modules { multiplicity *; } } relation ApplicationHasManuals { OO7Application playsRole appManuals; Manual playsRole manuals { multiplicity *; } } relation ApplicationHasDocuments { OO7Application playsRole appDocuments; Document playsRole documents { multiplicity *; } } relation ApplicationHasBaseAssemblies { OO7Application playsRole appBaseAssemblies; BaseAssembly playsRole baseAssemblies { multiplicity *; } } // Connections relation ConnectionHasAtomicPartTo { Conn playsRole connectionsTo { multiplicity *; } AtomicPart playsRole to { multiplicity 1; } } relation ConnectionHasAtomicPartFrom { Conn playsRole connectionsFrom { multiplicity *; } AtomicPart playsRole from { multiplicity 1; } } //Composite relation CompositePartHasDocument { Document playsRole document { multiplicity 1; } CompositePart playsRole cp4 { multiplicity 0; } } relation CompositePartHasAtomicParts { AtomicPart playsRole atomicPart { multiplicity *; } CompositePart playsRole cp1 { multiplicity 0; } } relation CompositePartHasRootPart { AtomicPart playsRole rootPart { multiplicity 1; } CompositePart playsRole cp2 { multiplicity 0; } } relation CompositePartHasBaseAssemblies { BaseAssembly playsRole baseAssemblies { multiplicity *; } CompositePart playsRole cp3 { multiplicity 0; } } //Base Assembly relation BaseAssemblyHasSharedParts { CompositePart playsRole sharedPart { multiplicity *; } BaseAssembly playsRole ba1 { multiplicity 0; } } relation BaseAssemblyHasUnsharedParts { CompositePart playsRole unsharedPart { multiplicity *; } BaseAssembly playsRole ba2 { multiplicity 0; } } // Assembly relation AssemblyHasComplexAssembly { Assembly playsRole subAssemblies { multiplicity *; } ComplexAssembly playsRole superAssembly { multiplicity 1; } } relation AssemblyHasModule { Assembly playsRole assemblies { multiplicity *; } Module playsRole module { multiplicity 1; } } //Module relation ModuleHasManual { Manual playsRole manual { multiplicity 1; } Module playsRole md1 { multiplicity 0; } } relation ModuleHasComplexAssembly { ComplexAssembly playsRole designRoot { multiplicity 1; } Module playsRole md2 { multiplicity 0; } } /**************** END ********************/