Contenu connexe Similaire à Ontologia1 (20) Ontologia12. RDF
RDF está basado en la idea de identificar los recursos en la Web
usando los Uniform Resource Identifiers o URIs, y describiendo los
recursos en términos de propiedades simples y valores. Una
descripción RDF es un conjunto de proposiciones simples (también
llamadas sentencias o declaraciones) y una proposición se conoce
también como una tripleta, porque está compuesta de 3 cosas: un
sujeto, un predicado y un objeto. Estas sentencias se pueden
representar formalmente usando la tripleta (sujeto, predicado,
objeto), pero existe otra forma de notación que es mostrar una
sentencia mediante grafos dirigidos. Así, en RDF es posible
representar declaraciones simples sobre los recursos como un grafo
(graph) de nodos y arcos que representan los recursos, y sus
propiedades y valores.
RDF (Resource Description Framework)
3. Los 3 elementos de una tripleta se representan mediante URIs.
Donde:
Subject y Object son llamados nodos
Predicate y Property son sinónimos
Nodos sin nombre son nodos en blanco
Subject puede ser una referencia URI o nodos en blanco
Predicate puede ser una referencia URI
Object puede ser una referencia URI, literal o un nodo en blanco.
RDF
Elementos de una tripleta
5. DESCRIPCIÓN DE TRIPLETAS
Para poder realizar la validación de las tripletas tanto RDF como OWL se
tome como referencia de la siguiente dirección:
http://www.w3.org/RDF/Validator
5
7. 07/2009 Diego Herrera 7
Subject Predicate Object
http://localhost/default#Chemestry rdf: type rdfs: Class
http://localhost/default#Computers rdf: type rdfs: Class
http://localhost/default#Contabilidad rdf: type rdfs: Class
Elementos RDF
Tripletas RDF
10. Subject Predicate Object
http://localhost/default#English rdf: type rdfs: Class
http://localhost/default#Fisica rdf: type rdfs: Class
http://localhost/default#HardDisk rdf: type rdfs: Class
http://localhost/default#HardDisk rdf: SubClassOf http://localhost/default#Hardware
10
Elementos RDF
Tripletas RDF
14. Subject Predicate Object
http://localhost/default#Hardware rdf: type
http://www.w3.org/2002/07/owl#Cla
ss
genid:A62794 rdf: type
http://www.w3.org/2002/07/owl#Cla
ss
http://localhost/default#Hardware owl: equivalentClass genid:A62794
genid:A62794 owl: complementOf http://localhost/default#Software
genid:A62795 rdf: type owl: Restriction
http://localhost/default#Hardware rdf: subClassOf genid:A62795
genid:A62795 owl: onProperty http://localhost/default#Producer
genid:A62795 owl: cardinality 1
14
Elementos RDF
Tripletas RDF
15. 07/2009 15
Subject Predicate Object
genid:A62796 rdf: type
http://www.w3.org/2002/07/owl#Re
striction
http://localhost/default#Hardware rdf: SubClassOf genid:A62796
genid:A62796 owl: onProperty
http://localhost/default#Version
genid:A62796 owl: cardinality 1
genid:A62797 rdf: type
http://www.w3.org/2002/07/owl#Re
striction
http://localhost/default#Hardware rdf: subClassOf genid:A62797
genid:A62797 owl: onProperty http://localhost/default#Year
genid:A62797 owl: cardinality 1
Tripletas RDF
17. 17
Class: Informatics
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Informatics">
<owl:equivalentClass>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://localhost/default#Science" />
</owl:unionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
</rdf:RDF>
18. Subject Predicate Object
http://localhost/default#Informatics rdf: type http://www.w3.org/2002/07/owl#Class
genid:A9904 rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Informatics owl: equivalentClass genid:A9904
genid:A9904 owl: unionOf genid:A9905
genid:A9905 rdf: first http://localhost/default#Science
genid:A9905 rdf: rest
http://www.w3.org/1999/02/22-rdf-syntax-
ns#nil
07/2009 18
Elementos RDF
Tripletas RDF
20. 07/2009 20
Class: Informatics
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Informatics">
<owl:equivalentClass>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://localhost/default#Science" />
</owl:unionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
</rdf:RDF>
21. Subject Predicate Object
http://localhost/default#Informatics rdf: type http://www.w3.org/2002/07/owl#Class
genid:A9904 rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Informatics owl: equivalentClass genid:A9904
genid:A9904 owl: unionOf genid:A9905
genid:A9905 rdf: first http://localhost/default#Science
genid:A9905 rdf: rest
http://www.w3.org/1999/02/22-rdf-syntax-
ns#nil
07/2009 21
Elementos RDF
Tripletas RDF
23. 23
Class: Laptops
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Laptops">
<rdfs:subClassOf rdf:resource="http://localhost/default#Computers" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#ProductNumber" />
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinality
>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
24. 07/2009 24
Class: Laptops
Tripletas RDF
Código RDF
<owl: Restriction>
<owl:onProperty rdf:resource="http://localhost/default#Series" />
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinality
>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#Model" />
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinality
>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
</rdf:RDF>
25. Subject Predicate Object
http://localhost/default#Laptops rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Laptops rdf: subClassOf http://localhost/default#Computers
genid:A9927 rdf: type http://www.w3.org/2002/07/owlRestriction
http://localhost/default#Laptops rdf: subClassOf genid:A9927
genid:A9927 owl: onProperty http://localhost/default#ProductNumber
genid:A9927 owl: cardinality 1
genid:A9928 rdf: type
http://www.w3.org/2002/07/owl#Restrictio
n
25
Elementos RDF
Tripletas RDF
26. Subject Predicate Object
http://localhost/default#Laptops rdf: subClassOf genid:A9928
genid:A9928 owl: onProperty http://localhost/default#Series
genid:A9928 owl: cardinality 1
genid:A9929 rdf: type
http://www.w3.org/2002/07/owl#Restrictio
n
http://localhost/default#Laptops rdf: subClassOf genid:A9929
genid:A9929 owl: onProperty http://localhost/default#Model
genid:A9929 owl: cardinality 1
26
Elementos RDF
Tripletas RDF
28. 28
Class: Matematics, Memory
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Matematics"/>
<owl:Class rdf:about="http://localhost/default#Memory">
<rdfs:subClassOf rdf:resource="http://localhost/default#Hardware"/>
</owl:Class>
</rdf:RDF>
29. Subject Predicate Object
http://localhost/default#Matematics rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Memory rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Memory rdf: subClassOf http://localhost/default#Hardware
29
Elementos RDF
Tripletas RDF
31. 31
Class: Servers
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Servers">
<rdfs:subClassOf rdf:resource="http://localhost/default#Computers"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#Series"/>
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardin
ality>
</owl:Restriction>
32. 32
Class: Servers
Tripletas RDF
Código RDF
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#Patent"/>
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardin
ality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
</rdf:RDF>
33. Subject Predicate Object
http://localhost/default#Servers rdf: type http://www.w3.org/2002/07/owl#Class
http://localhost/default#Servers rdf: subClassOf http://localhost/default#Computers
genid:A10015 rdf: type
http://www.w3.org/2002/07/owl#Restri
ction
http://localhost/default#Servers rdf: subClassOf genid:A10015
genid:A10015 owl: onProperty genid:A10015
genid:A10015 owl: cardinality 1
genid:A10016 rdf: type
http://www.w3.org/2002/07/owl#Restri
ction
http://localhost/default#Servers rdf: subClassOf genid:A10016
genid:A10016 owl: onProperty http://localhost/default#Patent
genid:A10016 owl: cardinality 1
33
Elementos RDF
Tripletas RDF
35. 35
Class: Subjects
Tripletas RDF
Código RDF
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="http://localhost/default#Subjects">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#type_subject"/>
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardin
ality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
36. 36
Class: Subjects
Tripletas RDF
Código RDF
<owl:onProperty rdf:resource="http://localhost/default#Resourse"/>
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinalit
y>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://localhost/default#Name_Subject"/>
<owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinalit
y>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
</rdf:RDF>
37. Subject Predicate Object
http://localhost/default#Subjects rdf: type http://www.w3.org/2002/07/owl#Class
genid:A10020
rdf: type http://www.w3.org/2002/07/owl#Restricti
on
http://localhost/default#Subjects owl: onProperty genid:A10020
genid:A10020 owl: onProperty http://localhost/default#type_subject
genid:A10020 owl: cardinality 1
genid:A10021 rdf: type
http://www.w3.org/2002/07/owl#Restricti
on
http://localhost/default#Subjects rdf: subClassOf genid:A10021
37
Elementos RDF
Tripletas RDF
38. Subject Predicate Object
genid:A10021 owl: onProperty http://localhost/default#Resourse
genid:A10021 owl: cardinality 1
genid:A10022 rdf: type
http://www.w3.org/2002/07/owl#Restricti
on
http://localhost/default#Subjects rdf: subClassOf genid:A10022
genid:A10022 owl: onProperty http://localhost/default#Name_Subject
genid:A10022 owl: cardinality 1
38
Elementos RDF
Tripletas RDF