前页 后页

oslc.select参数

“ oslc.select”查询参数指定要检索的资源的属性。它类似于SQL语句的SELECT子句。此参数必须附加到Enterprise Architect查询功能的基本URI,如下所示:

<协议>:// <服务器> / <型号名称> /oslc/am/qc/?oslc.select= <资源属性的CSV>

“ oslc.select”查询参数的语法(在BNF语法中定义且在OSLC查询语法规范中指定)为:

The syntax for the oslc.select Query parameter

可以选择的资源属性是:

  • dcterms:标题
  • dcterms:type
  • dcterms:标识符
  • dcterms:subject
  • dcterms:creator / dcterms:creator {foaf:name} / dcterms:creator {*}
  • dcterms:创建
  • dcterms:已修改
  • dcterms:说明
  • ss:状态
  • ss:复杂度
  • ss:stereotype / ss:stereotype {*}
  • ss:phase
  • ss:版本
  • ss:语言
  • ss:parentresourceidentifier
  • ss:资源类型
  • ss:功能
  • 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

返回错误响应,因为“名称”不是有效的Resource属性。

笔记

  • 可通过Pro Cloud Server使用有效许可证使用此功能
  • 在启用安全性的模型中,您需要在GET请求中提供用户身份验证令牌(通过URL中的“ useridentifier”查询字符串)以检索资源/资源功能XML

学到更多