OWL Lite off Textbook Ch. 11: Encoding

7
06 Dec. 2006 Rev'd 07 Dec. 2006 CmpE 583 Fall 2006 OWL Lite 1 OWL Lite off Textbook Ch. 11: Encoding Atilla Elçi

description

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. - PowerPoint PPT Presentation

Transcript of OWL Lite off Textbook Ch. 11: Encoding

Page 1: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 1

OWL Lite off TextbookCh. 11: Encoding

Atilla Elçi

Page 2: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 2

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.

Page 3: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 3

OWL HeaderXML Declaration (?xml) & RDF Start Tag (rdf:RDF):

<?xml version=“1.0” encoding=“UTF-8” ?><rdf:RDF namespaceDeclarations>

Three kinds of namespace references are declared:1. 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#

2. 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!

3. Default / Base (current document) namespace:• xmlns=“http://cmpe.emu.edu.tr/aelci/references#”• xml:base=“http://cmpe.emu.edu.tr/aelci/cmpe583”

Page 4: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 4

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>

Page 5: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 5

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...

Page 6: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 6

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.

Page 7: OWL Lite off Textbook Ch. 11: Encoding

06 Dec. 2006 Rev'd 07 Dec. 2006

CmpE 583 Fall 2006 OWL Lite 7

OWL Body & Footer

• Body:– Contains class and property statements.– Order (sequence) is NOT meaningful!– So, forward references are OK.

• Footer:

</rdf:RDF>