上一页 下一页

oslc.select参数

'oslc.select'Query参数指定要检索的Resources的属性; 它类似于SQL语句的SELECT子句。此参数必须附加到Enterprise Architect中的Query Capability的基URI,如下所示:

     <protocol>://<server>/<model_name>/oslc/am/qc/?oslc.select=<CSV of Resource Properties>

'oslc.select'查询参数的语法(在BNF语法中定义,并在OSLC查询语法规范中指定)是:

可以选择的资源属性是:

  • dcterms:title
  • dcterms:type
  • dcterms:identifier
  • dcterms:subject
  • dcterms:creator / dcterms:creator{foaf:name} / dcterms:creator{*}
  • dcterms:created
  • dcterms:modified
  • dcterms:description
  • ss:status
  • ss:complexity
  • ss:stereotype / ss:stereotype{*}
  • ss:phase
  • ss:version
  • ss:language
  • ss:parentresourceidentifier
  • ss:resourcetype
  • ss:features
  • ss:nestedresources
  • ss:linkedresources

例子

步骤

查询

1

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=*

选择模型中所有资源的所有属性。

2

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=dcterms:title

选择模型中每个资源的名称。

3

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=dcterms:title,dcterms:type,dcterms:identifier

选择模型中每个资源的名称,类型和GUID。

4

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=dcterms:title,dcterms:creator{foaf:name},ss:version

 

替代方案:

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=dcterms:title,dcterms:creator{*},ss:version

选择模型中每个资源的名称,作者和版本。

5

http://localhost:480/firebird_model/oslc/am/qc/?oslc.select=name

返回错误响应,因为'name'不是有效的Resource属性。

笔记

  • 此工具可通过Enterprise Architect版本13.5或更高版本下的Enterprise Architect Pro云服务器版本获得:Small Business Edition,Team Server Edition和Enterprise Server Edition
  • 在Security Enabled模型中,您需要在GET请求中提供用户身份验证令牌(通过URL中的'useridentifier'查询字符串)以检索资源/资源要素XML

学到更多