General Actions:
Log-in
Register
Home
▼
:
Wiki Index
Document Index
User Index
»
Space:
3. Modeling Guide
▼
:
Document Index
»
Page:
Design Patterns
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to the CB-NL Wiki
»
Modeling Guide
»
Design Patterns
Wiki source code of
Design Patterns
Last modified by
Lieke Verhelst
on 2015/01/08 08:39
Content
·
Comments
(2)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: This page contains descriptions of design patterns for the CB-NL ontology. A design pattern is a piece of RDF code (in Turtle serialisation) that represents a particular part of the CB-NL. 2: 3: 4: 5: = The CB-NL ontology = 6: 7: The CB-NL ontology statements contain important metadata of the ontology such as information about the version, information about imports 8: 9: //**example**~:// 10: 11: //cbnlcore~:// 12: // rdf:type owl:Ontology ;// 13: // rdfs:comment "some comment..."@nl-nl ;// 14: // owl:imports cbnltop: ;// 15: // owl:versionInfo "CBNL model prototype 11/8/2014"@nl-nl .// 16: 17: 18: = URL references = 19: 20: Namespace prefixes are used to abbreviate URL references. Instances in CB-NL, such as enumeration values, do not have a prefix. 21: 22: **example**: 23: 24: //@prefix cbnlcore: <http:~/~/ont.cbnl.org/cb/def/> .// 25: //@prefix cbnltop: <http:~/~/ont.cbnl.org/top/def/> .//\\ 26: 27: = Lists and Values = 28: 29: ((( 30: Values that belong to a list are described as subclasses of the abstract class EnumerationValue. 31: 32: **example** 33: //cbnlcore:Collection// 34: // a owl:Class ;// 35: // rdfs:subClassOf cbnlcore:EnumerationValue .// 36: 37: 38: 39: Restricted lists are restricted via owl:OneOf: 40: 41: **example**: 42: 43: //cbnlcore:Status// 44: 45: //owl:oneOf (<http:~/~/ont.cbnl.org/cb/id/status/Draft> // 46: // <http:~/~/ont.cbnl.org/cb/id/status/Checked>// 47: 48: // <http:~/~/ont.cbnl.org/cb/id/status/Approved>// 49: 50: // <http:~/~/ont.cbnl.org/cb/id/status/Invalid>// 51: 52: // <http:~/~/ont.cbnl.org/cb/id/status/Transferred>) ;// 53: 54: 55: 56: The values themselves are individuals of these classes. CB-NL individuals are not saved in the same graph as the CB-NL ontology. They are stored in separate, per class graphs. 57: ))) 58: 59: //**example** **A: example instance of core:Status:**// 60: 61: //<http:~/~/ont.cbnl.org/cb/id/status/Draft>// 62: // rdf:type cbnlcore:Status ;// 63: // rdfs:label "Concept"@nl-nl , "Draft"@en-gb ;// 64: // dcterms:created "2014-8-11"~^~^xsd:date ;// 65: // dcterms:creator <http:~/~/ont.cbnl.org/cb/id/agent/CBNL> ;// 66: // dcterms:modified "2014-8-18"~^~^xsd:date ;// 67: // dcterms:rightsHolder// 68: // <http:~/~/ont.cbnl.org/cb/id/agent/CBNL> ;// 69: // skos:prefLabel "Draft"@en-gb , "Concept"@nl-nl .//\\ 70: 71: . 72: // // 73: 74: 75: //**example B, instance of dcterms:Agent :**// 76: 77: //<http:~/~/ont.cbnl.org/cb/id/agent/CBNL>// 78: // rdf:type dcterms:Agent ;// 79: // rdfs:label "CBNL"@nl-nl ;// 80: // dcterms:created "2014-8-11"~^~^xsd:date ;// 81: // dcterms:creator <http:~/~/ont.cbnl.org/cb/id/agent/CBNL> ;// 82: // dcterms:modified "2014-8-18"~^~^xsd:date ;// 83: // dcterms:rightsHolder// 84: // <http:~/~/ont.cbnl.org/cb/id/agent/CBNL> ;// 85: // skos:prefLabel "CBNL"@nl-nl .//\\ 86: 87: // // 88: 89: = CB-NL Concepts = 90: 91: CB-NL Concepts are classes that belong to a taxonomy tree. They must have the following qualifications: 92: 93: a) Properties are associated with classes by means of a subclass construction with a restriction. In CB-NL these property constructions define the semantic difference between the superclass and subclass. 94: 95: //example~:// 96: 97: //A Brug has the properties "application water" and "function overbruggen"// 98: 99: //A VasteBrug is different from a Brug because it has the properties "appearance vast" and "application doorlaathoogte" that are discriminating it from Brug//. 100: 101: 102: b) subclasses obtain properties from all of their superclasses 103: 104: A VasteBrug has properties from Bridge : //"application water" , "function overbruggen"// //, //and from itself// "appearance vast" and "application doorlaathoogte"// 105: 106: 107: c) because of b) sets of instances that are described by the subclass have properties from the superclasses above 108: 109: A VasteBrug is a Thing that has //"application water" , "function overbruggen"// //, "appearance vast" and "application doorlaathoogte"// . 110: 111: 112: The rdfs:subClassOf owl:Restriction pattern (bold face) takes care of all the above. Must be defined per property: 113: 114: 115: //cbnlcore:Brug// 116: // a owl:Class ;// 117: // ** rdfs:subClassOf**// 118: //** [ a owl:Restriction ;**// 119: //** owl:onProperty core:hasApplication ;**// 120: //** owl:someValuesFrom core:Water**// 121: //** ] ;**// 122: 123: 124: 125: This same pattern adds the following meaning to the class Brug: **//A Brug is anything that has one or more applications and at least one application is of type Water//** 126: 127: This represents a discriminating statement that separates the subclass Brug from the superclass PhysicalObject. 128: 129: = = 130: 131: = Collections = 132: 133: Collections are used to group concepts. Collections are not inherited. They are bound to a Concept class via the dcterms:subject owl:AnnotationProperty 134: 135: //**example**~:// 136: 137: //core:Brug dcterms:subject <http:~/~/ont.cbnl.org/cb/id/collection/Kunstwerk> ;//