OWL Representing Information Using the Web Ontology Language.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

The Semantic Web – WEEK 4: RDF
1 RDF Tutorial. C. Abela RDF Tutorial2 What is RDF? RDF stands for Resource Description Framework It is used for describing resources on the web Makes.
RDF formats for Linked Data by Mabi Harandi. RDF is not a format, it is a model for data So: It will provide supports for different formats like :  Turtle.
Chapter 3 RDF Syntax 1. Topics Basic concepts of RDF resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals and Qnames.
Dr. Alexandra I. Cristea RDF.
RDF Kitty Turner. Current Situation there is hardly any metadata on the Web search engine sites do the equivalent of going through a library, reading.
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
The RDF meta model: a closer look Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations.
Master Informatique 1 Semantic Technologies Part 3RDF/XML: Encoding RDF into XML Werner Nutt.
Resource Description Framework (RDF) Lecture # 6 Faculty of Computer Science, IBA.
Metadata Standards and Applications 4. Metadata Syntaxes and Containers.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
RDF: Concepts and Abstract Syntax W3C Recommendation 10 February Michael Felderer Digital Enterprise.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
Practical RDF Chapter 1. RDF: An Introduction
Neminath Simmachandran
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
The Semantic Web Service Shuying Wang Outline Semantic Web vision Core technologies XML, RDF, Ontology, Agent… Web services DAML-S.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Logics for Data and Knowledge Representation
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
Cornell CS 502 More XML XHTML, namespaces, DTDs CS 502 – Carl Lagoze – Cornell University.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
Chapter 9. 9 RDFS (RDF Schema) RDFS Part of the Ontological Primitive layer Adds features to RDF Provides standard vocabulary for describing concepts.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
The RDF/XML Serialization RDF statements can be written in RDF/XML very much like descriptions in non-RDF XML XML is increasingly used in all kinds of.
OWL Representing Information Using the Web Ontology Language 1.
New Perspectives on XML, 2nd Edition
Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter.
RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections.
An OO schema language for XML SOX W3C Note 30 July 1999.
More XML namespaces, DTDs CS 431 – Carl Lagoze – Cornell University.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
Semantic Web Exam 1 Review.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
Introduction to the Semantic Web and Linked Data Module 1 - Unit 2 The Semantic Web and Linked Data Concepts 1-1 Library of Congress BIBFRAME Pilot Training.
Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Working with XML Schemas ©NIITeXtensible Markup Language/Lesson 3/Slide 1 of 36 Objectives In this lesson, you will learn to: * Declare attributes in an.
The RDF meta model Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations of XML compared.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Metadata : an overview XML and Educational Metadata, SBU, London, 10 July 2001 Pete Johnston UKOLN, University of Bath Bath, BA2 7AY UKOLN is supported.
Practical RDF Ch.4 Specialized RDF Relationships: Reification, Containers, and Collections Kim, Jong-Nam SNU OOPSLA Lab. August 12, 2004.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
Representing Data with XML February 26, 2004 Neal Arthorne.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lotzi Bölöni.
Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.
Motivation Dynamically identify and understand information sources Provide interoperability between agents in a semantic manner Enable distributed extensible.
Knowledge Technologies Manolis Koubarakis 1 Some Other Useful Features of RDF.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
Other RDF Capabilities. Exercise: Write the following information into a set of statements (triples) and then draw them into and RDF graph The article.
Linked Data & Semantic Web Technology The Semantic Web Part 5. Resource Description Framework (2) Dr. Myungjin Lee.
Semantic Web In Depth Resource Description Framework Dr Nicholas Gibbins –
8.3.7 Compound Property Values Property values can be ▫Literals ▫Resource ▫Container ▫Collection, or… ▫Compound Value Compound Value ▫Has multiple value.
Linked Data & Semantic Web Technology The Semantic Web Part 4. Resource Description Framework (1) Dr. Myungjin Lee.
Chapter Describing Individuals OWL Individuals ▫Ontological Primitive Layer  Mostly described with RDF ▫Instances of user-defined ontological.
Resource Description Framework
XML QUESTIONS AND ANSWERS
WebDAV Design Overview
Resource Description Framework (RDF)
New Perspectives on XML
Presentation transcript:

OWL Representing Information Using the Web Ontology Language

Section 2

Chapter 5: URIs and Namespaces ▫Absolute URIs, URI references, namespaces, & base URIs Chapter 6: XML ▫eXtensible Markup Language & XML Schema datatypes Chapter 7: RDF ▫Resource Description Format features & data model Chapter 8: RDF/XML ▫Using XML w/ RDF & creating RDF/XML statements Chapter 9: RDFS ▫RDF Schema: features, classes, individuals Chapter 10: OWL Language ▫Introduces OWL in its three species

Chapter 5

5 URIs and Namespaces Symbol/Reference Layer ▫Lowest layer ▫Naming & referencing representation constructs Uniform Resource Identifiers ▫Absolute URIs ▫URI references XML ▫Namespaces ▫Base URIs

5.1 Absolute URIs Uniform Resource Identifiers (URIs) ▫Enable the web by providing a naming scheme ▫String of characters that  Identifies a resource (abstract or physical)  Conforms to a particular syntax ▫RFC2396: ▫Classified as  Absolute  Relative ▫Treated like logical constants ▫Do not have to be resolvable to network resources

5.1 Absolute URIs cont’d Absolute URIs ▫Independent of context in which they are found ▫Syntax  URISchemeName:schemeSpecificPart   isbn:  soap:// ▫Uniform, extensible, simple ▫Unambiguously specify a name for a resource URLs (Uniform Resource Locator) ▫Specifies network protocol as scheme ▫Identify documents or document network resources URNs (Uniform Resource Names) ▫Globally unique and persistent identifiers

5.1 Absolute URIs cont’d URI Schemes ▫Standard way to interpret scheme-specific portion ▫Managed by Internet Assigned Numbers Authority ▫http, ftp, mailto, mid, tag, nfs, news… Creation & use of URIs not controlled Typical (but not required) URI style guidelines ▫Begin with company domain name ▫Use URLs that resolve to resources or documentation ▫Include version (date) information in URIs 

5.2 URI References Absolute URIs long and cumbersome URI references (URIrefs) ▫Specifies a resource or portion of a resource ▫String of characters  Relative or absolute  Optional fragment identifier suffix  Follows fragment separator character “#”  Identifies portion of the resource  Relative URIs resolve to absolute URIs using  Base URI of containing document  Characters before fragment separator, if applicable ▫4 forms

5.2 URI References Form 1: Full URIref with fragment ▫ Form 2: Full URIref without fragment (absolute URI) ▫ Form 3: Relative URIref with fragment ▫relativeURI#fragment ▫food-ont#pizza Form 4: Relative URIref without fragment ▫food-ont Special case of Form 3: fragment without URIref ▫#pizza

5.3 XML Namespaces (xmlns) XML Namespaces ▫Disambiguate duplicate element names ▫Associate namespaces with URIrefs ▫Enable shorthand (alias) reference prefixes to specify qualified names (QNames) ▫ ▫Can go anywhere in an XML file  Recommended location: tag

5.3 XML Namespaces cont’d Syntax ▫xmlns:namespacePrefix="nsURIref" ▫URIrefs often end with # to avoid repeating it ▫If colon & namespacePrefix omitted, default namespace assumed (1 per file) Example namespace declaration ▫ ▫"rest:pie" → " Example default namespace declaration ▫ ▫"#pie" → "

5.3 XML Namespaces cont’d Qualified Names (QNames) ▫Abbreviate element tag names & attribute names ▫Cannot be used for attribute values ▫Syntax  namespacePrefix:tagName  menu:dessert ▫Prevent local tag name collisions Namespace recommended guideline ▫Use URL of an associated file as a namespace URI

5.4 Specifying Base URI (xml:base) Normally, a relative URIref is resolved using URL of its containing file Can change the base using xml:base ▫Syntax: xml:base = "baseURI" ▫ Uses ▫File replicated on multiple sites, but URIrefs must be consistent ▫Group related items ▫Ensure that URIrefs remain valid when file renamed

5.5 URIs and Namespace Summary URIs identify and name resources Absolute URIs are fully-specified names URIrefs can ▫Be relative (not fully-specified) ▫Specify components with fragments Namespaces prevent name collisions xml:base specifies base for relative URIrefs URIs and namespaces referenced in XML statements

Chapter 6

6 XML eXtensible Markup Language ▫Standardized format for serializing and exchanging information ▫Well-defined encoding of data with arbitrary structure XML Schema ▫OWL uses XMLS datatypes OWL does not require XML ▫But it provides a common, efficient mechanism for expressing OWL constructs

6.1 XML Overview XML ▫Tag-based metalanguage used to define domain- specific grammars ▫Serializes tree-based data into linear text format ▫W3c standard ▫Simplified version of SGML  Standard Generalized Markup Language

6.1 XML Overview cont’d De facto standard for interchanging structured data on the web Parsers and translators widely available and high-quality xmlhttp:// xml Key Lime Pie $2.75 Apple Pie $2.50

6.1.1 XML Features Structured syntax Widely adopted and supported Consistent & parseable Verbose & ugly, but human-readable Vendor-neutral Large community of developers

6.1.2 Syntax and Structure Markup tags delimit ▫Elements ▫Attributes ▫Content content ▫EAC memory aid – Estimate at Complete, EACH Tags can be nested Each tag ▫Is a node in tree-structured data model ▫Can include attributes with values and content

6.1.3 XML Declaration Optional but recommended Used at beginning of XML document Include version and encoding attributes Also recommended: ▫Containing file should have.xml suffix

6.1.4 Elements Define tree structure Indicated by tag names in angled brackets <> Content terminated by matching end tag with “/” before tag name If no content, can self-close: Tags label content & give meaning for humans No semantics can be inferred from tags alone Qnames can be used as element names

6.1.5 Element Attributes Occur within a start tag or self-closing tag Name and value occur after tag name Provide information about the element Best used for metadata (e.g. units), not content Syntax ▫ Example ▫ 2.5

Specifying Content Language xml:lang attribute ▫Specifies language of element’s content ▫Can be specified at various levels in document ▫Applies to content within portion of document ▫ Syntax ▫xml:lang="languageIdentifier" Example ▫ chicken ▫ pollo Values usually 2-letter codes from ISO-639, extended with dialiects ("en-US" for US English)

XML Syntax Approaches Element-centric (preferred) ▫ keyLimePie $2.75 Attribute-centric ▫ Element-centric preferable because it’s parseable and can be further subdivided Use attributes for metadata

XML Entities Mechanism for abbreviating references to URIs Useful in OWL documents for abbreviating URIref prefixes in attribute values (QNames can’t be used) Syntax ▫ Declare at beginning of document in DOCTYPE ▫ ]> Example of use ▫

Simple Annotated Example ]> Virtual Library A cool place. !-- is Comment (no /) Default base rather than filename. ! Is instructive (no /) !Entity defines URI macro in scope of rdf:RDF Href resolves to: b

6.2 XML Schema Datatypes XML Schema (XMLS) ▫Documents XML structure, replacing DTDs ▫Define datatype features OWL uses XMLS datatypes ▫ ▫ Defines primitive (string, decimal, float) & derived (integer sub-ranges) types Restrict values and associate representations with values

6.2.1 User Defined Datatypes Restrict numSlices datatype as integer from 1..8

6.2.2 Built-in OWL Datatypes Datatype CategoryDatatype Stringsxsd:string xsd:normalizedString xsd:token xsd:language xsd:NMTOKEN xsd:Name xsd:NCName Binaryxsd:hexBinary xsd:base64Binary Date/Time-relatedxsd:dateTime xsd:time xsd:date xsd:gYearMonth xsd:gYear xsd:gMonthDay xsd:gDay xsd:gMonth Booleanxsd:boolean Numericalxsd:decimal xsd:float xsd:double Decimal-derivedxsd:integer xsd:nonNegativeInteger xsd:positiveInteger xsd:nonPositiveInteger xsd:negativeInteger xsd:long xsd:int xsd:short xsd:byte xsd:unsignedLong xsd:unsignedInt xsd:unsignedShort xsd:unsignedByte Resourcexsd:anyURI

6.2.2 Built-in OWL Datatypes cont’d

6.3 XML Summary XML ▫Standard metalanguage ▫Used to define  Custom tag sets  Interchange formats for exchanging information ▫Used by OWL as a serialization syntax XMLS ▫Provides standard datatype definitions used by OWL

6.4 Why XML is not Enough XML ▫Defines syntax, not semantics ▫Tag names  Meaningful to humans  Meaningless to parsing software ▫XMLS and DTDs  Define format, not relationships between resources ▫Can be ambiguous RDF overcomes many of these limitations

Chapter 7

7 RDF Resource Description Format ▫W3C recommendation ▫Assert values of properties associated with web resources ▫With RDF/XML, forms Basic Relational Language Layer ▫Specifies OWL instances Overview of ▫Features ▫Data Model

7.1 RDF Overview RDF ▫Mechanism to make statements about resources  Resource: anything named with a URIref  Statements: describe Resources using attribute/value pairs ▫New but mature technology ▫Developed by W3C’s RDF Core Working Group ▫Influenced by metadata and knowledge representation principles

7.1.1 Metadata Initial purpose of RDF: encode metadata Metadata ▫Overused term with multiple interpretations ▫“Document-level”: “Dublin Core” specification ▫“Tagging”: All XML element tags are metadata

7.1.2 RDF Purpose Purposes of RDF ▫Provide standard framework for making statements about resources and their attributes ▫Describe the semantics of data ▫Publish database contents on the web

7.3 RDF Specification RDF Concepts and Abstract Syntax ▫ RDF Semantics ▫ RDF Primer ▫ RDF Test Cases ▫

7.2 RDF Features RDF Statements ▫Sets of triples  (Subject, Verb, Object) ▫Uniform, formal, standard, flexible ▫Can describe any domain ▫Distributed on servers like HTML content ▫Combined to create large virtual knowledgebase ▫Enable new capabilities, such as querying and inferencing

7.3 RDF Data Model Simple and syntax-independent Includes ▫Resources ▫Properties ▫Literals ▫Statements Also specifies a graphical representation method, but not really useful

7.3.1 Resources Key building block Usually nouns Anything associated with a URIref Examples: ▫ ▫#JoeSmith ▫location123 Can be physical or virtual

7.3.1 Properties Resource that serves as a predicate in statements to describe another resource Describe a binary relationship between a subject resource and a value Similar to methods in OOP, but Unlike OOP methods which are bound to classes, Properties are “first-class” objects with URI names

7.3.2 Literals RDF literals ▫Text strings (plain literals) with optional  Language identifiers  Datatype identifiers (typed literal) ▫Atomic datatype Examples ▫Plain literals  “$3.45”, “Knight Owl Restaurant”, “123 Main Street” ▫Typed literals  xsd:time^^06:00:00, xsd:integer^^6

Statement TypeSubjectPredicateObject Literal valued statementResourcePropertyLiteral data value Resource valued statementResourcePropertyResource Statements RDF statement “triples” provide ▫A subject resource ▫A predicate (named property) ▫An object (literal data value or resource value) Forms Examples ▫(KeyLimePie, price, “$2.75”) ▫(Person345, favoritePie, KeyLimePie)

7.4 RDF Summary RDF ▫Framework for describing resources ▫Data model includes  Resources  Properties  Statements  Literals ▫Expresses simple statements about subject resources ▫Foundational support technology in OWL

7.5 Why RDF is not enough RDF is only a content data model ▫Does not specify a serialization format Can only express simple statements about resources ▫Ontologies need to express complex semantic relationships between resources

Chapter 8

8 RDF/XML Standard XML syntax used to serialize the RDF data model ▫Easy for humans to read ▫Software support Other alternatives ▫N-Triples, N3 Supports basic relational language layer Chapter ▫Overview of RDF/XML ▫Describe syntax features ▫Describe serialization

8.1 RDF/XML Overview Standard linear notation for ▫Serializing the RDF model ▫Exchanging RDF statements Specifies ▫Full serialization syntax ▫Abbreviated syntax Uses ▫XML namespaces ▫URIs ▫Properties ▫Values

8.1.1 Relation to XML RDF/XML ▫XML syntax for serializing RDF statements ▫Overcomes ambiguity ▫Makes assertions using XML format & transport

8.1.2 RDF/XML Specifications RDF/XML Specification ▫ Mime type & namespace ▫Indication to software how to interpret a file ▫Recommended namespace prefix: rdf ▫Namespace:  ▫Mime type:  application/rdf+xml

8.2 RDF Syntax Features (Using XML) RDF/XML ▫Standardized syntax ▫Benefits from XML features ▫Large installed base of tools & professionals ▫Leverages investments in tools and people ▫Benefits from XML’s tagging, namespaces, parsers, and APIs

8.3 RDF/XML Documents RDF/XML documents contain ▫A header ▫A series of RDF statement assertions  Provided as rdf:Description XML elements

8.3.1 File Header (rdf:RDF) RDF/XML headers contain ▫XML declaration ▫RDF element ▫Namespace declaration rdf:RDF element ▫Indicates its contents must be interpreted as RDF ▫All RDF content should be contained in it ▫Best practice: only one rdf:RDF per file Example start tag ▫

8.3.2 Resource Names RDF resources ▫Named with case-sensitive symbol names ▫Best practice: use “Lower CamelCase”  firstCourse, menuDish, ownedBy URIrefs provide identifiers for RDF resources Resources can be ▫Statement subjects ▫Predicates ▫Objects

8.3.3 RDF Statements (rdf:Description) rdf:Description element ▫Serializes a single RDF statement ▫“Description” about a resource ▫Contains property/value pairs ▫Subject is attribute of rdf:Description element  Identified by  rdf:ID attribute, if it’s a new resource  rdf:about attribute, if it was previously declared ▫Properties are contained elements ▫Property values either  Content inside property tags or  Attributes of property tags

8.3.3 RDF/XML Statements cont’d Statements can serve as predicates (i.e. nesting) ▫Same as giving statement an rdf:ID and referencing in a resource attribute ▫Best practice: give it an ID so it can be reused ▫Alternating subjects & predicates called striping Multiple property/value pairs can be contained within the same rdf:Description element Subject resource can be new or existing Property values can be ▫Literal ▫Existing individual resource ▫Container resource ▫Collection resource

8.3.3 RDF/XML Statements cont’d Subject Object Value Type LiteralExisting Resource Container Resource Collection Resource New Resource Form 1Form 2Form 3Form 4 Existing Resource Form 5Form 6Form 7Form 8 Forms 1-4 define new resources Forms 5-8 describe existing resources

<rdf:RDF xmlns:rdf=" xmlns:dc=" xmlns:exterms=" August 16, 1999 en Example XML and Graph RDF entity started, namespaces defined Subject with multiple predicates.

Creating a Subject rdf:ID attribute of rdf:Description element ▫Creates a new resource referenced by its identifier ▫Statement forms 1-4 Syntax ▫ Example ▫ (Form 1) Full URI for resource is concatenation ▫base URI + "#" + value of rdf:ID attribute Can then be referenced as relative URIref in rdf:about attributes

Describing a Subject rdf:about attribute of rdf:Description element ▫Describes an existing resource by its identifier ▫Statement forms 5-8 ▫Extends definition of resources in another part of the ontology or in a different ontology Syntax ▫ propertyValue Example ▫ Key Lime Pie

8.3.5 Describing a Property RDF/XML properties ▫Are specified with URIrefs ▫Are specified as elements within rdf:Description elements ▫Should be named using lowerCamelCase

8.3.6 Describing a Property Value RDF subjects have multiple properties Each property is associated to a value Property values can be ▫A literal ▫A singular existing resource ▫A container resource ▫A collection resource

Literal Property Values Literals can be objects of statements ▫Forms 1 & 5 Literals cannot be subjects of statements

Plain Literal Parse Type A plain literal is ▫Untyped string with ▫Optional language identifier rdf:parseType=“Literal” attribute tells parsers to treat contents as literal rather than RDF/XML ▫Used to encode XML content as property value Syntax ▫ xmlContent Enables embedding XML without confusing parser

Typed Literals RDF typed literals are character string values with an associated datatype ▫Type specified using rdf:datatype attribute ▫Normally associated with an XML Schema datatype ▫Literal should be consistent with specified type Syntax ▫ literalValue Example ▫ 22:00:00 Best practice: stick with XMLS datatypes for literals

RDF Types rdf:type property ▫Equivalent to declaring the “class” of the resource ▫Represents a set to which the resource belongs ▫Asserts that an individual has all characteristics of the specified type ▫Supports “instance-of” relationships between resources & classes Individuals can belong to multiple types (classes) Syntax ▫ Example ▫ Alternate “typed node” syntax

RDF Types: Typed Nodes Typed node syntax ▫Shorthand notation for declaring that an individual is a member of a class ▫Uses the class’s QName as the tag name instead of rdf:Description with rdf:type property ▫Semantically the same; easier for humans to read, but interpreted identically by software Individuals in >1 class can only use typed node one time Syntax ▫ Example (multi-class): “Rice is a starch and a side dish” ▫

Existing Individual Resource rdf:resource attribute ▫Specifies that the already existing resource is the value of the property ▫Used in forms 2 & 6 Syntax ▫ Example: “Pizzaria 312 reports to Pizzaria 314” ▫

<rdf:RDF xmlns:rdf=" xmlns:dc=" xmlns:exterms=" August 16, 1999 en Example XML and Graph

Example as Separate Statements <rdf:RDF xmlns:rdf=" xmlns:dc=" xmlns:exterms=" August 16, 1999 en

Container Resource Normally, property value is 1 item (one-to-one) Can specify group of items as property value ▫Forms 3 & 7 ▫RDF “containers” used to treat group as 1 item 3 types of RDF containers ▫Bags ▫Sequences ▫Alternatives All container types treated the same semantically by RDF and OWL! ▫But types convey more information to developers

Container Properties No formal rules for interpreting container types ▫Not like defining a data structure; more like defining an enumerated list ▫Resources can occur in containers > 1 time ▫Containers can contain themselves! ▫“Open-ended”: no way to specify that no additional items can be added! Two types of container membership properties ▫Numbered properties (rdf:_n) ▫List properties (rdf:li)

Numbered Properties rdf:_n, where n is the index of the item ▫n must be a positive integer with no leading zeroes ▫Used to define/access the item at the nth position Syntax ▫ Example ▫

List Item Properties rdf:li property ▫Alternative to numbered properties ▫Automatically generates numbered properties ▫Replaced by parser with appropriate rdf:_n tag Syntax ▫ Example ▫

Unordered Container rdf:Bag class ▫Defines containers where order has no meaning ▫May contain resources and/or literals ▫May contain duplicate members Syntax ▫ Example: “Tonight’s pies are cherry & apple” ▫

<rdf:RDF xmlns:rdf=" xmlns:s=" Example XML and Graph

Ordered Container rdf:Seq class ▫Defines containers representing ordered lists ▫May contain resources and/or literals ▫May contain duplicate members Syntax ▫ Example: “Courses in a 3 course meal” ▫

Alternatives Container rdf:Alt class ▫Defines lists of alternatives (resources or literals) where any one item is a valid selection ▫The first item in the list is the default selection  So there must always be at least one item in the list Syntax ▫ Example ▫

RDF Container Summary Container TypeNotes Bag (rdf:Bag)Collection of resources or literals such that the order of contained items is not significant Sequence (rdf:Seq)Collection of resources or literals such that the order of contained items is significant Alternatives (rdf:Alt)Collection of equally valid option items with the intent of selecting just one; at least one item must exist in the container, and the 1 st item in the container is the default selected value

RDF Collections rdfParseType=“Collection” attribute ▫Alternative to containers ▫Represent fixed finite list of items (closed set)  Once specified, items cannot be added ▫Forms 4 & 8 Syntax ▫ collectedContents Example ▫

RDF Collections cont’d rdf:List ▫Predefined collection class ▫rdf:first  First item in sub-list (“car”) ▫rdf:rest  Rest of sub-list (“cdr”)  End list with &rdf;nil Example ▫

& 3 rdf:first & rdf:rest rdf:first property ▫Represents the first item in a list or sub-list ▫Value must be a resource ▫Syntax  rdf:rest property ▫Represents the remaining items in a list or sub-list ▫Value is either another List or “&rdf:nil” indicating the end of the list ▫Syntax  or  …

<rdf:RDF xmlns:rdf=" xmlns:s=" Example XML and Graph

Additional Examples Additional Examples at RDF Primer ▫Especially Sections 1-5 ▫