1

我是 Fi-Ware 的新手,我正在尝试用它做一些有用的事情。特别是,我找到了一些命令来获取一些信息,但是你知道当你问你需要设备的 ID 时。我还没有找到一个明确的命令,用 curl 来获取 SmartSantander 中的 ID 列表。

谁能告诉我他/她是否可以,这是什么命令?非常感谢您

4

3 回答 3

2

我认为这将取决于 EntityId 在该场景中的建模方式。

这个想法可能是使用查询上下文命令返回与给定正则表达式模式匹配的所有实体(仅在 ID 字段中可用的功能)。理想情况下,EntityId 必须具有足够的命名空间,以使这种查询请求成为可能。

如果您不想从整个响应集中检索所有信息,请考虑“attributeList”参数。

更多信息:

https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide#Query_Context_operation

于 2014-07-15T16:05:34.060 回答
1

By what I gather from the comments in other answers, it looks like you are trying to use convenience operations to get a list of entities by ID and using regular expressions.

This is simply not supported (according to this):

It is not possible to use convenience operations to query for lists of entities, entity patterns nor lists of attributes.

You must either:

  • Use convenience operations, but query by type to get a list of entities, or by ID to get individual entities.
  • Use standard operations, which allow you to use regexps in the ID field (such as suggested by Perrolobo).
于 2014-08-27T10:27:33.497 回答
1

orion.lab.fi-ware.org 上不同实体类型的列表可以在Orion Context Broker 手册的这一部分的表格中找到。在该表中,您可以看到可用的不同实体类型(例如 santander:lux 、 santander:traffic 等)。

接下来,为了了解属于给定类型的所有 ID,请查看此问题及其答案。特别注意关于分页的备注(默认情况下,您将获得最多 20 个实体)。

最后,一旦您知道 ID,您可以使用模式(如本问题的其他答案中所述)或直接获取 ID 来检索它们。

于 2014-07-16T13:13:38.500 回答