ТОП просматриваемых книг сайта:
Semantic Web for the Working Ontologist. Dean Allemang
Читать онлайн.Название Semantic Web for the Working Ontologist
Год выпуска 0
isbn 9781450376167
Автор произведения Dean Allemang
Жанр Программы
Серия ACM Books
Издательство Ingram
For the purposes of explaining modeling on the Semantic Web, the detailed URIs behind the CURIEs are not important, so for the most part, we will omit these bindings from now on. In many examples, we will take this notion of abbreviation one step further; in the cases when we use a single namespace throughout one example, we will assume there is a default namespace declaration that allows us to refer to URIs simply with a symbolic name preceded by a colon (:), such as :Shakespeare, :JamesDean, :Researcher.
Using CURIEs, our triple sets now look as shown in Tables 3.6 and 3.7. Compare Table 3.6 with Table 3.5, and compare Table 3.7 with Table 3.4. But it isn’t always that simple; some triples will have to use identifiers with different namespaces, as in the example in Table 3.8, which was taken from Table 3.3.
In Table 3.8, we introduced a new namespace, bio:, without specifying the actual URI to which it corresponds. For this model to participate on the Web, this information must be filled in. But from the point of view of modeling, this detail is unimportant. For the rest of this book, we will assume that the prefixes of all CURIEs are defined, even if that definition has not been specified explicitly in print.
Standard namespaces
Using the URI as a standard for global identifiers allows for a worldwide reference for any symbol. This means that we can tell when any two people anywhere in the world are referring to the same thing.
This property of the URI provides a simple way for a standard organization (like the World Wide Web Consortium [W3C]) to specify the meaning of certain terms in the standard. As we will see in coming chapters, the W3C standards provide definitions for terms such as type, subClassOf, Class, inverseOf, and so forth. But these standards are intended to apply globally across the Semantic Web, so the standards refer to these reserved words in the same way as they refer to any other resource on the Semantic Web, as URIs.
Table 3.6 Plays of Shakespeare with CURIEs.
Subject | Predicate | Object |
---|---|---|
lit:Shakespeare | lit:wrote | lit:AsYouLikeIt |
lit:Shakespeare | lit:wrote | lit:HenryV |
lit:Shakespeare | lit:wrote | lit:LovesLaboursLost |
lit:Shakespeare | lit:wrote | lit:MeasureForMeasure |
lit:Shakespeare | lit:wrote | lit:TwelfthNight |
lit:Shakespeare | lit:wrote | lit:WintersTale |
lit:Shakespeare | lit:wrote | lit:Hamlet |
lit:Shakespeare | lit:wrote | lit:Othello |
Table 3.7 Geographical names with CURIEs.
Subject | Predicate | Object |
---|---|---|
geo:Scotland | geo:partOf | geo:UK |
geo:England | geo:partOf | geo:UK |
geo:Wales | geo:partOf | geo:UK |
geo:NorthernIreland | geo:partOf | geo:UK |
geo:ChannelIslands | geo:partOf | geo:UK |
geo:IsleOfMan | geo:partOf | geo:UK |
Table 3.8 Triples referring to URIs with a variety of namespaces.
Subject | Predicate | Object |
---|---|---|
lit:Shakespeare | lit:wrote | lit:KingLear |
lit:Shakespeare | lit:wrote | lit:MacBeth |
bio:AnneHathaway | bio:married | lit:Shakespeare |
bio:AnneHathaway | bio:livedWith | lit:Shakespeare |
lit:Shakespeare | bio:livedIn | geo:Stratford |
geo:Stratford | geo:isIn | geo:England |
geo:England | geo:partOf | geo:UK |
geo:Scotland | geo:partOf | geo:UK |
The W3C has defined a number of standard namespaces for use with Web technologies, including xsd: for XML schema definition; xmlns: for XML namespaces; and so on. The Semantic Web is handled in exactly the same way, with namespace definitions for the major layers of the Semantic Web. Following standard practice with the W3C, we will use CURIEs to refer to these terms, using the following definitions for the standard namespaces.
rdf : Indicates identifiers used in RDF. The set of identifiers defined in the standard is quite small and is used to define types and properties in RDF. The global URI for the rdf namespace is http://www.w3.org/1999/02/22-rdf-syntax-ns#
.
Table 3.9 Using rdf:type to describe playwrights.
Subject | Predicate |
|
---|