Difference between revisions of "Artefact:Model/org/ooem/tests/models/basic/simplexmodel"
From OOModels
Jump to navigationJump to search
AndreasLeue (talk | contribs) |
AndreasLeue (talk | contribs) |
||
Line 9: | Line 9: | ||
== Code == | == Code == | ||
<div class=" | <div class="code"> | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Package xmlns="http://www.ooem.org/1.0"> | <Package xmlns="http://www.ooem.org/1.0"> | ||
Line 16: | Line 16: | ||
<ExternalImport>java.lang.Boolean</ExternalImport> | <ExternalImport>java.lang.Boolean</ExternalImport> | ||
<ExternalImport>java.lang.Object</ExternalImport> | <ExternalImport>java.lang.Object</ExternalImport> | ||
<div class=" | <div class="name"> | ||
<Name>simplexmodel</Name> | <Name>simplexmodel</Name> | ||
</div> | </div> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass01</Name> | <Name>MyClass01</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute11" Type="String"/> | <Attribute Name="MyAttribute11" Type="String"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute12" Type="String"> | <Attribute Name="MyAttribute12" Type="String"> | ||
<XMLogic><DefaultValue><JavaCode>new String()</JavaCode></DefaultValue></XMLogic> | <XMLogic><DefaultValue><JavaCode>new String()</JavaCode></DefaultValue></XMLogic> | ||
</Attribute> | </Attribute> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute13" Type="Boolean" IsReadOnly="true"/> | <Attribute Name="MyAttribute13" Type="Boolean" IsReadOnly="true"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute14" Type="String" Visibility="protected"/> | <Attribute Name="MyAttribute14" Type="String" Visibility="protected"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute15" Type="String"> | <Attribute Name="MyAttribute15" Type="String"> | ||
<div class=" | <div class="xmodel"> | ||
<XMLogic> | <XMLogic> | ||
<ImplementationType>MyCoolString</ImplementationType> | <ImplementationType>MyCoolString</ImplementationType> | ||
Line 51: | Line 51: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass02</Name> | <Name>MyClass02</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute" Type="String"/> | <Attribute Name="MyAttribute" Type="String"/> | ||
</div> | </div> | ||
</Attributes> | </Attributes> | ||
<div class=" | <div class="xmodel"> | ||
<XMCoreClasses CLASS="XMCoreClasses"> | <XMCoreClasses CLASS="XMCoreClasses"> | ||
<Interface>false</Interface> | <Interface>false</Interface> | ||
Line 67: | Line 67: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass03</Name> | <Name>MyClass03</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute31" Type="String"/> | <Attribute Name="MyAttribute31" Type="String"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute32" Type="String" IsReadOnly="true"/> | <Attribute Name="MyAttribute32" Type="String" IsReadOnly="true"/> | ||
</div> | </div> | ||
</Attributes> | </Attributes> | ||
<div class=" | <div class="xmodel"> | ||
<XMCoreClasses CLASS="XMCoreClasses"> | <XMCoreClasses CLASS="XMCoreClasses"> | ||
<Interface>false</Interface> | <Interface>false</Interface> | ||
Line 86: | Line 86: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass04</Name> | <Name>MyClass04</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute41" Type="String"/> | <Attribute Name="MyAttribute41" Type="String"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute42" Type="String" IsReadOnly="true"/> | <Attribute Name="MyAttribute42" Type="String" IsReadOnly="true"/> | ||
</div> | </div> | ||
Line 99: | Line 99: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass05</Name> | <Name>MyClass05</Name> | ||
</div> | </div> | ||
<Stereotype>Class</Stereotype> | <Stereotype>Class</Stereotype> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute51" Type="String"/> | <Attribute Name="MyAttribute51" Type="String"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute52" Type="String" IsReadOnly="true"/> | <Attribute Name="MyAttribute52" Type="String" IsReadOnly="true"/> | ||
</div> | </div> | ||
Line 117: | Line 117: | ||
</Association> | </Association> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass06</Name> | <Name>MyClass06</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute61" Type="String"/> | <Attribute Name="MyAttribute61" Type="String"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute62" Type="Vector<String>"/> | <Attribute Name="MyAttribute62" Type="Vector<String>"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute63" Type="Vector<{String}>"/> | <Attribute Name="MyAttribute63" Type="Vector<{String}>"/> | ||
</div> | </div> | ||
Line 133: | Line 133: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass07</Name> | <Name>MyClass07</Name> | ||
</div> | </div> | ||
Line 140: | Line 140: | ||
</TemplateParameters> | </TemplateParameters> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute71" Type="Willybald"/> | <Attribute Name="MyAttribute71" Type="Willybald"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute72" Type="Vector<String>"/> | <Attribute Name="MyAttribute72" Type="Vector<String>"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute73" Type="Vector<{String}>"/> | <Attribute Name="MyAttribute73" Type="Vector<{String}>"/> | ||
</div> | </div> | ||
Line 152: | Line 152: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass08</Name> | <Name>MyClass08</Name> | ||
</div> | </div> | ||
Line 159: | Line 159: | ||
</TemplateParameters> | </TemplateParameters> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute81" Type="Willybald"/> | <Attribute Name="MyAttribute81" Type="Willybald"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute82" Type="Vector<String>"/> | <Attribute Name="MyAttribute82" Type="Vector<String>"/> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute83" Type="Vector<{String}>"/> | <Attribute Name="MyAttribute83" Type="Vector<{String}>"/> | ||
</div> | </div> | ||
Line 171: | Line 171: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass09</Name> | <Name>MyClass09</Name> | ||
</div> | </div> | ||
<Operations> | <Operations> | ||
<div class=" | <div class="operation"> | ||
<Operation Name="doIt"> | <Operation Name="doIt"> | ||
<Signature ReturnType="void"> | <Signature ReturnType="void"> | ||
Line 187: | Line 187: | ||
</Class> | </Class> | ||
<Class> | <Class> | ||
<div class=" | <div class="name"> | ||
<Name>MyClass10</Name> | <Name>MyClass10</Name> | ||
</div> | </div> | ||
<Attributes> | <Attributes> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute101" Type="String"> | <Attribute Name="MyAttribute101" Type="String"> | ||
<div class=" | <div class="xmodel"> | ||
<XMAnnotations> | <XMAnnotations> | ||
<InterfaceGet> | <InterfaceGet> | ||
Line 205: | Line 205: | ||
</Attribute> | </Attribute> | ||
</div> | </div> | ||
<div class=" | <div class="attribute"> | ||
<Attribute Name="MyAttribute102" Type="String" IsReadOnly="true"/> | <Attribute Name="MyAttribute102" Type="String" IsReadOnly="true"/> | ||
</div> | </div> | ||
</Attributes> | </Attributes> | ||
<Operations> | <Operations> | ||
<div class=" | <div class="operation"> | ||
<Operation Name="doIt"> | <Operation Name="doIt"> | ||
<Signature ReturnType="void"> | <Signature ReturnType="void"> | ||
Line 217: | Line 217: | ||
</Arguments> | </Arguments> | ||
</Signature> | </Signature> | ||
<div class=" | <div class="xmodel"> | ||
<XMAnnotations> | <XMAnnotations> | ||
<InterfaceOperation> | <InterfaceOperation> | ||
Line 230: | Line 230: | ||
</div> | </div> | ||
</Operations> | </Operations> | ||
<div class=" | <div class="xmodel"> | ||
<XMAnnotations> | <XMAnnotations> | ||
<Interface> | <Interface> |
Revision as of 09:42, 25 June 2008
Classification | |
---|---|
Type | Type:org/ooem/UMLPackage/1.0 |
Domain | Domain:it/test |
Encoding | Type:org/xocp/OCP/xml/2.0 |
Category | Type:org/oomodels/wiki/Model |
More | |
Download Code | |
Namespace (more) | |
Basic test models for OOEM implementations | |
create new pages |
Code[edit]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://www.ooem.org/1.0"> <InternalModelImport>org.uml.stereotypes.*</InternalModelImport> <ExternalImport>java.lang.String</ExternalImport> <ExternalImport>java.lang.Boolean</ExternalImport> <ExternalImport>java.lang.Object</ExternalImport>
<Name>simplexmodel</Name>
<Class>
<Name>MyClass01</Name>
<Attributes>
<Attribute Name="MyAttribute11" Type="String"/>
<Attribute Name="MyAttribute12" Type="String"> <XMLogic><DefaultValue><JavaCode>new String()</JavaCode></DefaultValue></XMLogic> </Attribute>
<Attribute Name="MyAttribute13" Type="Boolean" IsReadOnly="true"/>
<Attribute Name="MyAttribute14" Type="String" Visibility="protected"/>
<Attribute Name="MyAttribute15" Type="String">
<XMLogic> <ImplementationType>MyCoolString</ImplementationType> <DefaultValue><JavaCode>"Hi there!"</JavaCode></DefaultValue> </XMLogic>
</Attribute>
</Attributes> </Class> <Class>
<Name>MyClass02</Name>
<Attributes>
<Attribute Name="MyAttribute" Type="String"/>
</Attributes>
<XMCoreClasses CLASS="XMCoreClasses"> <Interface>false</Interface> <Implementations/> </XMCoreClasses>
</Class> <Class>
<Name>MyClass03</Name>
<Attributes>
<Attribute Name="MyAttribute31" Type="String"/>
<Attribute Name="MyAttribute32" Type="String" IsReadOnly="true"/>
</Attributes>
<XMCoreClasses CLASS="XMCoreClasses"> <Interface>false</Interface> <Implementations><i1>Default</i1><i2>Custom</i2><i3>Willy</i3></Implementations> </XMCoreClasses>
</Class> <Class>
<Name>MyClass04</Name>
<Attributes>
<Attribute Name="MyAttribute41" Type="String"/>
<Attribute Name="MyAttribute42" Type="String" IsReadOnly="true"/>
</Attributes> </Class> <Class>
<Name>MyClass05</Name>
<Stereotype>Class</Stereotype> <Attributes>
<Attribute Name="MyAttribute51" Type="String"/>
<Attribute Name="MyAttribute52" Type="String" IsReadOnly="true"/>
</Attributes> </Class> <Association> <End Type="MyClass04" Multiplicity="1"/> <End Type="MyClass05" Multiplicity="*" IsNavigable="true" Role="Hugo"/> </Association> <Class>
<Name>MyClass06</Name>
<Attributes>
<Attribute Name="MyAttribute61" Type="String"/>
<Attribute Name="MyAttribute62" Type="Vector<String>"/>
<Attribute Name="MyAttribute63" Type="Vector<{String}>"/>
</Attributes> </Class> <Class>
<Name>MyClass07</Name>
<TemplateParameters> <TemplateParameter Name="Willybald" Supertype="Object"/> </TemplateParameters> <Attributes>
<Attribute Name="MyAttribute71" Type="Willybald"/>
<Attribute Name="MyAttribute72" Type="Vector<String>"/>
<Attribute Name="MyAttribute73" Type="Vector<{String}>"/>
</Attributes> </Class> <Class>
<Name>MyClass08</Name>
<TemplateParameters> <TemplateParameter Name="Willybald" Supertype="Object"/> </TemplateParameters> <Attributes>
<Attribute Name="MyAttribute81" Type="Willybald"/>
<Attribute Name="MyAttribute82" Type="Vector<String>"/>
<Attribute Name="MyAttribute83" Type="Vector<{String}>"/>
</Attributes> </Class> <Class>
<Name>MyClass09</Name>
<Operations>
<Operation Name="doIt"> <Signature ReturnType="void"> <Arguments> <Argument Name="What" Type="String"/> </Arguments> </Signature> </Operation>
</Operations> </Class> <Class>
<Name>MyClass10</Name>
<Attributes>
<Attribute Name="MyAttribute101" Type="String">
<XMAnnotations> <InterfaceGet> <JavaCodeTemplate CONTENT="Text/Indented"> // @Foo ${name} ${lcu_name} ${type} ${class} // @Bar </JavaCodeTemplate> </InterfaceGet> </XMAnnotations>
</Attribute>
<Attribute Name="MyAttribute102" Type="String" IsReadOnly="true"/>
</Attributes> <Operations>
<Operation Name="doIt"> <Signature ReturnType="void"> <Arguments> <Argument Name="What" Type="String"/> </Arguments> </Signature>
<XMAnnotations> <InterfaceOperation> <JavaCodeTemplate CONTENT="Text/Indented"> // @Fooo ${name} ${lcu_name} ${type} ${class} // @Baar </JavaCodeTemplate> </InterfaceOperation> </XMAnnotations>
</Operation>
</Operations>
<XMAnnotations> <Interface> <JavaCodeTemplate CONTENT="Text/Indented"> // @Foofoo ${name} ${lcu_name} ${type} ${class} // @Barbar </JavaCodeTemplate> </Interface> </XMAnnotations>
</Class> </Package>
Description[edit]
The package contains a few classes to test XModel properties. Note: in production models, these properties are defined usually via stereotypes.