对于制酒业而言,“产品地域”(production area)是一个非常重要的feature。根据生产地域的谷类的大小酒的类型存在很大的变化,从一个国家到一个特定的葡萄园。我们可以给出四种不同的产品地域:
l 国家(country),例如France,Italy
l 区域(region),例如Bordeaux,Medoc,Tuscany
l 城镇(town),例如Margaux, Montalcino, Montepulciano
l 葡萄园(vineyard),例如Chateau Margaux,Avignonesi
而且我们必须为不同产品地域之间的关系建模:
l 区域是国家的一部分:Tuscany在Italy
l 区域有子区域:Medoc是Bordeaux的子区域
l 城镇在某区域中:Montalcino在Tuscany
l 葡萄园在城镇中:Chateau Margaux在Margaux,Avignonesi在
1.2 建模决策 我们决定去掉“town”,将它们都看作region。这样做简化了模型,并且这附和实际中town作为一个产品地域在城镇周边,比城镇面积稍大或稍小的事实。 1.3 模型
1.3.1 Class
<owl:Class rdf:ID="&vin;ProductionArea"/ >
<owl:Class rdf:ID="&vin;Country:">
<rdfs:subClassOf rdf:resource="&vin;ProductionArea"/>
</owl:Class>
<owl:Class rdf:ID="&vin;Region:">
<rdfs:subClassOf rdf:resource="&vin;ProductionArea"/>
</owl:Class>
<owl:Class rdf:ID="&vin;Vineyard:">
<rdfs:subClassOf rdf:resource="&vin;ProductionArea"/>
</owl:Class>
用三元组可以表示为:
vin:ProductionArea rdf:type rdfs:Class.
vin:Country rdfs:subClassOf vin:ProductionArea.
vin:Region rdfs:subClassOf vin:ProductionArea.
vin:Vineyard rdfs:subClassOf vin:ProductionArea.
1.1.1 Property
<owl:ObjectProperty rdf:ID="&vin;hasSubArea">
<rdf:type rdf:resource="&owl;TransitiveProperty" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;subAreaOf">
<owl:inverseOf rdf:resource="&vin;hasSubArea"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;hasRegion">
<rdfs:subPropertyOf rdf:resource="&vin;hasSubArea"/>
<owl:allValuesFrom rdf:resource="&vin;Region"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;regionOf">
<owl:inverseOf rdf:resource="&vin;hasRegion"/>
<owl:allValuesFrom rdf:resource="&vin;Country"/>
<owl:cardinality>1</owl:cardinality>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;hasSubRegion">
<rdfs:subPropertyOf rdf:resource="&vin;hasSubArea"/>
<owl:allValuesFrom rdf:resource="&vin;Region"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;subRegionOf">
<owl:inverseOf rdf:resource="&vin;hasSubRegion"/>
<owl:allValuesFrom rdf:resource="&vin;Region"/>
<owl:cardinality>1</owl:cardinality>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;hasVineyard">
<rdfs:subPropertyOf rdf:resource="&vin;hasSubArea"/>
<owl:allValuesFrom rdf:resource="&vin;Vinyard"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="&vin;vineyardRegion">
<owl:inverseOf rdf:resource="&vin;hasVineyard"/>
<owl:allValuesFrom rdf:resource="&vin;Region"/>
<owl:cardinality>1</owl:cardinality>
</owl:ObjectProperty>
用三元组表示为:
vin:hasSubArea rdf:type rdfs:Property.
vin:hasSubArea rdf:type owl:TransitiveProperty.
vin:subAreaOf owl:inverseOf vin:hasSubArea.
vin:hasRegion rdfs:subPropertyOf vin:hasSubArea.
vin:hasRegion owl:allValuesFrom vin:Region.
vin:regionOf owl:inverseOf vin:hasRegion.
vin:regionOf owl:allValuesFrom vin:Country.
vin:regionOf owl:cardinality 1.
vin:hasSubRegion rdfs:subPropertyOf vin:hasSubArea.
vin:hasSubRegion owl:allValuesFrom vin:Region.
vin:subRegionOf owl:inverseOf vin:hasSubRegion.
vin:subRegionOf owl:allValuesFrom vin:Region.
vin:subRegionOf owl:cardinality 1.
vin:hasVineyard rdfs:subPropertyOf vin:hasSubArea.
vin:hasVineyard owl:allValuesFrom vin:Vineyard.
vin:vineyardRegion owl:inverseOf vin:hasVineyard..
vin:vineyardRegion owl:allValuesFrom vin:Region.
vin:vineyardRegion owl:cardinality 1.