简体   繁体   English

如何添加点“。” 以Sparql中个人的名义?

[英]How to add dot '.' in the name of individuals in Sparql?

Is it possible to have a . 有可能有一个. (dot) in the qname of individuals or RDF resources in general? 个体或RDF资源的qname中的(点)一般?

Something like this? 像这样吗

SELECT  ?tableName ?fieldName 
WHERE { ?fieldName hrdata:relatedField hrdata:ps_ti0002.EMPLID. }

The dot in ps_ti0002.EMPLID is problematic. ps_ti0002.EMPLID的点有问题。

your code is right and should work. 您的代码是正确的,应该可以工作。 It is possible to use dot in the individual's name. 可以在个人姓名中使用点。

I think you should check your data property (relatedField), maybe is not clarified right. 我认为您应该检查您的数据属性(relatedField),也许还没有弄清楚。

@Narges Kasaeizadeh @Narges Kasaeizadeh

Unfortunately, I still can't comment - but I think your answer is wrong and a dot is not allowed in prefixed URIs/IRIs as you can try out using the validator suggested by @AndyS . 不幸的是,我仍然无法发表评论-但我认为您的回答是错误的,并且在前缀URI / IRI中不允许使用点,因为您可以尝试使用@AndyS建议的验证器。

The . . is allowed in SPARQL and the SPARQLer Query Validator demonstrates. 在SPARQL中被允许,并且SPARQLer查询验证器进行了演示。 However, there are a couple of suggestions to help you get this working. 但是,有一些建议可以帮助您完成此工作。 First is to have a space after the qname, ie: 首先是在qname之后有一个空格,即:

WHERE { ?fieldName hrdata:relatedField hrdata:ps_ti0002.EMPLID . }

Another is to use the fully qualified URI. 另一个是使用完全限定的URI。 Suppose the namespace for hrdata is http://example.org/hrdata/ , the the following query should work: 假设hrdata的命名空间为http://example.org/hrdata/ ,则以下查询应该有效:

SELECT  ?tableName ?fieldName 
WHERE { ?fieldName hrdata:relatedField <http://example.org/hrdata/ps_ti0002.EMPLID> . }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM