It's all about the answers!

Ask a question

DNG : OSLC query to get views in a module


Jean-François CHAPELLE (4410) | asked Jan 19 '22, 1:16 a.m.
retagged Jan 19 '22, 8:14 a.m. by Ian Barnard (1.8k613)

 Where can I find a sample OSLC query to get the views (shared and/or personnal) existing in a DNG module ?


My goal is :
  • Mini : get the view name, URI, status (shared or personnal)
  • Maxi : get the view name, URI, status  and attributes list

Thank you for your help.

Regards.

Accepted answer


permanent link
Ian Barnard (1.8k613) | answered Jan 19 '22, 5:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 20 '22, 8:48 a.m.

 Hi


If you follow the discovery sequence for your project/component/configuration you'll get a configuration-specific services.xml which includes query capabilities, and one of these is for views http://jazz.net/ns/rm/dng/view#View. NOTE this query capability doesn't pay attention to oslc.where or oslc.select - you get the detail for all views - for 7.0.2 this includes the scope and if module-scope the module ID, and whether it is shared. I assume it won't show you other user's private views..


I think that was for 6.0.6.1 but whichever version it was for didn't then include the query capability for views.

This example below is from a component in 7.0.2 does include it, marked by <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/view#View"/>
:
NOTE 1. of course you must include the configuration when you make the query.
NOTE 2: the View query doesn't appear to use the oslc.select and oslc.where query parameters.


Do a GET on this with headers:
  • OSLC-=Core-Version: 2.0
  • Accept: application/rdf+xml
  • Configuration.Context: the configuration URL


<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    xmlns:jazzDisc="http://jazz.net/ns/discovery#"
  <oslc:ServiceProvider rdf:about="https://jazz.ibm.com:9443/rm/oslc_rm/-_28tkB6Eeuh3Iiax2L3Ow/services.xml">
    <jp10:supportLinkDiscoveryViaLinkIndexProvider rdf:datatype=
    <dcterms:publisher rdf:resource="https://jazz.ibm.com:9443/rm/application-about"/>
    <jp10:globalConfigurationAware rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >no</jp10:globalConfigurationAware>
    <oslc:service>
      <oslc:Service>
        <oslc:creationDialog>
          <oslc:Dialog>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:hintHeight>530px</oslc:hintHeight>
            <oslc:hintWidth>600px</oslc:hintWidth>
            <oslc:label>Collection</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Collection Creation</dcterms:title>
          </oslc:Dialog>
        </oslc:creationDialog>
        <oslc:selectionDialog>
          <oslc:Dialog>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:hintHeight>550px</oslc:hintHeight>
            <oslc:hintWidth>800px</oslc:hintWidth>
            <oslc:label>Requirement</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Generic Requirement Selection</dcterms:title>
          </oslc:Dialog>
        </oslc:selectionDialog>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGkB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKUB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THkB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIUB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJUB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJ0B6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TF0B6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKkB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIEB6Eeuh3Iiax2L3Ow"/>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGUB6Eeuh3Iiax2L3Ow"/>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Collection Creation Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <calm:filter>
          <calm:Filter>
            <calm:filterBase rdf:resource="https://jazz.ibm.com:9443/rm/calmFilter/-_28tkB6Eeuh3Iiax2L3Ow/requirementsChangedSince"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:usage rdf:resource="http://jazz.net/xmlns/prod/jazz/calm/1.0/requirementsChangedSince"/>
            <dcterms:title>Requirements Changed Since Filter</dcterms:title>
          </calm:Filter>
        </calm:filter>
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Query Capability</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Requirement Creation Factory</dcterms:title>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OT_v7FZkHOiEeytoJ46yP5LHA"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TH0B6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIkB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TK0B6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJkB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THUB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TG0B6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TI0B6Eeuh3Iiax2L3Ow"/>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:creationDialog>
          <oslc:Dialog>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:hintHeight>530px</oslc:hintHeight>
            <oslc:hintWidth>600px</oslc:hintWidth>
            <oslc:label>Requirement</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Generic Requirement Creation</dcterms:title>
          </oslc:Dialog>
        </oslc:creationDialog>
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/navigation#folder"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Folder Query Capability</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://www.ibm.com/xmlns/rdm/types/TypeImportSession"/>
            <oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/type-import-sessions"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Type System Copy Session Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:selectionDialog>
          <oslc:Dialog>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:hintHeight>550px</oslc:hintHeight>
            <oslc:hintWidth>800px</oslc:hintWidth>
            <oslc:label>Requirement</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Requirement Selection</dcterms:title>
          </oslc:Dialog>
        </oslc:selectionDialog>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/config#DeliverySession"/>
            <oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/delivery-sessions"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Delivery Session Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:selectionDialog>
          <oslc:Dialog>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
            <oslc:hintHeight>550px</oslc:hintHeight>
            <oslc:hintWidth>800px</oslc:hintWidth>
            <oslc:label>Collection</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Collection Selection</dcterms:title>
          </oslc:Dialog>
        </oslc:selectionDialog>
        <oslc:domain rdf:resource="http://open-services.net/ns/rm#"/>
        <oslc:creationDialog>
          <oslc:Dialog>
            <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
            <oslc:hintHeight>530px</oslc:hintHeight>
            <oslc:hintWidth>600px</oslc:hintWidth>
            <oslc:label>Requirement</oslc:label>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Requirement Creation</dcterms:title>
          </oslc:Dialog>
        </oslc:creationDialog>
      </oslc:Service>
    </oslc:service>
    <oslc:service>
      <oslc:Service>
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/view#View"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >View Definition Query Capability</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFDefinition"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >ReqIF Definition Query Capability</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFExport"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >ReqIF Export Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFDefinition"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >ReqIF Definition Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFPackage"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >ReqIF Package Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:creationFactory>
          <oslc:CreationFactory>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFImport"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >ReqIF Import Factory</dcterms:title>
          </oslc:CreationFactory>
        </oslc:creationFactory>
        <oslc:domain rdf:resource="http://jazz.net/ns/rm/dng/reqif#"/>
      </oslc:Service>
    </oslc:service>
    <dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >Service Descriptor for Project: rm_optout_p1</dcterms:description>
    <jp10:supportLinkDiscoveryViaOSLCQueries rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >true</jp10:supportLinkDiscoveryViaOSLCQueries>
    <jp10:supportContributionsToLinkIndexProvider rdf:datatype=
    <oslc:details rdf:resource="https://jazz.ibm.com:9443/rm/process/project-areas/-_28tkB6Eeuh3Iiax2L3Ow"/>
    <jp10:supportOSLCSimpleQuery rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >true</jp10:supportOSLCSimpleQuery>
    <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >rm_optout_p1</dcterms:title>
  </oslc:ServiceProvider>
</rdf:RDF>





Jean-François CHAPELLE selected this answer as the correct answer

Your answer


Register or to post your answer.