我是添加了几个新的DataType在猫头鹰使用蛋白酶。
DataType类似于百分比,我希望指定它的范围,其双值范围为0到100。
类似地,一个名为DataType的Quality,我希望指定它的范围,其双值范围为0到1。
如何在数据范围表达式中指定这些内容?
我试图找出,但我发现两个联系,但没有用在我的上下文。
请帮助编写这些场景的数据范围表达式。
设想情况:

发布于 2014-07-02 14:51:00
只是xsd:double[ >= 0, <= 100 ]。

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://stackoverflow.com/q/24531940/1281433/percentages#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<owl:Ontology rdf:about="http://stackoverflow.com/q/24531940/1281433/percentages"/>
<owl:DatatypeProperty rdf:about="http://stackoverflow.com/q/24531940/1281433/percentages#hasPercentage">
<rdfs:range>
<rdfs:Datatype>
<owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
<owl:withRestrictions rdf:parseType="Collection">
<rdf:Description>
<xsd:minInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
>0</xsd:minInclusive>
</rdf:Description>
<rdf:Description>
<xsd:maxInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
>100</xsd:maxInclusive>
</rdf:Description>
</owl:withRestrictions>
</rdfs:Datatype>
</rdfs:range>
</owl:DatatypeProperty>
</rdf:RDF>@prefix : <http://stackoverflow.com/q/24531940/1281433/percentages#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:hasPercentage a owl:DatatypeProperty ;
rdfs:range [ a rdfs:Datatype ;
owl:onDatatype xsd:double ;
owl:withRestrictions ( [ xsd:minInclusive
0 ] [ xsd:maxInclusive 100 ] )
] .
<http://stackoverflow.com/q/24531940/1281433/percentages>
a owl:Ontology .发布于 2018-03-03 07:02:38
这篇文章可能有助于那些希望将离散整数(或任何数据类型)值赋值为数据类型属性范围的人。在数据范围表达式编辑器中键入以下代码:
{"0"^^xsd:int , "1"^^xsd:int , "10"^^xsd:int , "18"^^xsd:int , "2"^^xsd:int , "3"^^xsd:int , "4"^^xsd:int , "5"^^xsd:int , "6"^^xsd:int , "8"^^xsd:int}https://stackoverflow.com/questions/24531940
复制相似问题