The Resource Description Framework (RDF) is a basic ontology description language. It provides a common data model that allows you to describe web resources.
• Resources: All things named on the web and referenced by Uris
• Description: a declaration of the resource features, including the attributes of the resource and the relationship between the resources
• Framework: a general model unrelated to the resources to be described and their fields. In fact, RDF is a data model consisting of a series of statements, namely, object-Attribute-value. Triples: [S, P, O] The triples of subject, predicate, and object are associated with the three parts of the original statement. Subject: Declares the predicate of the described thing: The property object of this thing: the value of this property
{P, S, O} instance:
{Http://www.w3c.cn, creator, W3C} ---> http: // "the" creator "of www.w3c.cn" is "W3C"
Subject, predicate and object, triple
<? XML version = "1.0"?>
<RDF: RDF xmlns: RDF = http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns: W3 = "www.w3school.com.cn">
<RDF: Description RDF: About = "subject to be described">
<W3: Author relation to express> description of subject relation </W3: Author> <W3: homepage> http://www.w3school.com.cn </W3: homepage>
</RDF: Description>
</RDF: RDF>
RDF syntax
1. Turtle syntax
@ Prefix someprefix: <"http://www.perceive.new/schemas/relationship/>. # The Last". "is required to indicate the end of the statement
<Http://example.org/#green-goblin> someprefix: enemyof
The enemy of green-goblin is Spiderman.
@ Base <"http://example.org/>.
@ Prefix someprefix: <"http://www.perceive.new/schemas/relationship/>.
@ Prefix foaf:
<# Green-goblin> someprefix: enemyof <# Spiderman>; # A list of matched predicates and objects separated ';'.
A foaf: person;
Foaf: Name "Green Goblin ".
Use <Iris>
The default text type of RDF is XSD: string '"That seventies show" ^ XSD: String. # literal
@ Prefix:
<Http://en.wikipedia.org/wiki/Helium>
: Atomicnumber 2; # XSD: integer
: Atomicmass 4.002602; # XSD: decimal
: Specificgravity 1.663e-4. # XSD: double
: Islandlocked false. # XSD: Boolean
Nested blank nodes
@ Prefix foaf:
[Foaf: Name "Alice"] foaf: knows [
Foaf: Name "Bob ";
Foaf: knows [
Foaf: Name "Eve"];
Foaf: mbox <[email protected]>].
==>
_: A
_: A
B
_: B
C
_: B
N3 syntax is her subset with no prefix
RDF application • Web Metadata: Provides system information (content classification, Performance description, and personal preferences) about Web Resources and web resources) • applications requiring an open Information Model (activity arrangement, organizational flow, Web Resource tagging, etc.) • Publish information that can be processed by machines • interoperability between applications. Merge data from multiple applications to form new information • automated Web information processing by the software agent.
Basic knowledge of RDF