我需要能够获取枚举的选项列表(带有文本值)和/或通过特定值搜索枚举/url。我好像也做不到。为了获得用户的链接,我能够查询名称与我的输入匹配的贡献者的工作项,从而获得链接(如下所示),但我似乎无法通过枚举来做到这一点。它声称我的 rtc_ext:assetType 不存在,即使我知道它确实存在,因为我正在从工作项返回的 rdf 中提取名称。获取我正在寻找的枚举的正确方法是什么?
我发现,对于专门的枚举(不是针对人的),我可以在不查询的情况下获取所有枚举资源的列表。如果一个项目位于 http:///stuff/assetType/assetType.literal.l42,我可以简单地请求 http:///stuff/assetType/ 来获取完整列表。不幸的是,我的枚举返回了一些 326 个选项,所有这些都是简单的资源 URL,然后我需要单独请求这些 URL,以确定哪个是 dc:title == MyValue。我似乎无法以任何有意义的方式查询它以仅返回对 dc:title 具有特定值的那个。
为人们工作但不理想,因为他们必须先被分配一些东西:
https://<host>/ccm/oslc/contexts/<keything>/workitems?oslc.where=dcterms%3Acontributor{foaf%3Aname="Diane"}&oslc.properties=dcterms:contributor&oslc.prefix=dcterms=%3Chttp%3A//purl.org/dc/terms/%3E&oslc.pageSize=1
模仿人物搜索概念总是声称没有知识“assetType”:
https://<host>/ccm/oslc/contexts/<keything>/workitems?oslc.where=rtc_ext:assetType{dc:title="MyType"}&oslc.properties=rtc_ext:assetType&oslc.prefix=dcterms=%3Chttp%3A//purl.org/dc/terms/%3E&oslc.pageSize=1
查询枚举似乎什么都不做,只返回枚举的所有选项:
https://<host>/ccm/oslc/enumerations/<keything>/assetType?oslc.where=dc%3Atitle="MyType"&oslc.prefix=dcterms=%3Chttp%3A//purl.org/dc/terms/%3E