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

what is the resource representations to get RDF file for test artifact resources of RQM using OSLC API

Hi,
what is the resource representations to get RDF for file test artifact resources of RQM using OSLC API..
for e.g., I want RDF resource for Test Case results..

0 votes



3 answers

Permanent link
This is an example of Test Result RDF document through QM OSLC API.
Make sure you specify this headers to get the content
accept : application/rdf+xml
OSLC-Core-Version: 2.0

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rqm_auto="http://jazz.net/ns/auto/rqm#"
    xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/"
    xmlns:rqm_qm="http://jazz.net/ns/qm/rqm#"
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:oslc_auto="http://open-services.net/ns/auto#"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:oslc_qm="http://open-services.net/ns/qm#"
    xmlns:bp="http://open-services.net/ns/basicProfile#" >
 <rdf:Description rdf:about="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.execution.ExecutionResult/_hjYFQyRaEeK7qas16_dx7g">
  <oslc:instanceShape rdf:resource="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/shape/resource/com.ibm.rqm.execution.ExecutionResult"/>
  <oslc:serviceProvider rdf:resource="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/services.xml"/>
  <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Lyo</dcterms:title>
  <oslc_qm:executesTestScript rdf:resource="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.planning.VersionedExecutionScript/_n7DsYBoPEeKFULkQmjVzFg"/>
  <rqm_qm:verdict rdf:resource="http://jazz.net/ns/qm/rqm#com.ibm.rqm.execution.common.state.passed"/>
  <rdf:type rdf:resource="http://open-services.net/ns/qm#TestResult"/>
  <oslc_qm:producedByTestExecutionRecord rdf:resource="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.execution.TestcaseExecutionRecord/_sLIr-CRLEeK7qas16_dx7g"/>
  <oslc_qm:reportsOnTestCase rdf:resource="https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.planning.VersionedTestCase/_tK7qkRoPEeKFULkQmjVzFg"/>
  <acp:accessControl rdf:resource="https://myrqmserver:9443/qm/oslc_qm/accessControl/_0I6VT9HVEeGSWYp6WoHgWA"/>
  <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2012-11-01T19:29:59.188Z</dcterms:created>
  <dcterms:relation rdf:resource="https://myrqmserver:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_0I6VT9HVEeGSWYp6WoHgWA/executionresult/urn:com.ibm.rqm:executionresult:481"/>
  <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2012-11-01T19:29:59.266Z</dcterms:modified>
  <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://myrqmserver:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.execution.ExecutionResult/_hjYFQyRaEeK7qas16_dx7g</dcterms:identifier>
  <oslc_qm:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">com.ibm.rqm.execution.common.state.passed</oslc_qm:status>
 </rdf:Description>
</rdf:RDF>


0 votes

Comments

Hi Pramod,
I was looking for what is URI representation to get the RDF. Is it same as we use it for REST API GET?


Permanent link
It iis discovery based process, you always starts with rootservices URL and then discover the URLs
e.g.
1. https://myrqm:9443/qm/rootservices
Look for oslc_qm:qmServiceProviders in it to get qm catalog URL
2. Open qm catalog URL e.g. https://myrqm:9443/qm/oslc_qm/catalog
Use header
accept : application/rdf+xml
OSLC-Core-Version: 2.0
3. Response contains a list of service providers, essentially each service provider is a project area. Pick any one, there will be a URL which ends with service.xml
e.g. https://myrqm:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/services.xml
4. Open service URL
You will get URL for all resources, Creation URL, resource shape URL, resource query URL etc..
e.g.

<oslc:queryCapability>
                    <oslc:QueryCapability>
                        <dcterms:title>Default query capability for TestResult</dcterms:title>
                        <oslc:queryBase rdf:resource="https://myrqm:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/resources/com.ibm.rqm.execution.ExecutionResult"/>
                        <oslc:resourceShape rdf:resource="https://myrqm:9443/qm/oslc_qm/contexts/_0I6VT9HVEeGSWYp6WoHgWA/shape/query/com.ibm.rqm.execution.ExecutionResult"/>
                        <oslc:resourceType rdf:resource="http://open-services.net/ns/qm#TestResultQuery"/>
                    </oslc:QueryCapability>
                </oslc:queryCapability>
                <oslc:queryCapability>

0 votes


Permanent link
I have similar kind of problem.
I have added the header :
accept : application/rdf+xml
OSLC-Core-Version: 2.0

but still its reading it in text/html.

Can anyone help me.

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

Question asked: Nov 26 '12, 11:56 p.m.

Question was seen: 5,197 times

Last updated: May 31 '16, 1:36 a.m.

Confirmation Cancel Confirm