Difference between IReference, ILink and IEndPointDescriptor
Hi,
Could someone please explain the difference between IReference, ILink and IEndPointDescriptor? I have read the Java docs for these, but I am still not clear about their usage. I also had another doubt related to IReference. The Java doc on IReference states that a reference can be created to any arbitrary entity using URIs. But when I searhed for its usage in the Jazz source code, I noticed that in most cases the URI was created by calling the Location.toRelativeUri or Location.toAbsoluteUri method, wherein the Location object itself was created using an IItemHandle or URI or another Location object. So does this mean that creation of references is restricted to Jazz items only? Regards, Swathi. |
3 answers
Hi Swathi,
an ILink has a source and a target IReference connecting two entities. These entities can be Jazz or external artifacts. We usually reference Jazz artifacts using an item reference (see IReference.isItemReference() and IItemReference) instead of an URI. Each link has a ILinkType describing links of that type in terms of two IEndPointDescriptors, this information is statically defined in plug-in extensions (see ILinkTypeRegistry). Hope that helps, Christof Jazz Work Item team swathi.rao wrote: Hi, |
Links are a generic, extensible way of storing relations between artifacts, if you don't need the extensibility modeled references are the preferred way of storage since these are easier to use programmatically and more efficient.
The Javadoc you mention refers to cloning of IReferences, not EMF references. The issue there is that since an IReference is contained in an ILink and EMF automatically updates a contained object's container field, a single IReference instance can only be used with a single ILink. Regards, Christof Jazz Work Item team
Christof Marti wrote: Hi Swathi, |
Thanks for the clarification Christof.
Regards, Swathi Rao. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.