预订演示
前页 后页

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:

Syntax for the oslc.where Query parameter

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

See also

1

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:title="Class1" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

     or

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:resourcetype ="Element" and dcterms:type="Activity" and dcterms:created > "2020-05-01" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

Alternatives:

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name="Sparx"} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*}="Sparx" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*="Sparx"} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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”] & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

Alternatives:

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{foaf:name in ["Sparx",”SpxSys”]} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{*} in ["Sparx",”SpxSys”] & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:creator{* in ["Sparx",”SpxSys”]} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

Alternative:

http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=ss:stereotype{ss:fqname = "BPMN2.0::Activity"} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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"] & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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}" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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}>} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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}>} & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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" & useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

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
  • GET request to retrieve the Resource/Resource Feature XML will not be processed by the Pro Cloud Server unless the User Authentication Token is passed in with the request (via the 'useridentifier' query string in the URL)

Learn more