RE: PROPOSAL: Extensions to XMIReader and XMIWriter interfaces

"Krijgsheld, Ronald" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <D913221A882FD31198D90008C75D690906BF0B10@cwnl-ams-pri01.nl.compuware.com>

Martin,

Take the following XMI line as example:

  <Model:Classifier
href="http://www.omg.org/models/MOF1.4/XMI1.1/Model1.4/PrimitiveTypes.xml#St
ring"/>

In this case you can provide the HRefResolver with both: 
  - the type: Model:Classifier 
  - and the href.

isn't it?

Ronald.

-----Original Message-----
From: Martin Matula [mailto:[email protected]]
Sent: Thursday, July 25, 2002 4:28 PM
To: [email protected]
Subject: Re: PROPOSAL: Extensions to XMIReader and XMIWriter interfaces


Hi Michiel,

Vries, Michiel de wrote:
> The issues which we see are the following:
> 
> - the HRefResolver needs to receive a little bit more information: we need
> to have the type of the object to be resolved. This to be able to create a
> placeholder for the object.

How is the XMIReader supposed to find out the type? I guess this would 
only work with the files written with our XMIWriter (that would add a 
specific decoration to each href). But in that case, why don't you 
implement the XMIReferenceProvider the way that it will encode the type 
information in the returned reference (xmi.id and href)? This is a good 
solution for you and does not require any changes to be made to XMI 
writer used also by the people that do not need this.

> - for reading we would like to have the xmi writer to write the most
> specific type to the output file, because in that case the reader knows
the
> actual type for which a placeholder needs to be created.

Why don't you encode the type information in xmi.id/href? (see above)

> - for writing we need to have a link to the refObject and a String
> representing the current filename. In that way you can distinguish if the
> refObject needs to be in a different filename than the current one.

OK, I thought that this may be passed to the XMIReferenceProvider 
constructor, however I can add it as a parameter to getReference method 
if you want.
Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.