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:

 http://<server>/<model_name>/oslc/qc/
 

The syntax for the oslc.where Query parameter (defined in BNF grammar and as specified in the OSLC Query Syntax Specification) is:

WHERE_syntax

 
These example queries act on a model called firebird_model connected by the Cloud:

Query

Response

http://localhost:480/firebird_model/oslc/qc/?oslc.where= dcterms:title="Requirement1"

Retrieves all the OSLC properties of all the Requirements having the title Requirement1.

 

http://localhost:480/firebird_model/oslc/qc/?oslc.where= dcterms:title in ["Requirement1","Requirement2"]

Retrieves all the OSLC properties of all the Requirements having the title Requirement1 or Requirement2.

 

http://localhost:480/firebird_model/oslc/qc/?oslc.where=dcterms:title="Requirement1" and dcterms:creator{foaf:name}="User1"

Retrieves all the OSLC properties of all the Requirements having the title Requirement1, created by User1.

 

http://localhost:480/firebird_model/oslc/qc/?oslc.where=dcterms:creator{foaf:name}="User1" and dcterms:created<"2014-01-07"

Retrieves all the OSLC properties of all the Requirements created by User1 prior to 7th January 2014.

 

http://localhost:480/firebird_model/oslc/qc/?oslc.where= name="Requirement1"

Returns an error response as name is not a valid property in Enterprise Architect.

 

http://localhost:480/firebird_model/oslc/qc/?oslc.where=dcterms:created<"01-07-2014"

Returns an error response as the value of the property created is not in a valid format.

 

Notes

Dates must be specified in the format YYYY-MM-DD
 

Learn more

OSLC WHERE  (Online Resource)