加藤 文彦 fumihiro@sfc.keio.ac.jp / fumi@w3.org
2008/06/26
under a Creative Commons License
<a href="http://www.sfc.lib.keio.ac.jp/">湘南藤沢メディアセンター</a>
<a rel="library" href="http://www.sfc.lib.keio.ac.jp/">湘南藤沢メディアセンター</a>
<html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style.css" type="text/css" /> <link rel="next" href="2.html" /> <title>ほげほげ</title> </head>
<?xml version="1.0"?> <rdf:RDF xml:lang="ja" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:edu="http://example.org/education#"> <rdf:Description rdf:about="http://www.sfc.keio.ac.jp/"> <edu:hasFaculty>環境情報学部</edu:hasFaculty> </rdf:Description>
<?xml version="1.0"?> <rdf:RDF xml:lang="ja" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:edu="http://example.org/education#"> <rdf:Description rdf:about="http://www.sfc.keio.ac.jp/"> <edu:hasFaculty>環境情報学部</edu:hasFaculty> <edu:hasFaculty>総合政策学部</edu:hasFaculty> <edu:hasFaculty>看護医療学部</edu:hasFaculty> </rdf:Description>
<?xml version="1.0"?>
<rdf:RDF xml:lang="ja"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:edu="http://example.org/education#">
<rdf:Description rdf:about="http://www.sfc.keio.ac.jp/">
<edu:hasFaculty>
<rdf:Description rdf:about="http://www.sfc.keio.ac.jp/EnvironmentalInformation">
<edu:name>環境情報学部</edu:name>
<edu:dean>富田勝</edu:name>
</rdf:Description>
</edu:hasFaculty>
</rdf:Description>
<?xml version="1.0"?>
<rdf:RDF
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xml:lang="ja">
<channel rdf:about="http://www.sfc.keio.ac.jp/">
<title>SFC 新着情報</title>
<link>http://www.sfc.keio.ac.jp</link>
<description> SFC サイトの最新ニュース</description>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.sfc.keio.ac.jp/faculty/news/articles/20040630_1054_4285.html"/>
</rdf:Seq>
</items>
<item rdf:about="http://www.sfc.keio.ac.jp/students_soukan/news/articles/20040630_1054_4285.html">
<title>2007年度教育奨励基金採用者発表</title>
<link>http://www.sfc.keio.ac.jp/students_soukan/news/articles/20040630_1054_4285.html</link>
<description />
<dc:date>2007-07-04T18:15:00+09:00</dc:date>
</item>
</channel>
</rdf:RDF>
<rdf:RDF
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<foaf:Person>
<foaf:mbox rdf:resource="mailto:fumi@w3.org" />
<foaf:name>Fumihiro Kato</foaf:name>
<foaf:homepage rdf:resource="http://www.w3.org/People/fumi"/>
<foaf:knows>
<foaf:Person>
<foaf:name>Tatsuya Hagino</foaf:name>
<foaf:mbox rdf:resource="mailto:hagino@sfc.keio.ac.jp" />
<rdfs:seeAlso rdf:resource="http://www.tom.sfc.keio.ac.jp/~hagino/" />>
</foaf:Person>
</foaf:knows>
</foaf:Person>
</rdf:RDF>
PREFIX edu: <http://example.org/education#>
SELECT ?faculty
WHERE { <http://www.sfc.keio.ac.jp/> edu:Faculty ?faculty }
<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="faculty"/>
</head>
<results distinct="false" ordered="false">
<result>
<binding name="faculty"><uri>http://www.sfc.keio.ac.jp/EnvironmentalInformation</uri></binding>
</result>
<result>
<binding name="faculty"><uri>http://www.sfc.keio.ac.jp/PolicyManagement</uri></binding>
</result>
</results>
</sparql>
<rdf:Description rdf:about="http://www.sfc.keio.ac.jp/"> <rdf:type rdf:resource="http://example.org/education#Campus" </rdf:Desciprion> <rdf:Description rdf:about="http://www.sfc.keio.ac.jp/EnvironmentalInformation"> <rdf:type rdf:resource="http://example.org/education#Faculty" </rdf:Desciprion> <rdfs:Property rdf:about="http://example.org/education#hasFaculty"> <rdf:domain rdf:resource="http://example.org/education#Campus" <rdf:range rdf:resource="http://example.org/education#Faculty" </rdf:Desciprion>
<owl:Class rdf:about="http://example.org/education#Faculty"> <owl:equivalentClass rdf:resource="http://school.org/school#Department"/> </owl:Class>
<owl:Class rdf:about="http://example.org/education#Faculty"> <owl:disjointWith rdf:resource="http://school.org/school#GraduateSchool"/> </owl:Class>
<owl:Class rdf:about="http://example.org/education#Campus">
<owl:subClassOf>
<owl:Resriction>
<owl:onProperty rdf:resource="http://example.org/education#hasFaculty"/>
<owl:minCardinality>1</owl:minCardinality>
</owl:Resriction>
<owl:subClassOf>
</owl:Class>
<owl:ObjectProperty rdf:about="http://example.org/education#hasFaculty"> <owl:equivalentProperty rdf:resource="http://school.org/school#hasDepartment"/> </owl:ObjectProperty>
<owl:InverseFunctionalProperty rdf:about="http://example.org/education#studentNumber"> <rdfs:domain rdf:resource="http://example.org/education#Student"/> </owl:FunctionalProperty>
If an item is perishable and it is delivered to John more than 10 days after the scheduled delivery date then the item will be rejected by him.
Forall ?item ?deliverydate ?scheduledate ?diffdate
(
reject(John ?item) :-
And ( perishable(?item)
delivered(?item ?deliverydate John)
scheduled(?item ?scheduledate)
timediff(?diffdate ?deliverydate ?scheduledate)
greaterThan(?diffdate 10) )
)
<Ruleset>
<Forall>
<declare><Var>item</Var></declare>
<declare><Var>deliverydate</Var></declare>
<declare><Var>scheduledate</Var></declare>
<declare><Var>diffdate</Var></declare>
<formula>
<Implies>
<then>
<Uniterm>
<Const>reject</Const>
<Const>John</Const>
<Var>item</Var>
</Uniterm>
</then>
<if>
<And>
<Uniterm>
<Const>perishable</Const>
<Var>item</Var>
</Uniterm>
<Uniterm>
<Const>delivered</Const>
<Var>item</Var>
<Var>deliverydate</Var>
<Const>John</Const>
</Uniterm>
<Uniterm>
<Const>scheduled</Const>
<Var>item</Var>
<Var>scheduledate</Var>
</Uniterm>
<Uniterm>
<Const>timediff</Const>
<Var>diffdate</Var>
<Var>deliverydate</Var>
<Var>scheduledate</Var>
</Uniterm>
<Uniterm>
<Const>greaterThan</Const>
<Var>diffdate</Var>
<Const>10</Const>
</Uniterm>
</And>
</if>
</Implies>
</formula>
</Forall>
<Forall>
<declare><Var>item</Var></declare>
<formula>
<Implies>
<then>
<Uniterm>
<Const>reject</Const>
<Const>Fred</Const>
<Var>item</Var>
</Uniterm>
</then>
<if>
<Uniterm>
<Const>unsolicited</Const>
<Var>item</Var>
</Uniterm>
</if>
</Implies>
</formula>
</Forall>
</Ruleset>