Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Semantic Web
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == In the following example, the text "Paul Schuster was born in Dresden" on a website will be annotated, connecting a person with their place of birth. The following [[HTML]] fragment shows how a small graph is being described, in [[RDFa]]-syntax using a [[schema.org]] vocabulary and a [[Wikidata]] ID: <syntaxhighlight lang="html"> <div vocab="https://schema.org/" typeof="Person"> <span property="name">Paul Schuster</span> was born in <span property="birthPlace" typeof="Place" href="https://www.wikidata.org/entity/Q1731"> <span property="name">Dresden</span>. </span> </div> </syntaxhighlight> [[File:RDF example.svg|framed|{{anchor|graph1}}Graph resulting from the RDFa example]]{{clear}} The example defines the following five [[Semantic triple|triples]] (shown in [[Turtle (syntax)|Turtle]] syntax). Each triple represents one edge in the resulting graph: the first element of the triple (the ''subject'') is the name of the node where the edge starts, the second element (the ''predicate'') the type of the edge, and the last and third element (the ''object'') either the name of the node where the edge ends or a literal value (e.g. a text, a number, etc.). <syntaxhighlight lang="turtle"> _:a <https://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://schema.org/Person> . _:a <https://schema.org/name> "Paul Schuster" . _:a <https://schema.org/birthPlace> <https://www.wikidata.org/entity/Q1731> . <https://www.wikidata.org/entity/Q1731> <https://schema.org/itemtype> <https://schema.org/Place> . <https://www.wikidata.org/entity/Q1731> <https://schema.org/name> "Dresden" . </syntaxhighlight> The triples result in the graph shown in [[#graph1|the given figure]]. [[File:RDF example extended.svg|framed|Graph resulting from the RDFa example, enriched with further data from the Web]] One of the advantages of using [[Uniform Resource Identifier|Uniform Resource Identifiers (URIs)]] is that they can be dereferenced using the [[HTTP]] protocol. According to the so-called [[Linked Open Data]] principles, such a dereferenced URI should result in a document that offers further data about the given URI. In this example, all URIs, both for edges and nodes (e.g. {{code|http://schema.org/Person}}, {{code|http://schema.org/birthPlace}}, {{code|http://www.wikidata.org/entity/Q1731}}) can be dereferenced and will result in further RDF graphs, describing the URI, e.g. that Dresden is a city in Germany, or that a person, in the sense of that URI, can be fictional. The second graph shows the previous example, but now enriched with a few of the triples from the documents that result from dereferencing {{code|https://schema.org/Person}} (green edge) and {{code|https://www.wikidata.org/entity/Q1731}} (blue edges). Additionally to the edges given in the involved documents explicitly, edges can be automatically inferred: the triple <syntaxhighlight lang="turtle"> _:a <https://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> . </syntaxhighlight> from the original RDFa fragment and the triple <syntaxhighlight lang="turtle"> <https://schema.org/Person> <http://www.w3.org/2002/07/owl#equivalentClass> <http://xmlns.com/foaf/0.1/Person> . </syntaxhighlight> from the document at {{code|https://schema.org/Person}} (green edge in the figure) allow to infer the following triple, given [[Web Ontology Language|OWL]] semantics (red dashed line in the second Figure): <syntaxhighlight lang="turtle"> _:a <https://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Semantic Web
(section)
Add topic