In OSLC, each artifact in the lifecycle, e.g., Requirements, Change Requests, or Test Cases, is identified by a URI. Each artifact in the lifecycle is an HTTP resource. Standard HTTP methods (GET, PUT, POST, DELETE) are used to interact with each artifact. When you look up a URI, OSLC queries provide useful information using the standards (RDF*, SPARQL). Each OSLC resource has an RDF representation. RDF/XML is mandatory and other representations such as JSON or HTML are common. OSLC lifecycle artifacts are linked by relationships, e.g., elaborates or elaboratedBy, which are defined by URIs.
There are two types of OSLC queries you can construct to query an artifacts repository - simple or basic query and advanced query based on SQL or SPARQL. You can also find more information about OSLC queries on the OSLC Specification website.
You can use the OSLC Query Editor dialog to create OSLC queries. The OSLC Query Editor has two tabs - and .
To create and run a basic OSLC query
- Do one of the following
- From the MagicDraw main menu, click Tools > DataHub > Create OSLC Query
- On the DataHub Explorer toolbar, click the Create OSLC Query icon.
The OSLC Query Editor dialog opens.
2. Enter the Title, Description, Creator, Created Date and Last ModifiedDate fields to do text-searching query. Click .
3. After the query results appear, click to save the results as the alias.
To create and run an advanced query
- Do one of the following
- From the MagicDraw main menu, click Tools > DataHub > Create OSLC Query
- On the DataHub Explorer toolbar, click the Create OSLC Query icon.
The OSLC Query Editor dialog opens.
2. Click the Query Editor tab.
3. In the Query String text box, type your query. You can find more examples of advanced queries and their syntax on the OSLC Specification website. If the query returns any results, they will be displayed on the lower half of the OSLC Query Editor dialog.
4. Click to save the results as an alias.