Topics
Prev Next

Query Capability

Clients can query a model and retrieve the Resources that match a specific criteria. In Enterprise Architect, the base URI for accessing the Query Capability is:

     <protocol>://<server>/<model_name>/oslc/am/qc/

A query string expressing the specific criteria should be added to the base URI and addressed to the model using an HTTP GET request. The response for this request will be in RDF/XML format. Currently, Enterprise Architect supports querying on Package, element and diagram properties only (and not on its features such as attributes, operations and scenarios).

Enterprise Architect supports these Query Capability parameters for specifying the criteria:

  • oslc.where - specifies the conditions that the Resources must satisfy and is similar to the WHERE clause of a SQL statement
  • oslc.select - specifies the Resource properties to be retrieved and is similar to the SELECT clause of a SQL statement

These parameters can be used separately or in combination to specify the criteria for retrieving the Resources.

Example

Retrieve all Resources of type Actor in the model:

  • URL : http://localhost:480/firebird_model/oslc/am/qc/?oslc.where=dcterms:type="Actor"

The response is as shown.

Elements of the Response XML

Element

Description

oslc_am:Resource

Represents an OSLC Architecture Management 2.0 Resource and its properties (as defined in the Resource Shape). The attribute 'rdf:about' on this element specifies the URL for accessing the Resource. The format for this URL is:

     <protocol>://<server>/<model_name>/oslc/am/resource/<Resource GUID With Prefix>/

Elements with namespace prefix 'dcterms'

The standard properties from the Dublin Core Metadata Element Set.

Elements with namespace prefix 'ss'

The custom Enterprise Architect properties.

Notes

  • This facility is available through the Enterprise Architect Pro Cloud Server
  • In a Security Enabled model, you need to provide the User Security GUID (via the 'useridentifier' query string in the URL) in the GET request to retrieve the Resource/Resource Feature XML

Learn more