Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

OSLC Query for artifact containing certain link type

Hello All,

I'm asking this question because the following article related question did not help me further: "https://jazz.net/forum/questions/171394/get-all-rm-artifacts-that-have-links-of-any-type-specific-type" The article: "https://jazz.net/library/article/1197" linked in said thread also did not provide me with a way to query rm:artifacts containing at least one instance of a specific link.

I am aware of the OSLC query specification "https://archive.open-services.net/bin/view/Main/OSLCCoreSpecQuery.html" but this did not provide me with any guidance on how to address links using the "oslc.where" querystring parameter.

Therefore I find no alternative but to ask you here. The following query works fine for me:

curl 'https://my.jazz.server/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fmy.jazz.server%2Frm%2Fprocess%2Fproject-areas%2F_TJ5IgDy8Eei4zcnLB9wCBw&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%2Coslc_rm%3D%3Chttp%3A%2F%2Fopen-services.net%2Fns%2Frm%2523%3E&oslc.where=dcterms%3Aidentifier%3D18218&oslc.select=dcterms%3Aidentifier%2Cdcterms%3Atitle%2Cdcterms%3Adescription&oslc.paging=true&oslc.pageSize=200&private=true' \
    -H 'Accept: application/rdf+xml' \
    -H 'OSLC-Core-Version: 2.0' \
    -H 'Configuration-Context: https://my.jazz.server/rm/cm/stream/_CSdBwhsbEfCAOqwpvjIneQ'

Now all I need is to replace the "dcterms%3Aidentifier%3D18218" for the "oslc.where".
I'm looking to filter by the following link:

 "<rm:LinkType rdf:about="http://www.ibm.com/xmlns/rdm/types/ArtifactTermReferenceLink">" <-- RDF specification.

I don't believe this question has been asked here before.

If someone can help me I'd be very grateful.

KR

Jasper


1 vote



2 answers

Permanent link

I don't think it's possible to use OSLC Query like this - it has no way of expressing 'return artifacts with any value of this property'. The examples in the article query for specific source URLs (i.e. not 'any' URL) of the link.


I think this can be regarded as a limitation of OSLC Query - a solution is to query for the superset of artifacts you're interested in (so you get artifacts which have and don't have links) and postprocess them selecting just the ones with a link.

1 vote

Comments
Hi Ian,

Thx for the reply. Yes I'll try this now. 

KR

Jasper


Permanent link

Hi,


Untested, and I'm very unsure about the usecase of 'dcterms' in Links context, you might need to use 'rm' somehow.

But you can try adding 
- the link prefix (possibly with oslc.prefix=dcterms=<http://jazz.net/ns/dm/linktypes#>, or without # or however you're able to directly translate the site link into query terms with %s). 
- the actual query "oslc.where=dcterms:LinkType=%22http://www.ibm.com/xmlns/rdm/types/ArtifactTermReferenceLink%22"

%22 is for string quotes ( "" ), you can try adding the string quotes with %22 or either of them, see what works. I definitely remember having to add %22 with/without the real string quotes.

Br,
Alex

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,079
× 144

Question asked: May 21 '25, 11:19 a.m.

Question was seen: 1,243 times

Last updated: May 29 '25, 8:34 a.m.

Confirmation Cancel Confirm