Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part I. Resource and AAA In the Semantic Web, anything is a ‘resource’ if anything can be said about it by anyone for any purpose The AAA slogan applies.

Similar presentations


Presentation on theme: "Part I. Resource and AAA In the Semantic Web, anything is a ‘resource’ if anything can be said about it by anyone for any purpose The AAA slogan applies."— Presentation transcript:

1 Part I

2 Resource and AAA In the Semantic Web, anything is a ‘resource’ if anything can be said about it by anyone for any purpose The AAA slogan applies to the Semantic Web: “Anyone can say Anything about Any topic” A resource is anything with identity (URI), and could be physical (rock, river, fault) or digital (image, document, webpage, or a collection of these) Hence, Resource Description Framework (RDF) is a language that describes resources (e.g., web pages or entire web site), and data, metadata, and other languages (RDFS, OWL)

3 URI and URIref Resources are identified on the Web by the URI (Uniform Resource Identifier), URI is a character string that identifies an abstract or physical resource on the Web URI references are used to name all kinds of things in RDF Unlike URL, URI does not have to have a network location! In RDF, URIrefs are used only to identify things (they cannot be retrieved on the Web) However, Linked Data uses http to retrieve data Browsers use URIrefs to retrieve things

4 URIref URIref (URI reference) is a URI with an optional fragment identifier at the end, that identifies: An individual http://www.gsu.edu/people/contact#me A type (class) http://www.gsu.edu/GEOS/structure#Fault A property http://www.gsu.edu/GEOS/Structure/Fault#attitude A property value http://www.gsu.edu/GEOS/Structure/Fault/attitude/030,45SE

5 Absolute and relative URIref Absolute URIref identifies a resource independently of the context in which the URIref appears, for example: http://www.gsu.edu/~geohab/index.htm The absolute URIref for the rdf:description Qname is: http://www.w3.org/1999/02/22-rdf-syntax ns#description Relative URIref is a shorthand form of the absolute URIref in which the prefix is missing. Therefore it requires information from the context to fill in the omitted prefix. For example, the relative URIref geol4123_6123.htm when it appears in the resource http://www.gsu.edu/~geohab/Babaie/pages/Geol4123_6123, would be filled out to the following absolute URIref: http://www.gsu.edu/~geohab/Babaie/pages/Geol4123_6123/geol4123_6123.htm

6 Qualified names (Qname) A namespace, or vocabulary, is a collection of names, identified by URIrefs. For example, the namespace for rdf is: http://www.w3.org/1999/02/22-rdf-syntax-ns# These names may be qualified names (Qnames), which are identifiers of the ‘prefix:name’ form, given by a namespace prefix (e.g., rdf, rdfs), followed by a colon (:), followed by a local part (e.g., type, description) For example rdf:type, rdf:description

7 Resource Description Framework RDF is an ontology language for the representation of information and metadata about resources and objects on the Web RDF is a namespace or vocabulary, with the rdf prefix RDF has three notations: RDF triples RDF graph RDF/XML

8 RDF triple statement An RDF statement is a triple (S, P, O), where: S is a URIref, called subject; it may not be a literal P is a URIref, called property (predicate); may not be a literal O is either a URIref or a literal value, called an object A subject resource, S, may have a property P with value from O (a class), or a P property with value O (a literal) Depending on whether the object is a class or a literal, the rdf statements can be of either of the following two forms: or “O”

9 RDF is a vocabulary A vocabulary, made of RDF statements, is a set of unique URIrefs, which can be specified by either: qualified names (e.g., rdf : type, rdf : about, rdf : resource, dc : title, dc : creater, dc : date), which are used as properties of the rdf statements NOTE: dc is the prefix for the Dublin Core vocabulary that describes document metadata, and is reused in many ontologies fragment identifiers, which are used to denote subjects or objects of the rdf statements, e.g.,

10 RDF graph RDF triples can be denoted with nodes, representing subjects and objects, and directed arcs or edges (from S to O), representing predicates (properties) A node may be identified by a URIref or it can be a litteral or blank node An arc is identified by a URIref Only absolute URIrefs are used as labels of the nodes and arcs URIrefs are shown with ellipses Literals are shown with boxes Properties are labeled with character strings

11 RDF graph - example http://www.gsu.edu/~geohab/Babaie/index.html has creation date of September 1, 2000 and is written in English http://www.gsu.edu/~geohab/Babaie/index.html Hassan Babaie en September 1, 2000 http://purl.org/dc/elements/1.1/language http://purl.org/dc/elements/1.1/creater http://www.example.org/terms/creation-date

12 http://www.gsu.edu/Geosciences/contact#Faculty http://www.gsu.edu/Geosciences/contact#me http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.gsu.edu/Geosciences/contact#fullName http://www.gsu.edu/Geosciences/contact#email http://www.gsu.edu/Geosciences/contact#title Hassan Babaie hbabaie@gsu.edu Associate Professor

13 Porosity HydraulicProperty Aquifer test HydraulicConductivity Hydrogeologist has ConfinedAquiferUnconfinedAquifer A Graph represents multiple statements S O P SOP

14 latitude 42.834 Location Sample longitude takes 110.2345 Geochemist hasLocation Affiliation has Image A Graph represents multiple statements

15 Examples of SPO Minerals: micaMinerals: identified-by Geologist:G1234 Minerals:micaMinerals:cleavage “one direction” “One direction” Minerals:HabitMinerals:habit “flaky” <http://www.Mineralogy.org/Minerals#habit “flaky”

16 http://www.Mineralogy.org/Minerals#identified-by RDF graph for the example http://www.Mineralogy.org/Minerals#mica http://www.Mineralogy.org/Geologist#G1234 “one direction”“Flaky” http://www.Mineralogy.org/Minerals#cleavage http://www.Mineralogy.org/Minerals#habit Minerals: mica Minerals: identified-by Geologist:G1234 Minerals:mica Minerals:cleavage “one direction” Minerals:Habit Minerals:habit “flaky”

17 RDF/XML notation of the example <rdf : RDF xml : base = “http://www.Mineralogy.org/Minerals” xmlns : rdf = “http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns : dc = “http://purl.org/dc/elements/1.1” xmlns : min = “http://www.Mineralogy.org/Minerals”> one-direction flaky

18 Notes for the previous code Qualified names (e.g., dc : date, min : cleavage) are used to abbreviate the URIrefs rdf statement is nested in the rdf : Description qualified name The rdf : about specifies the subject of each rdf statement The rdf : resource specifies the object of the rdf statement Because the xml : base URIref: (http://www.Mineralogy.org/Minerals) is defined, the absolute URIref is given by the concatenation of the local URIref (fragment identifier), i.e., the base URIref and #mica The prefix namespace for the Mineralogy vocabulary (i.e., min) is given by the xmlns : min = “http://www.Mineralogy.org/Minerals” The prefix for the Dublin Core namespace is given by 'dc‘ whose URIref is given at the top of the code

19 RDF Ordered List using N3 syntax An ordered list of the periods in the Mesozoic era can be given in the Notation 3 (N3) format as SPO: time : Mesozoic time : dividedInto (time : Triassic time : Jurassic time : Cretaceous). Note: N3 (notation 3) is an RDF serialization format which uses qname (qualified name) N3 first requires defining local qnames by binding a prefix to the global URI For example, binding the ‘strat’ and ‘time’ prefixes to the Stratigraphy and Time ontologies is done as follows: @prefix strat : @prefix time :

20 Using Prefixes Now we can use the prefixes to define an RDF triple For example: we can say that Triassic precedes Jurassic (notice the period at the end of the N3 statement): time : Triassictime : precedestime: Jurassic.

21 One subject with n properties and objects We can even make a list of predicates and objects for a single subject in one N3 statement. These are separated with a semicolon We can list the data for the Asmari Formation as follows (note: Asmari is the subject): strat : Asmarirdf : typestrat : Formation; strat : FormationThickness “200 m”; strat : FormationLithology “limestone”; strat : FormationAge “Oligo-Miocene”; strat : FormationFacies “Shallow Marine”; strat : FormationFossil “Foraminifera, algae, bryozoa, echinoid”; …

22 Use comma to separate objects If several triples share the same subject and predicate, we use a comma to separate the objects The fact that the Mesozoic Era has three periods: Triassic, Jurassic, and Cretaceous, can be stated in one (instead of three) RDF statement in the N3 format: Mesozoic has periods Triassic, Jurassic, and Cretaceous time : Mesozoictime : period time : Triassic, time : Jurassic, time : Cretaceous.

23 ‘a’ for ‘rdf:type’ In N3, we use the letter ‘a’ to substitute for ‘rdf:type’ So, we can make statements such as ‘sulfide is a mineral’ (defined in mineralogy ontology, prefix: ‘min’) or ‘rhyolite is a felsic volcanic rock’ (defined in the Petrology ontology, prefix: ‘petr’). min : Sulfiderdf : typemin : Mineral or min : Sulfide amin : Mineral petr : Rhyolite rdf : type FelsicVolcanicRock or petr : Rhyolitea FelsicVolcanicRock

24 RDF vocabulary In RDF, an individual resource is assigned as an instance of another resource (class) with the rdf : type predicate “Idaho pluton is a pluton” is written in RDF triple as: petr: IdahoPlutonrdf : typepetr : pluton The rdf : Property is the class of all property resources, and allows defining all the attributes that describe the resource (e.g., can define color and cleavage for Mineral) e.g., define ‘deforms’ to be a property: struc : deformsrdf : typerdf : Property

25 rdf : Description, rdf : about, rdf : resource Because RDF is resource description framework, the rdf : Description begins the description of an RDF statement rdf : about is an attribute of the rdf : Description, and indicates the subject of the rdf statement rdf : resource is an attribute of the property, and indicates the object of the RDF statement

26 rdf : ID property rdf : datatype property rdf : ID is an attribute of the rdf : Description It indicates the subject of the RDF statement … rdf : datatype is an attribute of the property element, and has XSD datatype as value; allows defining the type of literals to the property Statement: Faultfault:length “ 20 “ is written as: 20

27 RDF containers RDF has three constructs to be used as collections of resources: rdf : Bag For grouping of resources without order rdf : Seq For grouping of resources with order rdf : Alt Is a special type of rdf: Bag used for describing a set of equivalent alternatives

28 rdf:_n predicates, rdf : Bag RDF has a set of special predicates: rdf:_1, rdf:_2, …, rdf:_n, to associate a container as the subject with a resource it contains as the object @prefix min:. @prefix rdf:. Group plagioclase (resources) without order min: Plagioclaserdf : typerdf : Bag; rdf:_1 min : albite; rdf:_2 min : anorthite; rdf:_3 min : oligoclase; rdf:_4 min : andesine; rdf:_5 min : labradorite; rdf:_6 min : bytownite. petr : gabbromin:mineralmin:Plagioclase.

29 Rdf : Seq @prefix planet:. @prefix rdf:. planet: Planets rdf : type rdf : Seq; rdf:_1 planet : Mercury; rdf:_2 planet : Venus; rdf:_3 planet : Earth; rdf:_4 planet : Mars; rdf:_5 planet : Jupiter; rdf:_6 planet : Saturn; rdf:_7 planet : Uranus; rdf:_8 planet : Neptune. planet: Sunplanetsplanet : Planets.

30 rdf : Alt @prefix gsu:. @prefix rdf:. @prefix foaf:. @prefix people:. gsu : webpagerdf : typerdf : Alt; rdf:_1 ; rdf:_2. people: Babaiefoaf : homepagegsu : webpage.

31 Blank or anonymous node (bnode) Sometimes, we want to say something about an individual with certain properties, but we do not want to name that node, i.e., identify it with a URI (or we don’t have the URI), but want to use the node as a structured entity, i.e., an abstract template. For example, the social networks do not issue a URI to members; the data about the members are connected to the blank node In many-valued relationships, we may need to introduce auxiliary nodes, to connect many objects to one subject Blank nodes are used for existential variables (e.g., someone), representing subject or object, for which we want to make assertions but cannot address a URI (someone know someone else) Since they do not have a URI, bnodes cannot be referenced globally; they can only be referred to locally

32 bnode … Let’s assume that we want to say something about some geologist who has made a map, and this someone has name Babaie, and has email: hbabaie@gsu.edu http://www.geology.org/Maps/map1 name email Babaie hbabaie@gsu.edu mapped_by

33 bnode … bnodes can only be used for a subject or an object, not for a predicate, which always needs a URI For example, we may have information about a subject (someone) but do not care to identify it In this case, we use bnode and put the predicate and object in a square bracket set [] Let’s say that we know that there is an outcrop of basalt, and that it is located in Nevada. We state the two statements (with bnode as subject) as follows: [ rdf : type petr: outcrop; geog: located-in geog : Nevada ] rdf : typegeog : located_in petr : Outcropgeog : Nevada

34 Why bnode? RDF only supports binary predicates in one statement, i.e., relations between two resources We cannot say, for example, that Geologist studies Mineral and geologist images Microstructures in one statement In such a case, the solution is to create an auxiliary node (resource), that represents say study, and associate the new node to the geologist, and then link the node to the Mineral and Microstructure This is similar to a university which, through a blank node representing address, connects to a series of address attributes (see image above) Atlanta “30303” GSU GA

35 Referring to a bnode Here is how to write: “geochemical sample N22 was taken in an outcrop which is located in Nevada”: geochem : SampleN22 geochem : takenIn [ a petr: Outcrop geog: locatedIn : Nevada ]. Notice that we are using ‘a’ for ‘rdf:type’, and that geochemistry ontology defines the Sample class and takenIn property rdf : type geog : located_in petr : Outcrop geog : Nevada http://www.geochem.org/Sample/N22 geochem : taken-in

36 Using bnodes with rdf : nodeID bnodes can be referred to by assigning node ids to them, using the rdf : nodeID qualified name The serialization of the previous rdf graph is: Nevada Outcrop1 rdf : type geog : located_in petr : Outcrop geog : Nevada http://www.geochem.org/Sample/N22 geochem : taken-in


Download ppt "Part I. Resource and AAA In the Semantic Web, anything is a ‘resource’ if anything can be said about it by anyone for any purpose The AAA slogan applies."

Similar presentations


Ads by Google