現時点では、あなたの表現は機能していますが、私の意見では、少し複雑です。次のようなインスタンス データになります。
Chihuahua describedBy fluffiness72 .
fluffiness72 hasValue 4.
お気づきのように、代わりに hasFluffiness データ型プロパティを使用できますが、それをしたくない場合は、Fluffiness、Size、FriendlinessなどのAttributeクラスを使用することをお勧めします。インスタンス。次に、AttributeValueクラスとプロパティの属性と値(おそらくもっと適切な名前を思い付くことができます) を使用して、次のようにデータを記述できます。
:chihuahua62 rdf:type :Chihuahua ;
:hasAttributeValue [ :attribute :Fluffiness ; :value 3 ] ;
:hasAttributeValue [ :attribute :Friendliness ; :value 2 ] .
この種の表現では、「すべてのチワワの毛羽立ちレベルは 4 未満です」のように言うことができます。
((∃hasAttributeValue -1 .Chihuahua) ⊓ (=attribute.Fluffiness)) ⊑ ∀value.xsd:float[≤4.0]
(( inverse (hasAttributeValue) some Chihuahua) and (attribute value Fluffiness)) SubClassOf ( value only xsd:float[<= 4.0])
英語では、これは、属性FluffinessのチワワのすべてのAttributeValueが 4.0 未満の値を持つ必要があることを示しています。
「チワワに属性値がある場合、属性が Fluffiness の場合、値は 4.0 未満です」という別の表現を使用できます。これは、「チワワに属性値がある場合、属性がFluffiness でないか、値が 4.0 未満である」に相当します。
チワワ ⊑ ∀hasAttributeValue.(¬(=attribute.Fluffiness) ⊔ (∀value.xsd:float[≤4.0]))
これは、関心のあるクラスに関するサブクラスの公理であるため、オントロジー エディターに書き込む方が簡単です。
両方のアプローチを示すオントロジーを次に示します。
@prefix : <http://stackoverflow.com/q/24760392/1281433/dogProperties#> .
@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#> .
:Shagginess a owl:NamedIndividual , :Attribute .
:hasValue a owl:DatatypeProperty ;
rdfs:domain :_attVal .
[ a owl:Class ;
rdfs:subClassOf [ a owl:Restriction ;
owl:allValuesFrom [ a rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions ( [ xsd:minInclusive
10 ] )
] ;
owl:onProperty :hasValue
] ;
owl:intersectionOf ( [ a owl:Restriction ;
owl:onProperty [ owl:inverseOf :hasAttributeValue ] ;
owl:someValuesFrom :Newfoundland
] [ a owl:Restriction ;
owl:hasValue :Shagginess ;
owl:onProperty :hasAttribute
] )
] .
:Newfoundland a owl:Class ;
rdfs:subClassOf :Dog .
:Attribute a owl:Class .
:_attVal a owl:Class .
:hasAttribute a owl:ObjectProperty ;
rdfs:domain :_attVal ;
rdfs:range :Attribute .
:Chihuahua a owl:Class ;
rdfs:subClassOf :Dog ;
rdfs:subClassOf [ a owl:Restriction ;
owl:allValuesFrom [ a owl:Class ;
owl:unionOf ( [ a owl:Class ;
owl:complementOf [ a owl:Restriction ;
owl:hasValue :Shagginess ;
owl:onProperty :hasAttribute
]
] [ a owl:Restriction ;
owl:allValuesFrom [ a rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions ( [ xsd:maxInclusive
4 ] )
] ;
owl:onProperty :hasValue
] )
] ;
owl:onProperty :hasAttributeValue
] .
:hasAttributeValue a owl:ObjectProperty ;
rdfs:range :_attVal .
:Dog a owl:Class .
<http://stackoverflow.com/q/24760392/1281433/dogProperties>
a owl:Ontology .