Main Content

setQueryParameter

Set query parameter for OSLC query service

    Description

    example

    setQueryParameter(myQueryCapability,parameter) sets a query parameter for the query capability myQueryCapability.

    Note

    The query parameter is only applied for one query. After you submit a query, the query parameter is automatically cleared from the query capability.

    Examples

    collapse all

    This example shows how to set a query parameter for a query capability.

    After you have created and configured an OSLC client myClient as described in Create and Configure an OSLC Client for the Requirements Management Domain, create a query capability for the requirement resource type.

    myQueryCapability = getQueryService(myClient,'Requirement')
    myQueryCapability = 
    
      QueryCapability with properties:
    
        queryParameter: ''
                client: [1×1 oslc.Client]
             queryBase: 'https://localhost:9443/rm/views?oslc.query=true&projectURL=http...'
         resourceShape: {0×1 cell}
                   dom: [1×1 matlab.io.xml.dom.Element]
                 title: 'Query Capability'
          resourceType: {1×2 cell}

    Set a query parameter for the query capability. Inspect the query capability queryParameter property.

    setQueryParameter(myQueryCapability,'?oslc.select=oslc_rm:requirement');
    param = myQueryCapability.queryParameter
    param =
    
        '?oslc.select=oslc_rm:requirement'

    Input Arguments

    collapse all

    OSLC resource query capability, specified as an oslc.core.QueryCapability object.

    OSLC query condition search parameter, specified as a character vector.

    For more information, see Query Parameters on the OSLC website.

    Tips

    Introduced in R2021a