Re: [mdr-users] problem with tags

Martin Matula <[email protected]> Mon, 25 Jul 2005 09:48:33 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi Ludger,
I understood all this from your first e-mail. I am trying to tell you, 
that normally this should work without problems - we have examples of 
metamodels that work correctly containing the tags you are trying to use 
(e.g. the diff files for UML metamodels). So, I am trying to find out 
more about the environment. If I had the whole XMI, I could try to 
reproduce this problem on my machine and try to debug it. Or if you 
provided a more exact step-by-step instructions for how you got into 
this state: e.g. I started MDR with clean storage files, then imported 
the file using MDR explorer, right-clicked on a package node, generated 
JMI interfaces, etc. - then I could have a better idea if you are not 
doing anything wrong. Make sure you do not have two versions of the same 
metamodel in the MDR - maybe you first imported the metamodel without 
the tags and then imported it again with the tags and now you are still 
trying to generate the interfaces for the old one.
Martin

ludger goeke wrote:

>Hi Martin,
>
><Model:Package xmi.id = 'a8' name = 'Uml2Module' annotation = '' isRoot =
>  
>
>>'false' isLeaf = 'false' isAbstract = 'false' visibility = 'public_vis'>
>>     <Model:Namespace.contents>
>>       <Model:Tag xmi.id = 'a9' name = 'xmi.namespace' annotation = ''  
>>            tagId = 'xmi.namespace'>
>>       <Model:Tag.values>UML</Model:Tag.values>
>>         <Model:Tag.elements>
>>           <Model:Package xmi.idref = 'a8'/>
>>         </Model:Tag.elements>
>>    
>>
>
>you are right. In the metamodel the namespace tag is alright. But when I
>save the objects, that I created in the MDR in a xmi-File, I get the
>following result ( the following is just a part of it).
>
><?xml version = '1.0' encoding = 'ISO-8859-1' ?>
><XMI xmi.version = '1.2' timestamp = 'Wed Jul 20 22:45:37 CEST 2005'>
>  <XMI.header>
>    <XMI.documentation>
>      <XMI.exporter>Netbeans XMI Writer</XMI.exporter>
>      <XMI.exporterVersion>1.0</XMI.exporterVersion>
>    </XMI.documentation>
>  </XMI.header>
>  <XMI.content>
>    <Uml2Module.InternalStructures.Property xmi.id = 'a1' isOrdered =    
>     'false'isUnique = 'false' isLeaf = 'false' isStatic = 'false'  
>      isReadOnly = 'false' isDerived = 'false' isDerivedUnion = 'false'  
>        isComposite = 'false'>
>      <Uml2Module.Kernel.MultiplicityElement.lowerValue>
>        <Uml2Module.Kernel.LiteralString xmi.id = 'a2' value = '1'/>
>      </Uml2Module.Kernel.MultiplicityElement.lowerValue>
>
>
>As you see there isn`t the "xmlns:..."-attribute in the outermost xmi-tag
>and there is no xmlns prefix in the tags of the document content.
>
>
>-------------------------------------------------------------------------
>
>With the javax.jmi.substituteName I got the problem, that when I load the
>metamodel into the mdr, the class "Class" appears still with the name
>"Class" and not with the name "StructClass" like I declarated in the 
>javax.jmi.substituteName-tag. 
>
>
><Model:Class xmi.id = 'a117' name = 'Class' annotation = '' isRoot = 'false'
>  
>
>>isLeaf = 'false' isAbstract = 'false' visibility = 'public_vis' isSingleton
>>= 'false'>
>>
>>
>><Model:Tag xmi.id = 'a119' name = ' javax.jmi.substituteName' annotation =
>>''tagId = ' javax.jmi.substituteName'>
>>      <Model:Tag.values>StructClass</Model:Tag.values>
>>         <Model:Tag.elements>
>>           <Model:Class xmi.idref = 'a117'/>
>>         </Model:Tag.elements> 
>>    
>>
>
>
>Regards Ludger
>
>  
>