다음 예제는 카디널리티를 처리하는 방법을 보여줍니다. 이 예제에 대해 어떻게 생각하십니까? 몇 가지 작업을 남기기 위해 바다와 도시를 모델링하고 자신의 것으로 분리 할 수 있습니까?
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix world: <http://www.world.org/ontology/world#> .
world: rdf:type owl:Ontology .
############# country ##################
world:Country
a owl:Class , rdfs:Class ;
rdfs:label "Country" ;
rdfs:comment "representing an country in the world" ;
rdfs:subClassOf
[a owl:Restriction ;
owl:onProperty :hasNeighbors ;
owl:minCardinality 1
];
rdfs:subClassOf
[a owl:Restriction ;
owl:onProperty :hasCapital ;
owl:minCardinality 1
];
rdfs:isDefinedBy world: .
world:hasNeighbors
a owl:ObjectProperty, rdf:Property ;
rdfs:label "hasNeighbors" ;
rdfs:comment "The neighbor countries." ;
rdfs:domain :Country ;
rdfs:range :Country ;
rdfs:isDefinedBy world: .
world:hasCapital
a owl:ObjectProperty, rdf:Property ;
rdfs:label "hasCapital" ;
rdfs:comment "The capital of a country." ;
rdfs:domain :Country ;
rdfs:range :City ;
rdfs:isDefinedBy world: .
############### City ####################
world:City
a owl:Class , rdfs:Class ;
rdfs:label "City" ;
rdfs:comment "representing an city in the world" ;
rdfs:isDefinedBy world: .
이것은에서 그대로 나타나는 것 같다 [이 시험, CSE 636 : 테스트 # 1] (https://s3.amazonaws.com/piazza-resources/hko8yj9gwu11l2/hmnkxu5e7in4v2/t1.pdf?AWSAccessKeyId=AKIAJKOQYKAYOBKKVTKQ&Expires= 1413476597 & 서명 = jbrBPNVs6DclLWTbzmUQBuvjeRk % 3D). (LaTeX에서 생성 된 PDF 파일에서 'different'를 복사하면 ff ligature를 잃어 버렸습니다.) –
답변을 작성 했으므로 (지금 삭제됨) 설명이 없어도 공개적으로 게시하고 싶지는 않습니다. 나는 그들을 위해 누군가의 숙제를하고있는 것이 아니다. –
나는 한 도시가 한 국가 이상에있을 수 있다는 것을 좋아한다. 내 머리 꼭대기에서, 이것은 실제로 현실 세계의 한 코너 케이스입니다. – Ignazio