使用 idPattern 或 isPattern=true 的上下文提供者
Context Providers using idPattern or isPattern=true
我正在尝试为同一类型的所有实体声明一个通用上下文提供程序。我一直在使用的示例只为集合的一个元素定义了上下文提供程序,而且似乎不可能为此定义模式。事实上,在Context Provider声明时使用idPattern似乎是不允许的。
其他相关问题是从 orion 到上下文提供者的转发不包含相同的有效载荷,从而失去了限制部分。
我做错了什么?
我尝试了不同的方法,下面有一个例子。
http://10.174.123.243:1026/v1/registry/registerContext
{
"contextRegistrations": [
{
"entities": [
{
"type": "DATO_METEREOLOGICO",
"isPattern": "true",
"id": ".*"
}
],
"providingApplication": "http://10.174.123.210:8080/smarnet/observaciones"
}
],
"duration": "P1M"
}
在 ORION 日志中 "isPattern": "true" 被替换为 "isPattern": "false" 并且当 id 等于 '.*'
我们使用的是 ORION 1.2.0 版。
提前致谢。
目前 Context Broker 注册不支持实体模式。 Documentation 已更新以明确:
In NGSIv1 registrations, isPattern
cannot be set to "true"
. If so, the registration fails and an error is returned. The OMA specification allows for regular expressions in entity id in registrations but as of now, the Context Broker doesn't support this feature.
事实上,在 Orion 1.2.0 中,错误 return 逻辑因 a bug 而失败。因此,创建了一个注册(但没有模式解释)而不是响应错误。该错误修复已经在 develop 分支中实现,并将包含在下一个 Orion 版本 (1.3.0) 中。
我正在尝试为同一类型的所有实体声明一个通用上下文提供程序。我一直在使用的示例只为集合的一个元素定义了上下文提供程序,而且似乎不可能为此定义模式。事实上,在Context Provider声明时使用idPattern似乎是不允许的。
其他相关问题是从 orion 到上下文提供者的转发不包含相同的有效载荷,从而失去了限制部分。
我做错了什么?
我尝试了不同的方法,下面有一个例子。
http://10.174.123.243:1026/v1/registry/registerContext
{
"contextRegistrations": [
{
"entities": [
{
"type": "DATO_METEREOLOGICO",
"isPattern": "true",
"id": ".*"
}
],
"providingApplication": "http://10.174.123.210:8080/smarnet/observaciones"
}
],
"duration": "P1M"
}
在 ORION 日志中 "isPattern": "true" 被替换为 "isPattern": "false" 并且当 id 等于 '.*'
我们使用的是 ORION 1.2.0 版。
提前致谢。
目前 Context Broker 注册不支持实体模式。 Documentation 已更新以明确:
In NGSIv1 registrations,
isPattern
cannot be set to"true"
. If so, the registration fails and an error is returned. The OMA specification allows for regular expressions in entity id in registrations but as of now, the Context Broker doesn't support this feature.
事实上,在 Orion 1.2.0 中,错误 return 逻辑因 a bug 而失败。因此,创建了一个注册(但没有模式解释)而不是响应错误。该错误修复已经在 develop 分支中实现,并将包含在下一个 Orion 版本 (1.3.0) 中。