XML Metadata RDF and DC Dublin Core Instructors
XML Metadata: RDF and DC (Dublin Core) Instructors: Geoffrey Fox and Bryan Carpenter Dept. of Computer Science School of Computational Science and Information Technology 400 Dirac Science Library Florida State University Tallahassee Florida 32306 -4120 http: //www. csit. fsu. edu 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 1
Basic Principles • We describe the use of XML to specify Metadata – data about data • Metadata can also be thought of as “overall properties” of an entity • Example: Author is part of Metadata for Books or Computer Programs • Example: Capacity of Football stadium could be key part of metadata for universities • We describe a general framework -- RDF (Resource Description Framework) for making assertions about metadata • We describe a particular example – DC (Dublin Core) of metadata about bibliographic material – books, web pages etc. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 2
References on RDF • There are two W 3 C documents about RDF which are quite hard to read • RDF Model and Syntax: http: //www. w 3. org/TR/REC-rdf-syntax/ – Defines basic ideas for any metadata vocabulary • RDF Schema http: //www. w 3. org/TR/2000/CR-rdf-schema 20000327/ – Describes general structure of a metadata vocabulary • One of the earliest users of RDF was Netscape in their Mozilla (Netscape 6) activity http: //www. mozilla. org/rdf/doc/ where they use RDF to describe user specific information about browser – actually this describes trees in areas of bookmarks and email as RDF naturally defines general graphs – I found this short discussion an interesting comment on a non metadata application of RDF 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 3
RDF Statements Subject Predicate Object • The essence of RDF is a statement which has a subject and predicate and an object • The “subject” has the property “predicate” with value “object” • The Web Page has the title “RDF Model and Syntax” • Mary had a husband called John • Statements can specify metadata but more generally any facts expressible in this way • One can associate multiple objects with a subject and so build up a general node of a tree with parent as subject and objects as children. Thus RDF can define a general tree fragment as shown on next foil 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 4
RDF Tree Fragment Class General Same Predicate: Student Subject Agatha Same or Different Predicates Objec t Henry email Objec t Fred@jim Different Predicates Fred Nick name Freddie grade B- Specific Objec t 9/10/2020 Objec t it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 5
RDF Building Concepts • Resource: Any identifiable object – must have a URI of style begin: //rootlabel/nextlabel/…. /lastlabel – This URI could be a Web address but anything of “approved format” is allowed – each person could start their own personal: //Country/SSNor. Equivalent/Classify/How/you/want/item – URI syntax is http: //www. isi. edu/in-notes/rfc 2396. txt • Property: A special resource of “type” property • Object: Either a resource or a literal – a literal is something like a text or even XML string. • Example: take a case with Property as Name. This Name could have a URI coming from Dublin Core Schema URI and Name’s definition therein. So Name is indeed a Resource • Then the object could either be literal “Geoffrey Fox” or resource given by my home page http: //www. newnpac. org/users/fox/homepage/ 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 6
• • An Example of RDF and Dublin Core <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: dc="http: //purl. org/metadata/dublin_core#"> <rdf: Description about="http: //www. dlib. org"> <dc: Title>D-Lib Program - Research in Digital Libraries</dc: Title> <dc: Description>The D-Lib program supports the community of people with research interests in digital libraries and electronic publishing. </dc: Description> <dc: Publisher>Corporation For National Research Initiatives</dc: Publisher> <dc: Date>1995 -01 -07</dc: Date> <dc: Subject> – <rdf: Bag> <rdf: li>Research; statistical methods</rdf: li> <rdf: li>Education, research, related topics</rdf: li> <rdf: li>Library use Studies</rdf: li> </rdf: Bag> </dc: Subject> <dc: Type>World Wide Web Home Page</dc: Type> <dc: Format>text/html</dc: Format> <dc: Language>en</dc: Language> </rdf: Description> </rdf: RDF> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 7
Comments on Example • We define the RDF and DC (Dublin Core) Namespaces • We define resource http: //www. dlib. org with <rdf: Description about=“. We want to add DC metadata describing this web page • We see Dublin Core metadata Title, Description, Publisher, Date, Subject, Type, format, Language • We see use of RDF Bag syntax to specify 3 separate “subject” values • Note that RDF provides the overall framework with the description tag mapping a resource (http: //www. dlib. org) to a set of properties • The properties are defined in a completely different namespace – the Dublin Core • RDF provides useful expressivity with a “collection” syntax of which bag (unordered collection) is one example 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 8
RDF Schema • This sets up a framework like the Java (and other languages) to define classes and other features of Resources that enable one to talk about Resources as Instances of classes • Below rounded rectangles represents a class of resources • The outermost rectangle is the set of all resources i. e. all “objects” • Classes are themselves resources and 5 examples are given corresponding to four rounded rectangles and literals (which are not resources even though the literal class is a resource Literals are objects 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 9
RDF Basics • Now we go back and define basic RDF syntax in more detail • Consider the simple statement: • Ora Lassila is the creator of the resource http: //www. w 3. org/Home/Lassila. • Or “http: //www. w 3. org/Home/Lassila has creator Ora Lassila”. • Or in general "<subject> HAS <predicate> <object>". • Specified by <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila"> <s: Creator>Ora Lassila</s: Creator> </rdf: Description> </rdf: RDF> Subject Resource 9/10/2020 Predicate(property) it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 Object 10
Anonymous resources • We may wish to specify multiple properties which can do with a diagram like that here and with typical RDF syntax • <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila"> <s: Creator> <v: Name>Ora Lassila</v: Name> <v: Email>lassila@w 3. org</v: Email> • </s: Creator> </rdf: Description> </rdf: RDF> Anonymous Resource 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 11
Tree-like Syntax • <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila"> <s: Creator> <rdf: Description about="http: //www. w 3. org/staff. Id/85740"> <v: Name>Ora Lassila</v: Name> <v: Email>lassila@w 3. org</v: Email> </rdf: Description> </s: Creator> </rdf: Description> </rdf: RDF> • Here We give the anonymous resource a name such as “employee 85740” with a URI pointing to “employee database entry” 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 12
Abbreviations • We can put the predicate=“object” specification as an attribute. For our simplest case this gives: • <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila" s: Creator="Ora Lassila" /> </rdf: RDF> • We can abbreviate our last example: • <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila"> <s: Creator rdf: resource="http: //www. w 3. org/staff. Id/85740" v: Name="Ora Lassila" v: Email="lassila@w 3. org" /> </rdf: Description> </rdf: RDF> • These abbreviations both shorten the text and hide XML tags as attributes. This means that undesirable actions/errors by browsers that don’t know various namespaces are avoided 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 13
Example of a Bag I • We already have seen the Bag syntax illustrated. There are three collections in RDF: Bag, Seq and Alt. Lets look at Bag again • The students in course 6. 001 are Amy, Tim, John, Mary, and Sue. • This statement is represented graphically as shown. • One can represent it either using a syntax like HTML unordered lists or using explicit member references such as rdf: _1=" Amy” 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 14
Bag Collection II • This is most directly written • <rdf: RDF> <rdf: Description about="http: //mycollege. edu/courses/6. 001"> • <s: students> <rdf: Bag> • <rdf: li resource="http: //mycollege. edu/students/Amy"/> • <rdf: li resource="http: //mycollege. edu/students/Tim"/> • <rdf: li resource="http: //mycollege. edu/students/John"/> • <rdf: li resource="http: //mycollege. edu/students/Mary"/> • <rdf: li resource="http: //mycollege. edu/students/Sue"/> • </rdf: Bag> </s: students> • </rdf: Description> </rdf: RDF> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 15
Alternative Bag Syntax • <rdf: RDF> <rdf: Description about="http: //mycollege. edu/courses/6. 001"> • <s: students rdf: type=“http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#Bag” • rdf: _1=“http: //mycollege. edu/students/Amy” • rdf: _2="http: //mycollege. edu/students/Tim“ • rdf: _3="http: //mycollege. edu/students/John" • rdf: _4="http: //mycollege. edu/students/Mary" • rdf: _5="http: //mycollege. edu/students/Sue" • /> • </rdf: Description> </rdf: RDF> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 16
Alternative Bag Syntax • <rdf: RDF> <rdf: Description about="http: //mycollege. edu/courses/6. 001"> • <s: students rdf: type=“http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#Bag” • rdf: _1=“http: //mycollege. edu/students/Amy” • rdf: _2="http: //mycollege. edu/students/Tim“ • rdf: _3="http: //mycollege. edu/students/John" • rdf: _4="http: //mycollege. edu/students/Mary" • rdf: _5="http: //mycollege. edu/students/Sue" • /> • </rdf: Description> </rdf: RDF> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 17
The three basic Collections • Bag: (rdf: Bag) An unordered list of resources or literals. Bags are used to declare that a property has multiple values and that there is no significance to the order in which the values are given. Bag might be used to give a list of part numbers where the order of processing the parts does not matter. Duplicate values are permitted. • Sequence: (rdf: Seq) An ordered list of resources or literals. Sequence is used to declare that a property has multiple values and that the order of the values is significant. Sequence might be used, for example, to preserve an alphabetical ordering of values. Duplicate values are permitted. • Alternative: (rdf: Alt) A list of resources or literals that represent alternatives for the (single) value of a property. Alternative might be used to provide alternative language translations for the title of a work, or to provide a list of Internet mirror sites at which a resource might be found. An application using a property whose value is an Alternative collection is aware that it can choose any one of the items in the list as appropriate. Alt must have at least one member; the first member of Alt is default object. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 18
about and about. Each I • Let us define a collection with local name pages • <rdf: Bag ID="pages“ > <rdf: li resource="http: //foo. org/foo. html" /> <rdf: li resource="http: //bar. org/bar. html" /> </rdf: Bag> • Then we can define the creator of the Collection by: • <rdf: Description about="#pages"> <s: Creator>Ora Lassila</s: Creator> </rdf: Description> • Now this does not say anything about the creator of the individual resources in the bag • For this we need about. Each 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 19
about and about. Each II • <rdf: Description about. Each="#pages"> <s: Creator>Ora Lassila</s: Creator> </rdf: Description> • Is equivalent to two separate “about” descriptions – one for each member of the bag • <rdf: Description about="http: //foo. org/foo. html"> <s: Creator>Ora Lassila</s: Creator> </rdf: Description> <rdf: Description about="http: //bar. org/bar. html"> <s: Creator>Ora Lassila</s: Creator> </rdf: Description> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 20
about. Each. Prefix I • if the two resources http: //foo. org/doc/page 1 and http: //foo. org/doc/page 2 exist then: • <rdf: Description about. Each. Prefix="http: //foo. org/doc"> <s: Copyright>© 1998, The Foo Organization</s: Copyright> </rdf: Description> • Says that these two pages have the same copyright information – If billions of documents in this collection (i. e. with this prefix, then all are given this copyright metadata) • For two documents we can define this information in other ways given on next page 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 21
about. Each. Prefix II <rdf: Description about="http: //foo. org/doc/page 1"> <s: Copyright>© 1998, The Foo Organization</s: Copyright> </rdf: Description> <rdf: Description about="http: //foo. org/doc/page 2"> <s: Copyright>© 1998, The Foo Organization</s: Copyright> </rdf: Description> Or you could use Bag notation <rdf: Description about. Each=“#docpages"> <s: Copyright>© 1998, The Foo Organization</s: Copyright> </rdf: Description> <rdf: Bag ID="docpages"> – <rdf: li resource="http: //foo. org/doc/page 1"/> – <rdf: li resource="http: //foo. org/doc/page 2"/> • </rdf: Bag> • • • 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 22
<rdf: value <rdf: parse. Type <dcq Example • <rdf: Description about=“ http: //www. dlib. org/dlib/may 98/05 contents. html"> • …………. • <dc: Contributor rdf: parse. Type="Resource"> <dcq: Agent. Type rdf: resource="http: //purl. org/metadata/dublin_core_qualifiers#E ditor"/> • <rdf: value>Amy Friedlander</rdf: value> </dc: Contributor> • <dc: Relation rdf: parse. Type="Resource"> <dcq: Relation. Type rdf: resource="http: //purl. org/metadata/dublin_core_qualifiers#Is Part. Of"/> <rdf: value resource=“http: //www. dlib. org” /> </dc: Relation> • </rdf: Description> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 23
<rdf: value <rdf: parse. Type <dcq • <tag rdf: parse. Type=“. ” >Contents</tag> • Attribute rdf: parse. Type can either be “Literal” or “Resource” • If “Resource”, then Contents of this tag must “match the syntax of a rdf: description tag” and define a resource • If no XML tags in contents or rdf: parse. Type=“Literal”, then RDF processor will NOT process Contents • In previous page, we use rdf: value to specify a value and a qualification (dcq namespace for Dublin Core Qualifier) Relation. Type Relation Anonymous Resource rdf: value 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 24
rdf: parse. Type=“Literal” • Here is an example: • <dc: Title rdf: parse. Type="Literal“ > Ramifications of <apply> <power/> <apply> <plus/> <ci>a</ci> <ci>b</ci> </apply> <cn>2</cn> </apply> to World Peace </dc: Title> • Here the Math. ML text is NOT interpreted by RDF but considered as an XML string defining this resource 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 25
Mozilla RDF Tags http: //dmoz. org/rdf/tags. html 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 26
Mozilla Use of RDF This is edited to be small. See web page http: //dmoz. org/rdf/structure. example. txt 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 27
Dublin Core Elements I • Title: A name given to the resource. – Typically, a Title will be a name by which the resource is formally known. • Creator: An entity primarily responsible for making the content of the resource. – Examples of a Creator include a person, an organization, or a service. – Typically, the name of a Creator should be used to indicate the entity. • Subject: The topic of the content of the resource. – Typically, a Subject will be expressed as keywords, key phrases or classification codes that describe a topic of the resource. – Recommended best practice is to select a value from a controlled vocabulary or formal classification scheme. • Description: An account of the content of the resource. – Description may include but is not limited to: an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content. • Publisher: An entity responsible for making the resource available – Examples of a Publisher include a person, an organization, or a service. – Typically, the name of a Publisher should be used to indicate the entity. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 28
Dublin Core Elements II • Contributor: An entity responsible for making contributions to the content of the resource. – Examples of a Contributor include a person, an organization, or a service. – Typically, the name of a Contributor should be used to indicate the entity. • Date: A date associated with an event in the life cycle of the resource. – Typically, Date will be associated with the creation or availability of the resource. Recommended best practice for encoding the date value is defined in a profile of ISO 8601 and follows the YYYY-MM-DD format. • Format: The physical or digital manifestation of the resource. – Typically, Format may include the media-type or dimensions of the resource. – Format may be used to determine the software, hardware or other equipment needed to display or operate the resource. – Examples of dimensions include size and duration. – Recommended best practice is to select a value from a controlled vocabulary (for example, the list of Internet Media Types MIME defining computer media formats). 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 29
Dublin Core Elements III • Type: The nature or genre of the content of the resource. – Type includes terms describing general categories, functions, genres, or aggregation levels for content. – Recommended best practice is to select a value from a controlled vocabulary (for example, the working draft list of Dublin Core Types given later). – To describe the physical or digital manifestation of the resource, use the FORMAT element. • Identifier: An unambiguous reference to the resource within a given context. – Recommended best practice is to identify the resource by means of a string or number conforming to a formal identification system. – Example formal identification systems include the Uniform Resource Identifier (URI) (including the Uniform Resource Locator (URL)), the Digital Object Identifier (DOI) and the International Standard Book Number (ISBN). 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 30
Dublin Core Elements IV • Source: A Reference to a resource from which the present resource is derived. – The present resource may be derived from the Source resource in whole or in part. – Recommended best practice is to reference the resource by means of a string or number conforming to a formal identification system. • Language: A language of the intellectual content of the resource. – Recommended best practice for the values of the Language element is defined by RFC 1766, which includes a two-letter Language Code (taken from the ISO 639 standard), followed optionally, by a two-letter Country Code (taken from the ISO 3166 standard). – For example, 'en' for English, 'fr' for French, or 'en-uk' for English used in the United Kingdom. • Relation: A reference to a related resource. – Recommended best practice is to reference the resource by means of a string or number conforming to a formal identification system. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 31
Dublin Core Elements V • Coverage: The extent or scope of the content of the resource. – Coverage will typically include spatial location (a place name or geographic coordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity). – Recommended best practice is to select a value from a controlled vocabulary (for example, the Thesaurus of Geographic Names) and that, where appropriate, named places or time periods be used in preference to numeric identifiers such as sets of coordinates or date ranges. • Rights: Information about rights held in and over the resource. – Typically, a Rights element will contain a rights management statement for the resource, or reference a service providing such information. – Rights information often encompasses Intellectual Property Rights (IPR), Copyright, and various Property Rights. – If the Rights element is absent, no assumptions can be made about the status of these and other rights with respect to the resource. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 32
Dublin Core attributes • Version (1. 1) - The version of the data element • Registration Authority (Dublin Core Metadata Initiative) - The entity authorised to register the data element • Language (en) - The language in which the data element is specified • Obligation (Optional) - Indicates if the data element is required to always or sometimes be present (contain a value) • Datatype (Character String) - Indicates the type of data that can be represented in the value of the data element • Maximum Occurrence (Unrestricted) - Indicates any limit to the repeatability of the data element • The above 6 are same (value in green) for all elements. The next 4 are different and derived from information I just gave • Name - The label assigned to the data element • Identifier - The unique identifier assigned to the data element • Definition - A statement that clearly represents the concept and essential nature of the data element • Comment - A remark concerning the application of the data element 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 33
Dublin Core Type Vocabulary I These are vocabulary for dc: type • • Collection: A collection is an aggregation of items. – The term collection means that the resource is described as a group; its parts may be separately described and navigated. • Dataset: A dataset is information encoded in a defined structure (for example, lists, tables, and databases), intended to be useful for direct machine processing. • Event: An event is a non-persistent, time-based occurrence. – Metadata for an event provides descriptive information that is the basis for discovery of the purpose, location, duration, responsible agents, and links to related events and resources. – The resource of type event may not be retrievable if the described instantiation has expired or is yet to occur. Examples - exhibition, web-cast, conference, workshop, open-day, performance, battle, trial, wedding, tea-party, conflagration. • Image: An image is a primarily symbolic visual representation other than text. – For example - images and photographs of physical objects, paintings, prints, drawings, other images and graphics, animations and moving pictures, film, diagrams, maps, musical notation. – Note that image may include both electronic and physical representations. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 34
Dublin Core Type Vocabulary II • Interactive Resource: An interactive resource is a resource which requires interaction from the user to be understood, executed, or experienced. – For example - forms on web pages, applets, multimedia learning objects, chat services, virtual reality. • Service: A service is a system that provides one or more functions of value to the end-user. – Examples include: a photocopying service, a banking service, an authentication service, interlibrary loans, a Z 39. 50 or Web server. • Software: Software is a computer program in source or compiled form which may be available for installation non-transiently on another machine. – For software which exists only to create an interactive environment, use interactive instead. • Sound: A sound is a resource whose content is primarily intended to be rendered as audio. – For example - a music playback file format, an audio compact disc, and recorded speech or sounds. • Text: A text is a resource whose content is primarily words for reading. For example - books, letters, dissertations, poems, newspapers, articles, archives of mailing lists. Note that facsimiles or images of texts are still of the genre text. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 35
Dublin Core Qualifiers I • This is dcq namelist we saw earlier in our example using <dcq: Relation. Type – xmlns: dcq="http: //purl. org/metadata/dublin_core_qualifiers#" • The dcq schema specifies refinements of Dublin Core Elements • The dcq document also specifies several possible control vocabularies to be used with each element. • Each dcq element has 5 possible attributes: • Name: The unique token assigned to the qualifier. • Label: The human-readable label assigned to the qualifier. • Definition: A statement that represents the concept and essential nature of the qualifier. • Comment: Additional information associated with the qualifier (if available). • See Also: A link to more information about the qualifier (if available). 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 36
Dublin Core Qualifiers II • dc: Title has possible refinement dcq: Alternative • dc: Description has refinements dcq: Table. Of. Contents and dcq: Abstract • dc: Date has refinements dcq: Created, dcq: Valid, dcq: Available, dcq: Issued, and dcq: Modified • dc: Format has refinements dcq: Extent and dcq: Medium • dc: Relation has refinements Is Version Of dcq: Has. Version, dcq: Is. Replaced. By, dcq: Replaces, dcq: Is. Required. By, dcq: Requires, dcq: Is. Part. Of, dcq: Has. Part, dcq: Is. Referenced. By, dcq: References, dcq: Is. Format. Of and dcq: Has. Format • dc: Coverage has refinements dcq: Spatial and dcq: Temporal 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 37
RDF Schema This shows a Motor Vehicle Metadata with Sub Classes 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 38
Motor Vehicle Class Hierarchy • This picture shows the RDF graph corresponding to previous example 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 39
RDF Core Classes • RDF Schema is http: //www. w 3. org/TR/2000/CR-rdf-schema-20000327/ • There are three core classes • rdfs: Resource – All things being described by RDF expressions are called resources, and are considered to be instances of the class rdfs: Resource. • rdf: Property represents the subset of RDF resources that are properties • rdfs: Class – This corresponds to the generic concept of a Type or Category, similar to the notion of a Class in object-oriented programming languages such as Java. When a schema defines a new class, the resource representing that class must have an rdf: type property whose value is the resource rdfs: Class. – RDF classes can be defined to represent almost anything, such as Web pages, people, document types, databases or abstract concepts. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 40
RDF Schema Core Properties • rdf: type – This indicates that a resource is a member of a class, and thus has all the characteristics that are to be expected of a member of that class. – When a resource has an rdf: type property whose value is some specific class, we say that the resource is an instance of the specified class. – The value of an rdf: type property for some resource is another resource which must be an instance of rdfs: Class. – The resource known as rdfs: Class is itself a resource of rdf: type rdfs: Class. – Individual classes (for example, 'Dog') will always have an rdf: type property whose value is rdfs: Class (or some subclass of rdfs: Class, as described in section 2. 3. 2). A resource may be an instance of more than one class. • rdfs: sub. Class. Of – This property specifies a subset/superset relation between classes. The rdfs: sub. Class. Of property is transitive. – If class A is a subclass of some broader class B, and B is a subclass of C, then A is also implicitly a subclass of C. Consequently, resources that are instances of class A will also be instances of C, since A is a sub-set of both B and C. – Only instances of rdfs: Class can have the rdfs: sub. Class. Of property and the property value is always of rdf: type rdfs: Class. – A class may be a subclass of more than one class. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 41
rdfs: sub. Property. Of • The property rdfs: sub. Property. Of is an instance of rdf: Property that is used to specify that one property is a specialization of another. – A property may be a specialization of zero, one or more properties. – If some property P 2 is a sub. Property. Of another more general property P 1, and if a resource A has a P 2 property with a value B, this implies that the resource A also has a P 1 property with value B. • A property can never be declared to be a subproperty of itself, nor of any of its own subproperties • Here is an example with biological. Father as a subproperty. Of biological. Parent • Note use of ID 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 42
rdfs: see. Also and rdfs: is. Defined. By • rdfs: see. Also – The property rdfs: see. Also specifies a resource that might provide additional information about the subject resource. – This property may be specialized using rdfs: sub. Property. Of to more precisely indicate the nature of the information the object resource has about the subject resource. – The object and the subject resources are constrained only to be instances of the class rdfs: Resource. • rdfs: is. Defined. By – The property rdfs: is. Defined. By is a subproperty of rdfs: see. Also, and indicates the resource defining the subject resource. – As with rdf: see. Also, this property can be applied to any instance of rdfs: Resource and may have as its value any rdfs: Resource. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 43
rdfs Constraints • rdfs: Constraint. Resource – This resource defines a subclass of rdfs: Resource whose instances are RDF schema constructs involved in the expression of constraints. – The purpose of this class is to provide a mechanism that allows RDF processors to assess their ability to use the constraint information associated with an RDF model. – Since this specification does not provide a mechanism for the dynamic discovery of new forms of constraint, an RDF Schema 1. 0 processor encountering previously unknown instances of rdfs: Constraint. Resource can be sure that it is unqualified to determine the meaning of those constraints. • rdfs: Constraint. Property – This resource defines a subclass of rdf: Property, all of whose instances are properties used to specify constraints. – This class is a subclass of rdfs: Constraint. Resource and corresponds to the subset of that class representing properties. – Both rdfs: domain and rdfs: range are instances of rdfs: Constraint. Property. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 44
Rdf: range rdfs: domain • rdfs: range – An instance of Constraint. Property that is used to indicate the class(es) that the values of a property must be members of. – The value of a range property is always a Class. – Range constraints are only applied to properties. – A property can have at most one range property. – It is possible for it to have no range, in which case the class of the property value is unconstrained. • rdfs: domain – An instance of Constraint. Property that is used to indicate the class(es) on whose members a property can be used. – A property may have zero, one, or more than one class as its domain. – If there is no domain property, the property may be used with any resource. If there is exactly one domain property, it may only be used on instances of that class (which is the value of the domain property). – If there is more than one domain property, the constrained property can be used with instances of any of the classes (that are values of those domain properties). 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 45
Example of rdfs: domain and rdfs: range • Note domain tells you about “subject” – resource being described by a particular property • range tells you about allowed values of property • “registered. To” applies to Motor. Vehicle’s and must be a Person 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 46
Useful Base rdfs Properties and Classes • rdfs: comment - This property is used to provide a human-readable description of a resource. • rdfs: label - This property is used to provide a human-readable version of a resource name. • rdfs: Literal - This class corresponds to the set called the 'Literals' in the formal model for RDF. – Atomic values such as textual strings are examples of RDF literals. • rdfs: Container - This class describes rdf: Bag rdf: Seq rdf: Alt. – It is an instance of rdfs: Class and rdfs: sub. Class. Of of rdfs: Resource. • rdf: Bag - This is the class called 'Bag' in the formal model for RDF. – It is an instance of rdfs: Class and rdfs: sub. Class. Of rdfs: Container. • rdf: Seq - This is the class called 'Sequence' in the formal model for RDF. – It is an instance of rdfs: Class and rdfs: sub. Class. Of rdfs: Container. • rdf: Alt - This is the class called 'Alternative' in the formal model for RDF. – It is an instance of rdfs: Class and rdfs: sub. Class. Of rdfs: Container. • rdfs: Container. Membership. Property - This class has as members the properties _1, _2, _3. . . used to indicate container membership. – This is a rdfs: sub. Class. Of rdf: Property. • rdf: value - This property corresponds to the 'value' property of an rdf: object. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 47
RDF Statements I • There is a formal way of looking at RDF statements which break it up into (subject, predicate, object) triple – This allows (as on next foil) one to maker statements about statements • rdf: Statement - This class corresponds to the set called the 'Statement ‘ in the formal model for RDF. • rdf: subject - This corresponds to the property called the 'subject' in the formal model for RDF. – Its rdfs: domain is rdf: Statement and rdfs: range is rdfs: Resource. – This is used to specify the resource described by a reified statement. • rdf: predicate - This corresponds to the property called the 'predicate' in the formal model for RDF. – Its rdfs: domain is rdf: Statement and rdfs: range is rdf: Property. – This is used to identify the property used in the modeled statement. • rdf: object - This corresponds to the property called the 'object' in the formal model for RDF. – Its rdfs: domain is rdf: Statement. – This is used to identify the property value in the modeled statement. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 48
RDF Statements II • <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntaxns#" xmlns: a="http: //description. org/schema/"> • <rdf: Description> • <rdf: subject resource="http: //www. w 3. org/Home/Lassila" /> • <rdf: predicate resource="http: //description. org/schema/Creator" /> • <rdf: object>Ora Lassila</rdf: object> • <rdf: type resource="http: //www. w 3. org/1999/02/22 -rdf-syntaxns#Statement" /> • <a: attributed. To>Ralph Swick</a: attributed. To> </rdf: Description> • </rdf: RDF> • Here we attribute assertion (statement) to Raplh Swick 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 49
ID and bag. ID in RDF • If another Description or property value needs to refer to the in-line resource it will use the value of the ID of that resource in its own about attribute. – The ID attribute signals the creation of a new resource and the about attribute refers to an existing resource; therefore either ID or about may be specified on Description but not both together in the same element. – The values for each ID attribute must not appear in more than one ID attribute within a single document. • There is also bag. ID used to label container containing formal RDF Statements • We can write: <rdf: RDF> <rdf: Description about="http: //www. w 3. org/Home/Lassila" bag. ID="D_001"> <s: Creator>Ora Lassila</s: Creator> <s: Title>Ora's Home Page</s: Title> </rdf: Description> </rdf: RDF> • And then add assertion about attribution via <rdf: Description about. Each="#D_001"> <a: attributed. To>Ralph Swick</a: attributed. To> </rdf: Description> 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 50
Example of a Person RDFS Schema I 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 51
Example of a Person RDFS Schema II • In previous foil, Person is a class with a corresponding human-readable description of "The class of people". • Animal is a class presumed to be defined in another schema. All persons are animals, so we declare that Person is a subclass of Animal. • A Person may have an age property. The value of age is an integer. • A Person may also have an ssn ("Social Security Number") property. The value of ssn is an integer. • A Person's marital status is one of {Single, Married, Divorced, Widowed}. – This is achieved through use of the rdfs: range constraint: we define both a marital. Status property and a class Marital. Status (adopting the convention of using lower case letters to begin the names of properties, and capitals for classes). – We then use rdfs: range to state that a marital. Status property only 'makes sense' when it has a value which is an instance of the class Marital. Status. – The schema then defines a number of instances of this class. – Whether resources declared to be of type Marital. Status in another graph are trusted is an application level decision. 9/10/2020 it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 52
rdfs Example • • • 9/10/2020 This is an RDF vocabulary for use with searchable Internet services. Search. Query is declared to be a class. Every Search. Query can have both a query. String whose value is an rdfs: Literal and a query. Service whose value is a Search. Service. A Search. Service is a subclass of Internet. Service (which is defined elsewhere). A Search. Query has some number of result properties (whose value is Search. Result). Each Search. Result has a title (value is a rdfs: Literal), a rating and of course, the page itself. it 2 xmlmetadata 01 http: //aspen. csit. fsu. edu/it 2 spring 01 53
- Slides: 53