Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] URLs, URIs, and IDs (oh my)

Scott Lewis wrote:
RE: having one URI class used everywhere...I agree it would be attractive, but extension is difficult given URI class is final (to guarantee standards compliance among other reasons)...as in many cases means writing wrappers (anyway) to have new constructors, override other methods, etc.
I'm not sure what extension is needed. can you elaborate or give an example?
ID: Extensible using OSGi/Equinox mechanisms...e.g. extension registry, adapters
URI:  Impl has much functionality (already...yay),  Standards compliant
I tihnk there are some extension registry things in the EMF URI world. Not sure what all they do. Perhaps Ed can elaborate.
Cons:

ID:  Another abstraction so has some impl cost
URI: Won't satisfy all use cases, so clients will still be creating/need to create own ID types (at least for some things like ECF connections)
API breakage aside, would it make sense to rephrase ECF API in terms of URIs?

One thing that I did not get about the EMF stuff was the URIConverter class. Here is some relevant JavaDoc
http://download.eclipse.org/modeling/emf/emf/javadoc/2.4.1/org/eclipse/emf/common/util/URI.html
http://download.eclipse.org/modeling/emf/emf/javadoc/2.4.1/org/eclipse/emf/ecore/resource/URIConverter.html

the EMF approach has people creating URIConverter to do whatever they want with the various URIs. So URIs are the ids (doh) and the converters make them "real".

Jeff


Back to the top