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

OSLC RM query by custom attriute value using RDNG 6.0.1

Hi I have to find all artifacts where my custom Attribute Type value is "INFORMATION"
My custom data type is enumeration with values:
<rdf:RDF
    
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    
    xmlns:acp="http://jazz.net/ns/acp#"
    
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <rdf:Property rdf:about="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_c334157b-57d4-427e-a09d-73a377081746">
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>2</rdf:value>
<rdfs:label>INFORMATION</rdfs:label>
</rdf:Property>
<rdf:Property rdf:about="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_6a51d862-eb1e-4960-809b-c878e896699f">
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>0</rdf:value>
<rdfs:label>HEADING</rdfs:label>
</rdf:Property>
<rdf:Property rdf:about="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_06210b34-cf99-4c39-87e6-c630d96dd49f">
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</rdf:value>
<rdfs:label>DEFINITION</rdfs:label>
</rdf:Property>
<rdf:Property rdf:about="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_d5f01340-5783-45d5-aa2d-a451599f89f0">
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>3</rdf:value>
<rdfs:label>RECOMMENDATION</rdfs:label>
</rdf:Property>
<rdf:Property rdf:about="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w">
<acp:accessControl rdf:resource="https://10.0.2.79:9443/rm/accessControl/_4du-YEDTEeW98vRabXRPEQ"/>
<rdfs:label>_typeTextType</rdfs:label>
</rdf:Property>
</rdf:RDF>

https://10.0.2.79:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2F10.0.2.79%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_4du-YEDTEeW98vRabXRPEQ
&oslc.paging=true
&oslc.pageSize=10
&oslc.prefix=rm_property=https://10.0.2.79:9443/rm/types/
&oslc.select=*
&oslc.where=rm_property:_nQHusUZsEeWL2aNIq4SA-w="INFORMATION"

The code above is the url with which I try to filter all artifacts with have value "INFORMATION".
And part of the resourceShape of one of the Artifact Type.
  <oslc:property>
            <oslc:Property>
                <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
                <oslc:allowedValues>
<oslc:AllowedValues>
<oslc:allowedValue rdf:resource="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_6a51d862-eb1e-4960-809b-c878e896699f"/>
<oslc:allowedValue rdf:resource="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_06210b34-cf99-4c39-87e6-c630d96dd49f"/>
<oslc:allowedValue rdf:resource="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_c334157b-57d4-427e-a09d-73a377081746"/>
<oslc:allowedValue rdf:resource="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_d5f01340-5783-45d5-aa2d-a451599f89f0"/>
</oslc:AllowedValues>
</oslc:allowedValues>
<oslc:propertyDefinition rdf:resource="https://10.0.2.79:9443/rm/types/_oIDcQUZsEeWL2aNIq4SA-w"/>
<oslc:range rdf:resource="https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<dc:description rdf:parseType="Literal"></dc:description>
<dc:title rdf:parseType="Literal">_TextType</dc:title>
<oslc:name>_oIDcQUZsEeWL2aNIq4SA-w</oslc:name>
</oslc:Property>
There is no error, HTTP Status is 200,but nothing is returned. I double check to be sure that there are Artifact with artifact Type with attribute with Attribute Data Type = _TypeText,which is my custom type. And its value is INFORMATION. And there are such. Where is my wrong?

0 votes


Accepted answer

Permanent link
The "oslc.where" is incorrect.
For the attribute _TextType, it should be "rm_property:_oIDcQUZsEeWL2aNIq4SA". For the value "INFORMATION", it should be "https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w#_c334157b-57d4-427e-a09d-73a377081746". So put them together, you should have
&oslc.where=rm_property:_oIDcQUZsEeWL2aNIq4SA=<https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w%23_c334157b-57d4-427e-a09d-73a377081746>
Dinyo Dinev selected this answer as the correct answer

1 vote

Comments
&oslc.where=rm_property:_oIDcQUZsEeWL2aNIq4SA-w=<https://10.0.2.79:9443/rm/types/_nQHusUZsEeWL2aNIq4SA-w%23_c334157b-57d4-427e-a09d-73a377081746>


So "#" has to be encoded to %23 and INFORMATION to be changed with its URI.

Thanks

The forum may have messed up the content that I posted. Simply GET such an artifact and see for yourself.

1 vote

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
× 12,021

Question asked: Aug 27 '15, 5:20 a.m.

Question was seen: 3,114 times

Last updated: Aug 28 '15, 3:41 a.m.

Confirmation Cancel Confirm