It's all about the answers!

Ask a question

Get IIteration by OSLC Uri (in RTC Java Plain API)

S. M. (113) | asked Mar 05 '21, 4:47 a.m.


we are using the RTC Java Plain API to create iterations in a CM project area.

But we don't find a way to get the OSLC uri for a generated IIteration object.

And on the other hand, we want to access an IIteration for a given OSLC uri, e.g.

Is this possible with the RTC Java Plain API, and if so, can give some hints please.

Thanks for you help!

One answer

permanent link
Ralph Schoon (63.0k33645) | answered Mar 05 '21, 5:19 a.m.
edited Mar 05 '21, 7:55 a.m.


the pieces I think I know below.

1. The itemHandle contains the UUID.

2. The UUID can be converted to a string and would look like "_29rygDLaEeqnQ6MhncA" in your case above.

3. As explained in , if you know the item type you can create an item handle using the UUID: 
Handles can be resolved and searched etc.

IItemHandle handle = [itemtype].ITEM_TYPE.createItemHandle(UUID.valueOf(uuid_string), null);

4. The URIs to different items look different. explains the "Location" based URI and how to create one.

In the EWM SCM Utils I use this code to create a URI for an item:

    public static URI getURIForItem(IItemHandle item) {
        Location location = Location.itemLocation(item, getPublicURI(item));
        return location.toAbsoluteUri();

public static String getPublicURI(IItemHandle item) {
    return getPublicURI(((ITeamRepository) item.getOrigin()));

 * Returns the public URI root used to construct public locations for the
 * given repository. If the repository has no public URI root configured,
 * its regular URI is returned.
 * @param repo
 *            the repository
 * @return the public URI root for the repository (never <code>null</code>)
public static String getPublicURI(ITeamRepository repo) {
    String uri = repo.publicUriRoot();
    if (uri == null) {
        uri = repo.getRepositoryURI();
    return uri;


Your answer

Register or to post your answer.