Prev | Next |
oslc.where Parameter
The 'oslc.where' Query parameter specifies the conditions that the resources must satisfy; it is similar to the WHERE clause of an SQL statement. This parameter must be appended to the base URI of the Query Capability in Enterprise Architect as:
<protocol>://<server>/<model_name>/oslc/am/qc/?oslc.where=<conditions>
The syntax for the 'oslc.where' Query parameter (defined in BNF grammar and as specified in the OSLC Query Syntax Specification) is:
The Resource properties that can be queried are:
- dcterms:title
- dcterms:type
- dcterms:identifier
- dcterms:subject
- dcterms:creator{foaf:name} / dcterms:creator{*}
- dcterms:created
- dcterms:modified
- dcterms:description
- ss:status
- ss:complexity
- ss:stereotype{ss:name} / ss:stereotype{ss:fqname}
- ss:phase
- ss:version
- ss:language
- ss:parentresourceidentifier
- ss:resourcetype
- ss:linkedresources
Examples
No. |
Query |
---|---|
1 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:title="Class1" Retrieves all Resources with the name of 'Class1'. |
2 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:title="Class1" and dcterms:type="Class" Retrieves all Enterprise Architect 'Class' type Resources with the name of 'Class1'. |
3 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:type="Activity" and dcterms:created > "2020-05-01" or http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:resourcetype ="Element" and dcterms:type="Activity" and dcterms:created > "2020-05-01" Retrieves all Enterprise Architect Activity type Resources that were created after 2020-05-01. |
4 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name}="Sparx" Alternatives: http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name="Sparx"} http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*}="Sparx" http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*="Sparx"} Retrieves all Resources created by Author 'Sparx'. |
5 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name} in ["Sparx",”SpxSys”] Alternatives: http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name in ["Sparx",”SpxSys”]} http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*} in ["Sparx",”SpxSys”] http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{* in ["Sparx",”SpxSys”]} Retrieves all Resources created by Author 'Sparx' or 'SpxSys'. |
6 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:stereotype{ss:fqname} = "BPMN2.0::Activity" Alternative: http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:stereotype{ss:fqname = "BPMN2.0::Activity"} Retrieves all Enterprise Architect BPMN 2.0 Activity Resources. |
7 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:parentresourceidentifier="pk_{2DFF8796-9D6F-4381-B2DC-4C7FFEB881E2}" and ss:resourcetype="Element" Retrieves all Enterprise Architect elements that are directly under a Package with the GUID {2DFF8796-9D6F-4381-B2DC-4C7FFEB881E2}. |
8 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:resourcetype in ["Package","Diagram"] Retrieves all Enterprise Architect Packages and diagrams in the model. |
9 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:resourcetype = "Diagram and dcterms:type="Custom" Retrieves all diagrams of Enterprise Architect 'Custom' type in the model. Note: To retrieve the Diagram Image and Image Map associated with a diagram, follow the URL specified in the <ss:features> element of the diagram XML. |
10 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:identifier="dg_{5147E138-1F14-4738-B721-5FCC0F882FB8}" Retrieves all properties of a diagram with the Enterprise Architect GUID {5147E138-1F14-4738-B721-5FCC0F882FB8}. Note: To retrieve the Diagram Image and Image Map associated with a diagram, follow the URL specified in the <ss:features> element of the diagram XML. |
11 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:linkedresources{*=<http://localhost:480/firebird_model/oslc/am/resource/el_{B55E995C-D8EA-4fa9-9006-7932294961A9}>} Retrieves all Resources that link to 'Class1' (which has the Enterprise Architect GUID {B55E995C-D8EA-4fa9-9006-7932294961A9}). In other words, this will retrieve all those Packages and elements that have Connectors whose target end is Class1. |
12 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:linkedresources{ss:Association=<http://localhost:480/firebird_model/oslc/am/resource/el_{B55E995C-D8EA-4fa9-9006-7932294961A9}>} Retrieves all Resources that have an Association link to 'Class1' (which has the Enterprise Architect GUID {B55E995C-D8EA-4fa9-9006-7932294961A9}). In other words, this will retrieve all those Packages and elements that have Association Connectors whose target end is Class1. |
13 |
http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=name="Class1" and dcterms:type="Class" Returns an error response as 'name' is not a valid Resource Property. |
Notes
- This facility is available through the Pro Cloud Server, with a valid license
- Compound terms such as 'dcterms:creator' and 'ss:linkedresources' support only the comparison operators '=' and 'in'
- Dates must be specified in the format YYYY-MM-DD
- In a security-enabled model, you need to provide the User Authentication Token (via the 'useridentifier' query string in the URL) in the GET request to retrieve the Resource/Resource Feature XML
Learn more
- oslc.where (Online Resource)
- User Authentication Token