getting started with rational engineering lifecycle manager queries

26
© Copyright IBM Corporation 2014 Getting started with Rational Engineering Lifecycle Manager queries Andy Lapping – Technical sales and solutions Joanne Scouler – Curriculum architect

Upload: courtney

Post on 23-Feb-2016

64 views

Category:

Documents


1 download

DESCRIPTION

Getting started with Rational Engineering Lifecycle Manager queries. Andy Lapping – Technical sales and solutions Joanne Scouler – Curriculum architect. Agenda. Linked data and Open Services for Lifecycle Collaboration (OSLC) The information model Basic concepts and terminology Linked data - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Getting started with Rational Engineering Lifecycle Manager queries

© Copyright IBM Corporation 2014

Getting started with Rational Engineering Lifecycle Manager queries

Andy Lapping – Technical sales and solutionsJoanne Scouler – Curriculum architect

Page 2: Getting started with Rational Engineering Lifecycle Manager queries

2 © Copyright IBM Corporation 2014

Agenda• Linked data and Open Services for Lifecycle

Collaboration (OSLC)• The information model• Basic concepts and terminology

• Linked data• RDF• Triples• SPARQL

• Creating queries– live demo

Page 3: Getting started with Rational Engineering Lifecycle Manager queries

3 © Copyright IBM Corporation 2014

Resources

OSLC resources:Introduction to Linked Data and OSLC by Amanda BrijpaulLinked Data by Ben WilliamsLinked Data Interfaces by Arthur Ryman

REST resources:DeveloperWorks REST resources – The BasicsLearn about rest web services

RDF, TRS, SPARQL, LQE- http://www.w3.org

Page 4: Getting started with Rational Engineering Lifecycle Manager queries

4 © Copyright IBM Corporation 2014

Rational engineering lifecycle manager

Transition to a unified view on project, program & account info

It is about accessing related information

in job related tools across the information base to increase the

collective wisdom

Analysts Quality Professionals

Release EngineersDevelopers

Architects

Project Managers

Page 5: Getting started with Rational Engineering Lifecycle Manager queries

5 © Copyright IBM Corporation 2014

Linked data in Rational engineering lifecycle manager

Electrical Design

Mechanical Design / PDM

EmbeddedSoftware Design

aboutaboutabout about

HTTP/REST

http://acme.com/TestCasehttp://acme.com/Requirement

Requirements

Test

Architecture

Change Products

The Web has proven to be the most scalable, open, and flexible integration technology

Page 6: Getting started with Rational Engineering Lifecycle Manager queries

6 © Copyright IBM Corporation 2014

OSLC links

• Link directly between tools – no need to import or duplicate data

Page 7: Getting started with Rational Engineering Lifecycle Manager queries

7 © Copyright IBM Corporation 2014

Demo linked data

Page 8: Getting started with Rational Engineering Lifecycle Manager queries

8 © Copyright IBM Corporation 2014

Data is indexed in Rational engineering lifecycle managerAn index of tracked resources is created from domain tools that allows for cross-domain Lifecycle Queries

Lifecycle Query Engine (Index)

LQE

Page 9: Getting started with Rational Engineering Lifecycle Manager queries

9 © Copyright IBM Corporation 2014

The information model

What information do you want to find with a query? Know your information model Know how your linkages are set up

What do you need to know before writing a query?

Page 10: Getting started with Rational Engineering Lifecycle Manager queries

10 © Copyright IBM Corporation 2014

Learning the languageRDF – Resource Description Framework

A general purpose language for representing information in the web

SPARQL - SPARQL Protocol and RDF Query Language A query language for RDF

TRS – Tracked Resource Set TRS is an OSLC specification that allows server applications to

make their resources and changes available to client applications.LQE – The Lifecycle Query Engine

A TRS client application

Page 11: Getting started with Rational Engineering Lifecycle Manager queries

11 © Copyright IBM Corporation 2014

Running queries Query results available in http format Pipes (XML) data to Rational Reporting for

Document Generation (RRDG) / Rational Publishing Engine (RPE)

Page 12: Getting started with Rational Engineering Lifecycle Manager queries

12 © Copyright IBM Corporation 2014

Basic concept: triples

A triple defines a relationship between things: Subject

– A uniquely identified thing Predicate (also called property)

– Some attribute of the subject– Denotes a relationship

Object– The actual value

Page 13: Getting started with Rational Engineering Lifecycle Manager queries

13 © Copyright IBM Corporation 2014

Triples

Examples:

subject

objectpredicate

subject

object

predicate

Page 14: Getting started with Rational Engineering Lifecycle Manager queries

14 © Copyright IBM Corporation 2014

RDF triples

An RDF triple is sometimes called a statement Every piece of an RDF triple can have a URL Commonly referred to as a resource

http://men.com#William http://relations.com/isMarriedTo http://women.com#Catherine

S P O

Page 15: Getting started with Rational Engineering Lifecycle Manager queries

15 © Copyright IBM Corporation 2014

RDF triples form graphs

A set of triples is called an RDF graph Graphs have nodes and edges An RDF database is sometimes called a triple store

Node

Edge

Page 16: Getting started with Rational Engineering Lifecycle Manager queries

16 © Copyright IBM Corporation 2014

Types of node

Resource node A thing with a URL with links– Commonly represented as an oval

Blank node A resource with no URL with links

Literal node A value (strings, dates) - no URL and no links– Commonly represented as a rectangle

An edge can go from any Node to any other Node. Exception: An edge cannot go from a Literal

Page 17: Getting started with Rational Engineering Lifecycle Manager queries

17 © Copyright IBM Corporation 2014

Triple patterns

A triple pattern is like an RDF triple – except that each of the S,P,O may be a variable (denoted by a preceding ? symbol)

?resource rdf:type oslc_qm:TestCase .

VariableVariables are like a wildcard – they match any node – resource or literal.

The period terminates the statement

We will discuss what rdf:type and oslc_qm:TestCase mean in a moment

Page 18: Getting started with Rational Engineering Lifecycle Manager queries

18 © Copyright IBM Corporation 2014

RDF vocabularies

In order for ‘anything’ to connect to ‘anything else’ – there must be some common language.

An RDF Vocabulary is the set of URLs for the resources in the graph

?resource http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://open-services.net/ns/qm#TestCase

From the OSLC Quality Management Vocabulary

From the standard RDF vocabulary

Page 19: Getting started with Rational Engineering Lifecycle Manager queries

19 © Copyright IBM Corporation 2014

Prefixes

Prefixes are used in SPARQL to allow queries to be shortened (instead of writing the full URL to the resource)

The following queries are equivalent

?uri http://open-services.net/ns/qm#testsChangeRequest ?tests_cr.

PREFIX oslc_qm: <http://open-services.net/ns/qm#>

?uri oslc_qm:testsChangeRequest ?tests_cr.

S P O

S P O

Page 20: Getting started with Rational Engineering Lifecycle Manager queries

20 © Copyright IBM Corporation 2014

Anatomy of a query

PREFIX oslc_qm: <http://open-services.net/ns/qm#>PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?uri

WHERE { ?uri rdf:type oslc_qm:TestCase .} SELECT ?variable ?variable

Identifies the variables to appear in the results (this is called projection)Each projected variable will be a column in the results tableSELECT * will display all variables specified in the WHERE clause

WHERE { basic graph pattern

}Identifies the basic graph pattern to match against the data pattern

Page 21: Getting started with Rational Engineering Lifecycle Manager queries

21 © Copyright IBM Corporation 2014

A simple query with resultsPREFIX oslc_qm: <http://open-services.net/ns/qm#>PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?uriWHERE { ?uri rdf:type oslc_qm:TestCase .}

Pattern matches

Projected ?uri variable

Page 22: Getting started with Rational Engineering Lifecycle Manager queries

22 © Copyright IBM Corporation 2014

Queries

Page 23: Getting started with Rational Engineering Lifecycle Manager queries

23 © Copyright IBM Corporation 2014

Creating a query

When a query is created some sample SPARQL is addedAlthough this can be executed the results will mean very little

Page 24: Getting started with Rational Engineering Lifecycle Manager queries

24 © Copyright IBM Corporation 2014

Create queries demo

Page 25: Getting started with Rational Engineering Lifecycle Manager queries

25 © Copyright IBM Corporation 2014

Appendix

Page 26: Getting started with Rational Engineering Lifecycle Manager queries

26 © Copyright IBM Corporation 2014

Blank nodes in Rhapsody

Using this technique we can discover how to extract various resources in Rhapsody• Some may have multiple blank nodes to traverse