[英]Ontology linking classes for online store
I'm trying to create ontology for store with Protege 4.3. 我正在尝试使用Protege 4.3为商店创建本体。 Everything goes well, but I stuck on something. 一切顺利,但我坚持了一些事情。
I have two classes - Products and Stores. 我有两个班 - 产品和商店。 Currently they have object property hasProduct, which has domain Stores and range Products. 目前他们有对象属性hasProduct,它有域商店和范围产品。 Let's say that store "Tempo Sport Shop" hasProduct "Brown slippers". 假设商店“Tempo Sport Shop”有产品“棕色拖鞋”。 But there is a store named "Sport Depot" which has the same product but with different price. 但是有一家名为“Sport Depot”的商店,它有相同的产品但价格不同。
I'm curious how can I put a different price for this product in different stores? 我很好奇如何才能在不同的商店为这款产品定价? I want those Brown Slippers to be 33.00$ in Sport Depot and the exactly same product to cost 41.00$ in Tempo Sport Shop. 我希望那些Brown Slippers在Sport Depot中的价格为33.00美元,而在Tempo Sport Shop中则需要41.00美元。
Here's the ontology: 这是本体论:
@prefix : <http://www.semanticweb.org/yuriy/ontologies/2014/0/untitled-ontology-23#> .
<http://www.semanticweb.org/yuriy/ontologies/2014/0/untitled-ontology-23> rdf:type owl:Ontology .
:hasBrand rdf:type owl:ObjectProperty ;
rdfs:range :Brands ;
rdfs:domain :Products .
:hasProduct rdf:type owl:ObjectProperty ;
rdfs:range :Products ;
rdfs:domain :Stores .
:Brands rdf:type owl:Class .
:Products rdf:type owl:Class .
:Stores rdf:type owl:Class .
:Adidas rdf:type :Brands ,
owl:NamedIndividual .
:Fluffy_Slippers rdf:type :Products ,
owl:NamedIndividual ;
:hasBrand :Nike .
:Nike rdf:type :Brands ,
owl:NamedIndividual .
:Sport_Depot rdf:type :Stores ,
owl:NamedIndividual ;
:hasProduct :Fluffy_Slippers .
:Tempo_Sport rdf:type :Stores ,
owl:NamedIndividual ;
:hasProduct :Fluffy_Slippers .
I'd do something like: 我会这样做:
:Sport_Depot :sells [ :product :Fluffy_Slippers;
:price "33.00";
:price_unit "USD" ].
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.