RDF- Crack (RDFa, triples,FOAF) ( part 2 )

RDF is a way of presenting knowledge, relationship or a thing in the format of triples. For everything in the web will be represented as a triples format. As we know about grammer we read it in our child hood, like every basic sentence is represented as format of triples. That means subject, predicate & objects.

FOAF:

FOAF is the vocabulary to represent RDF the objects & relationship between them. FOAF is a way of describing a person / company. FOAF is Friend of A friend using RDF to represent its data. It will describe a person in the following way.

nandakumar -> is -> http://www.desiji.com/ndotnanda

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:foaf="http://xmlns.com/foaf/0.1/">
 <foaf:Person>
   <foaf:name>Nandakumar</foaf:name>
   <foaf:mbox rdf:resource="http://www.desiji.com/ndotnanda"/>
 </foaf:Person>
</rdf:RDF>

N3 Notation & triples:
A syntax to represent RDF.
@prefix pref <http://www.example.org/vacobulary #>.
<#nandakumar><pref:working><#ndot>

RDFa:
RDFa is way to integrate RDF into XHTML pages. It reduces the lot of work & difficulties for
normal people those who want to represent their blog / personal data into semantic web. RDFa helps
them to represent their information to semantic web with XTHML. we can take an small example about
how we can represent a data with RDFa,

Here we are going to explain a FOAF integration into XHTML page.

Triples:
Nandakumar knows Preethi

RDFa:

<body xmlns:foaf="http://xmlns.com/foaf/0.1">
<span about="#Nandakumar" property="foaf:name">
Nandakumar Somasundaram
</span>
</body>
Triple : Nandakumar -> Name -> Nandakumar Somasundaram

RDFa : example 2
<body xmlns:foaf="http://xmlns.com/foaf/0.1">
<span about="#Nandakumar" property="foaf:name">
Nandakumar Somasundaram
</span>
<span about="#Preethi" property="foaf:name">
Preethi
</span>
<span about="#Nandakumar" rel="foaf:knows" resource="#Preethi">
Nandakumar is classmate of preethi
</span
</body>
Advertisements

About this entry