<foo:creator>
same as <bar:author>
?ID | Author | Title | Publisher | Year |
---|---|---|---|---|
ISBN 0-00-651409-X | id_xyz | The Glass Palace | id_qpr | 2000 |
ID | Name | Home page |
---|---|---|
id_xyz | Amitav Ghosh | http://www.amitavghosh.com/ |
ID | Publisher Name | City |
---|---|---|
id_qpr | Harper Collins | London |
ID | Titre | Auteur | Traducteur | Original |
---|---|---|---|---|
ISBN 2020386682 | Le Palais des miroirs | i_abc | i_qrs | ISBN 0-00-651409-X |
ID | Nom |
---|---|
i_abc | Amitav Ghosh |
i_qrs | Christiane Besse |
a:author
and f:auteur
should be the samea:author
same as f:auteur
http://www.example.org/original
(<http://…isbn…6682>, <http://…/original>, <http://…isbn…409X>)
http://www.example.org/file.xml#xpointer(id('home'))
http://www.example.org/file.html#home
<rdf:Description rdf:about="http://…/isbn/2020386682"> <f:titre xml:lang="fr">Le palais des mirroirs</f:titre> <f:original rdf:resource="http://…/isbn/000651409X"/> </rdf:Description>
(Note: namespaces are used to simplify the URI-s)
<http://…/isbn/2020386682> f:titre "Le palais des mirroirs"@fr; f:original <http://…/isbn/000651409X>.
rdf:ID
(essentially, defining a URI)<rdf:Description rdf:about="http://…/isbn/000651409X">
<a:publisher rdf:resource="#Thing"/>
</rdf:Description>
<rdf:Description rdf:ID="Thing">
<a:p_name>HarpersCollins</a:p_name>
<a:city>HarpersCollins</a:city>
</rdf:Description>
id
in HTML, SVG, … (i.e., it can be referred to with regular URI-s from the outside)<rdf:Description rdf:about="http://…/isbn/000651409X">
<a:publisher rdf:nodeID="A234"/>
</rdf:Description>
<rdf:Description rdf:nodeID="A234">
<a:p_name>HarpersCollins</a:p_name>
<a:city>HarpersCollins</a:city>
</rdf:Description>
<http://…/isbn/2020386682> a:publisher _:A234.
_:A234 a:p_name "HarpersCollins".
A234
is invisible from outside the file (it is not a “real” URI! ); it is an internal identifier for a resourcenodeID
internally (you do not
really care about the name…)<rdf:Description rdf:about="http://…/isbn/000651409X">
<a:publisher>
<rdf:Description>
<a:p_name>HarpersCollins</a:p_name>
…
</rdf:Description>
</a:publisherA>
</rdf:Description>
<http://…/isbn/000651409X> a:publisher [
a:p_name "HarpersCollins";
…
].
// create a model
Model model=new ModelMem();
Resource subject=model.createResource("URI_of_Subject")
// 'in' refers to the input file
model.read(new InputStreamReader(in));
StmtIterator iter=model.listStatements(subject,null,null);
while(iter.hasNext()) {
st = iter.next();
p = st.getProperty();
o = st.getObject();
do_something(p,o);
}
rdfs:Resource
, rdfs:Class
as nodes; rdf:type
, rdfs:subClassOf
as properties
<rdf:Description rdf:ID="Novel">
<rdf:type rdf:resource= "http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>
<rdf:Description rdf:about="http://…/isbn/000651409X">
<rdf:type rdf:resource="http://…/bookSchema.rdf#Novel"/>
</rdf:Description>
rdf:type
is just a property…rdf
predicate…(<http://…/isbn/000651409X> rdf:type #Fiction)
If:
uuu rdfs:subClassOf xxx .
vvv rdf:type uuu .
Then add:
vvv rdf:type xxx .
rdf:Property
)
(P rdfs:range C)
means:
P
is a propertyC
is a class instanceP
, the “object” must be an individual in C
P
, object C
, and property rdfs:range
In XML/RDF:
<rdfs:Property rdf:ID="title">
<rdf:domain rdf:resource="#Fiction"/>
<rdf:range rdf:resource="http://...#Literal"/>
</rdfs:Property>
In Turtle:
:title
rdf:type rdf:Property;
rdf:domain :Fiction;
rdf:range rdfs:Literal.
xml:lang
)<rdf:Description rdf:about="#Path">
<axsvg:algorithmUsed rdf:parseType="Literal">
<math xmlns="...">
<apply>
<laplacian/>
<ci>f</ci>
</apply>
</math>
</axsvg:algorithmUsed>
</rdf:Description/>
f:auteur
is a subproperty of a:author
and vice versa
rdfs:comment
, rdf:seeAlso
, rdf:value
StmtIterator iter=model.listStatements(subject,null,null);
while(iter.hasNext()) {
st = iter.next();
p = st.getProperty(); o = st.getObject();
do_something(p,o);
(a,b)
pair of resources, for which there is an x
such that (x parent a)
and (b brother x)
holds” (ie, return the uncles)StmtIterator iter=model.listStatements(subject,null,null);
while(iter.hasNext()) {
st = iter.next();
p = st.getProperty(); o = st.getObject();
do_something(p,o);
(subject,?p,?o)
is a pattern for what we are looking for (with ?p
and ?o
as “unknowns”)SELECT ?p ?o
WHERE {subject ?p ?o}
WHERE
define the graph pattern, with ?p
and ?o
“unbound” symbolsp,o
pairsSELECT ?isbn ?price ?currency # note: not ?x!
WHERE { ?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency. }
[[<..49X>,33,£], [<..49X>,50,€], [<..6682>,60,€], [<..6682>,78,$]]
SELECT ?isbn ?price ?currency
WHERE { ?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.
FILTER(?currency == €) }
[ [<..49X>,50,€], [<..6682>,60,€]]
<svg ...>
...
<metadata>
<rdf:RDF xmlns:rdf="http://../rdf-syntax-ns#">
...
</rdf:RDF>
</metadata>
...
</svg>
meta
elements<html xmlns="http://www.w3.org/1999/"> <head profile="http://www.w3.org/2003/g/data-view"> <title>Some Document</title> <link rel="transformation" href="http:…/dc-extract.xsl"/> <meta name="DC.Subject" content="Some subject"/> ... </head> ... <span class="date">2006-01-02</span> ... </html>
dc-extract.xsl
<rdf:Description rdf:about="…"> <dc:subject>Some subject</dc:subject> <dc:date>2006-01-02</dc:date> </rdf:Description>
dc-extract.xsl
and use its conventions (making use of the corresponding meta-s, class id-s, etc…)profile
attribute, a client is instructed to find and run the transformation processor automaticallyclass
in microformats, but via dedicated properties)<div about="http://uri.to.newsitem"> <span property="dc:date">March 23, 2004</span> <span property="dc:title">Rollers hit casino for £1.3m</span> By <span property="dc:creator">Steve Bird</span>. See <a href="http://www.a.b.c/d.avi" rel="dcmtype:MovingImage"> also video footage</a>… </div>
<http://uri.to.newsitem> dc:date "March 23, 2004"; dc:title "Rollers hit casino for £1.3m; dc:creator "Steve Bird"; dcmtype:MovingImage <http://www.a.b.c/d.avi>.
See the separate Wiki page collecting books
Come to my presentation tomorrow…
These slides are publicly available on:
http://www.w3.org/2007/Talks/0423-Stavanger-IH/
in XHTML and PDF formats; the XHTML version has active links that you can follow