Main Content

oslc.rm.RequirementCollection

Requirement collection resource for OSLC requirements management domain

Since R2021a

    Description

    The oslc.rm.RequirementCollection object represents requirement collection resources in the requirements management domain of the Open Services for Lifecycle Collaboration (OSLC) service provider. After creating and configuring oslc.Client and oslc.core.QueryCapability objects, query the service provider for available requirement collection resources by using the queryRequirementCollections function.

    Creation

    Create an oslc.rm.RequirementCollection object by using the createRequirementCollection function.

    Properties

    expand all

    Navigation URL for the requirement collection resource, specified as a character array.

    Indicator for uncommitted changes to the requirement collection resource, specified as a logical 1or 0 where:

    • 1 indicates the requirement collection resource has uncommitted changes.

    • 0 indicates the requirement collection resource has no uncommitted changes.

    Data Types: logical

    requirement collection resource fetch status, specified as a logical 1 or 0 where:

    • 1 indicates the requirement collection resource is fetched.

    • 0 indicates the requirement collection resource is not fetched.

    Data Types: logical

    Requirement collection title, specified as a character array.

    OSLC requirement collection resource identifier, specified as a character array.

    Object Functions

    addLinkAdd link to local OSLC requirement resource object
    addResourcePropertyAdd resource property to local OSLC resource object
    addTextPropertyAdd text property to local OSLC resource object
    commitSend local changes to OSLC service provider
    fetchRetrieve full resource data from OSLC service provider
    getLinksGet locally stored traceability links from OSLC requirement resource object
    getPropertyGet local contents of text property from OSLC resource object
    getRDFGet resource RDF/XML data from OSLC resource object
    getResourcePropertyGet local contents of resource property from OSLC resource object
    getSLRequirementsGet imported referenced requirement associated with OSLC requirement resource object
    removeRemove resource from OSLC service provider
    removeLinkRemove link from local OSLC requirement resource object
    removeResourcePropertyRemove resource property from local OSLC resource object
    setPropertySet local contents of text property for OSLC resource object
    setRDFSet RDF content for local OSLC resource object
    setResourcePropertySet local contents of resource property from OSLC resource object
    setResourceUrlSet resource URL for local OSLC resource object
    showView OSLC resource in system browser

    Examples

    collapse all

    This example shows how to submit a query request for requirement collection resources with a configured OSLC client, edit an existing requirement collection resource, and commit the changes to the service provider.

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

    myQueryCapability = getQueryService(myClient,'RequirementCollection');

    Submit a query request to the service provider for the available requirement collection resources.

    reqCollections = queryRequirementCollections(myQueryCapability)
    reqCollections = 
    
      1×5 RequirementCollection array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Assign a requirement collection resource to the variable myReqCollection. Retrieve the full resource data from the service provider for the requirement collection resource. Examine the Title property.

    myReqCollection = reqCollections(1);
    status = fetch(myReqCollection,myClient)
    status = 
    
      StatusCode enumeration
    
        OK
    title = myReqCollection.Title
    title =
    
        'Requirement Collection 1'
    

    Edit the requirement title and commit the change to the service provider.

    myReqCollection.Title = 'My New Requirement Collection Title';
    status = commit(myReqCollection,myClient)
    status = 
    
      StatusCode enumeration
    
        OK

    Open the requirement collection resource in the system browser by using the show function.

    show(myReqCollection)

    This example shows how to submit a creation request for a new requirement collection resource with a configured OSLC client.

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

    myCreationFactory = getCreationFactory(myClient,...
    'RequirementCollection');

    Use the creation factory to create a requirement collection resource with the title My New Requirement Collection. Retrieve the full resource data from the service provider for the requirement collection resource and inspect the resource.

    newReqCollection = createRequirementCollection(myCreationFactory,...
    'My New Requirement Collection')
    fetch(newReqCollection,myClient);
    newReqCollection
    newReqCollection = 
    
        RequirementCollection with properties:
        ResourceUrl: 'https://localhost:9443/rm/resources/_72lxMWJREeup0r..'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Requirement Collection'
         Identifier: '1808'

    Open the requirement collection resource in the system browser by using the show function.

    show(newReqCollection)

    Version History

    Introduced in R2021a