80 likes | 182 Views
OWL Lite off Textbook Ch. 11: Encoding. Atilla Elçi. OWL Ontology File Structure. Header: XML Declaration & RDF Start Tag Ontology Element Version Info Imports Element Body: Class, property, and inidividual statements Footer: RDF End Tag. OWL Header.
E N D
OWL Lite off TextbookCh. 11: Encoding Atilla Elçi CmpE 583 Fall 2006
OWL Ontology File Structure • Header: • XML Declaration & RDF Start Tag • Ontology Element • Version Info • Imports Element • Body: • Class, property, and inidividual statements • Footer: • RDF End Tag. CmpE 583 Fall 2006
OWL Header XML Declaration (?xml) & RDF Start Tag (rdf:RDF): <?xml version=“1.0” encoding=“UTF-8” ?> <rdf:RDF namespaceDeclarations> Three kinds of namespace references are declared: • Standard: xmlns:ns=“URI”. Replace ns & URI with: • XMLS: xsd & http://www.w3.org/2001/XMLSchema# • RDF: rdf & http://www.w3.org/1999/02/22-rdf-syntax-ns# • RDFS: rdfs & http://www.w3.org/2000/01/rdf-schema# • OWL: owl & http://www.w3.org/2002/07/owl# • Imported namespace to use concepts or extend: xmlns:teach=“http://cmpe.emu.edu.tr/aelci/teaching#” Still required to include an “imports” element in the document! • Default / Base (current document) namespace: • xmlns=“http://cmpe.emu.edu.tr/aelci/references#” • xml:base=“http://cmpe.emu.edu.tr/aelci/cmpe583” CmpE 583 Fall 2006
OWL Header(Continued) Ontology Element (owl:Ontology): provides ontology level metadata on the ontology being defined. • <owl:Ontology rdf:about=“URI”> where “URI” is either: • “”: current document, or • “ontologyNameOrReference”: a fully resolved URI. • For example: <owl:Ontology rdf:about=“”> <rdfs:label>A Text as Label</rdfs:label> <rdfs:comment>A text as comment</rdfs:comment> </owl:Ontology> • Version properties may as well be included with the owl:Ontology Element: <owl:Ontology rdf:about=“”> <version-element>Version info</version-element> </owl:Ontology> CmpE 583 Fall 2006
OWL Header(Continued) Versioning Information Properties: • owl:versionInfo element: include a string in the inner text or RCS/CVS keywords • RCS/CVS (revision control/current versions) keywords, such as: <owl:versionInfo>$Id: daml+oil.daml,v 1.1 2001/01/18 15:40:52 timbl Exp $</owl:versionInfo> • owl:priorVersion: to relate current ontology to an earlier version <owl:priorVersion rdf:Resource=“URI of earlier version”/> • owl:backwardCompatibleWith: same format as owl:priorInfo • owl:incompatibleWith: ditto. • owl:DeprecatedClass: identifies a class that is to be removed • owl:DeprecatedProperty: identifies a property ... • The last two elements are placed not in the owl:Ontology element! Format is: <owl:DeprecatedClass rdf:about=“#DefunctClass”> ...</owl:Depre... CmpE 583 Fall 2006
OWL Header(Continued) Importing Ontologies (owl:imports): used in order to reference and extend an external ontology. <owl:imports rdf:resource="http://www.w3.org/2000/01/rdf-schema"/> Contrasting Namespace Declaration & Imports: • Namespace decl identifies a prefix abbreviation, owl:imports does not! • So, include a namespace declaration for an imported ontology as well. • Importing has similar effect as inhereting a class, say in Java. CmpE 583 Fall 2006
OWL Body & Footer • Body: • Contains class and property statements. • Order (sequence) is NOT meaningful! • So, forward references are OK. • Footer: </rdf:RDF> CmpE 583 Fall 2006