<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Fumihiro Kato / 加藤 文彦 &#187; Web</title>
	<atom:link href="http://fumi.me/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://fumi.me</link>
	<description>Webやガジェット好き</description>
	<lastBuildDate>Tue, 27 Sep 2011 03:25:51 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/category/web/feed/" />
		<item>
		<title>Facebook Linked Data</title>
		<link>http://fumi.me/2011/09/27/facebook/</link>
		<comments>http://fumi.me/2011/09/27/facebook/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 03:25:51 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[LinkedData]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[Turtle]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=3007</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/09/27/facebook/&amp;text=Facebook Linked Data&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
LinkedData.jpに投げたのをこちらにも載せます． FacebookのOpen Graph Protocol (Web pageに埋め込むほう)は元々RDFaやMicroformatsから派生して作られていますが [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/09/27/facebook/&amp;text=Facebook Linked Data&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="Facebook Linked Data"  title="Facebook Linked Data image" /></a></div>
<p><a href="https://groups.google.com/d/topic/linkeddatajp/m_98n4kOJl8/discussion">LinkedData.jp</a>に投げたのをこちらにも載せます．</p>
<p>FacebookのOpen Graph Protocol (Web pageに埋め込むほう)は元々RDFaやMicroformatsから派生して作られていますが，今回のf8からの変更で，Open Graph API (グラフの情報を取得するほう)がJSONだけではなくてTurtleを返すようになりました．</p>
<p>例えば私のfacebookの情報はhttp://graph.facebook.com/fumihiroから取れます．</p>
<pre><code>% curl -H 'Accept: text/turtle' http://graph.facebook.com/fumihiro
@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
@prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; .
@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
@prefix api: &lt;tag:graph.facebook.com,2011:/&gt; .
@prefix og: &lt;http://ogp.me/ns#&gt; .
@prefix fb: &lt;http://ogp.me/ns/fb#&gt; .
@prefix : &lt;http://graph.facebook.com/schema/~/&gt; .
@prefix user: &lt;http://graph.facebook.com/schema/user#&gt; .
&lt;/1209165766#&gt;
       user:id "1209165766" ;
       user:name "Fumihiro Kato" ;
       user:first_name "Fumihiro" ;
       user:last_name "Kato" ;
       user:link &lt;http://www.facebook.com/fumihiro&gt; ;
       user:username "fumihiro" ;
       user:gender "male" ;
       user:locale "en_US" .
</code></pre>
<p><code>@base &lt;http://graph.facebook.com&gt; .</code>があったほうが良いとおもうのですが，そこらへんは修正されることを期待します．同じものをntriplesにしてみると，以下のようになります．こちらのほうがURIがはっきりしていてわかりやすいかもしれません．</p>
<pre><code>% rapper -i turtle -o ntriples 'http://graph.facebook.com/fumihiro'
rapper: Parsing URI http://graph.facebook.com/fumihiro# with parser turtle
rapper: Serializing with serializer ntriples
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#id&gt; "1209165766" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#name&gt; "Fumihiro Kato" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#first_name&gt; "Fumihiro" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#last_name&gt; "Kato" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#link&gt;
&lt;http://www.facebook.com/fumihiro&gt; .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#username&gt; "fumihiro" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#gender&gt; "male" .
&lt;http://graph.facebook.com/1209165766#&gt;
&lt;http://graph.facebook.com/schema/user#locale&gt; "en_US" .
rapper: Parsing returned 8 triples
</code>
</pre>
<p>f8でのもう一つの変更は，ページやアプリの作成者がActionとObjectを定義できるようになったことです．Actionは動作，Objectは対象物として，User =&gt; Action =&gt; Object という関係を取れるようになります．これは，今までのUser =&gt; Like =&gt; Page の関係が発展したものです．見ての通りこれはトリプルになります．今はまだ出していないですが，今後Turtleでこの関係が取れるようにしてくるでしょう．</p>
<p>schemaもrdfsでとれるようになっています．</p>
<p>ユーザのschema</p>
<pre><kbd>% curl -H 'Accept: text/turtle' 'http://graph.facebook.com/schema/user'</kbd></pre>
<p>ページのschema</p>
<pre><kbd>% curl -H 'Accept: text/turtle' 'http://graph.facebook.com/schema/page'</kbd></pre>
<p>また，もっと様々な付加情報が欲しい場合は，&#8217;?metadata=1&#8242;をつけると取れます．</p>
<pre><code>% curl -H 'Accept: text/turtle' 'http://graph.facebook.com/fumihiro?metadata=1'
&lt;/1209165766#&gt;
       user:home &lt;http://graph.facebook.com/fumihiro/home&gt; ;
       user:feed &lt;http://graph.facebook.com/fumihiro/feed&gt; ;
       user:friends &lt;http://graph.facebook.com/fumihiro/friends&gt; ;
       user:mutualfriends &lt;http://graph.facebook.com/fumihiro/mutualfriend&gt; ;
       user:family &lt;http://graph.facebook.com/fumihiro/family&gt; ;
......
</code>
</pre>
<p>但しこれらのURIの先はOAuth認証しないと取れないようになっています．</p>
<p>やはりすでに大量の人URIを持っているauthorityが提供し始めるとインパクトが違いますね．Twitterのメタデータ埋め込みがまったく音沙汰なくなっていて悲しいですが，Google+とかにも頑張ってもらいたいです．</p>
<p>色々試した画面キャプチャや参考リンクなどを<a href="https://plus.google.com/111432057975328893801/posts/XqnPHSSkrFx">Google+</a>にまとめています．</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Facebook Linked Data',url: 'http://fumi.me/2011/09/27/facebook/',contentID: 'post-3007',code: 'fumi',suggestTags: 'Facebook,LinkedData,RDF,Turtle',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="Facebook Linked Data image" alt="Facebook Linked Data" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/facebook/" title="Facebook" rel="tag">Facebook</a>, <a href="http://fumi.me/tag/linkeddata/" title="LinkedData" rel="tag">LinkedData</a>, <a href="http://fumi.me/tag/rdf/" title="RDF" rel="tag">RDF</a>, <a href="http://fumi.me/tag/turtle/" title="Turtle" rel="tag">Turtle</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2011/09/27/facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2011/09/27/facebook/" />
	</item>
		<item>
		<title>Learning SPARQL</title>
		<link>http://fumi.me/2011/07/19/learning-sparql/</link>
		<comments>http://fumi.me/2011/07/19/learning-sparql/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 10:53:55 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[LinkedData]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[LOD]]></category>
		<category><![CDATA[SemanticWeb]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2997</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/07/19/learning-sparql/&amp;text=Learning SPARQL&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
すでにEbookは販売されているのですが，O&#8217;reilly MediaからLearning SPARQLという本がでています．紙は7/22からのようです．一通り読みましたが，今のところ唯一のSPARQL解説本 [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/07/19/learning-sparql/&amp;text=Learning SPARQL&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="Learning SPARQL"  title="Learning SPARQL image" /></a></div>
<p>すでにEbookは販売されているのですが，<a href="http://oreilly.com/catalog/0636920020547/">O&#8217;reilly Media</a>からLearning SPARQLという本がでています．紙は7/22からのようです．一通り読みましたが，今のところ唯一のSPARQL解説本ですし，SPARQL1.1の細かい内容まで含んでいるのでお薦めです．<a href="http://www.amazon.co.jp/gp/product/4873114527/ref=as_li_ss_tl?ie=UTF8&#038;tag=torrydiary-22&#038;linkCode=as2&#038;camp=247&#038;creative=7399&#038;creativeASIN=4873114527">セマンティックWeb プログラミング</a><img src="http://www.assoc-amazon.jp/e/ir?t=&#038;l=as2&#038;o=9&#038;a=4873114527" width="1" height="1" border="0" alt="Learning SPARQL" style="border:none !important; margin:0px !important;" title="Learning SPARQL image" />ではSPARQLの話は少しでてくるだけでしたが，この本が補完してくれます．</p>
<p>既にWeb上では，SPARQLを使うことで政府データや音楽データ，生物データなどの多種多様なデータにアクセスできるようになっています．単なるWebAPIと異なるのは，SPARQLを一度覚えることで，SPARQLに対応しているサイトであればどこでも同じ仕組みでデータを使えるということです．他には複数のサイトからデータを取得してマージするときなどにメリットがあったりします．</p>
<p>日本でもすでに<a href="http://id.ndl.go.jp/auth/ndla">国立国会図書館典拠データ検索・提供サービス (Web NDL Authorities)</a>や<a href="http://allie.dbcls.jp/">DBCLSのAllie: A Search Service for Abbreviation / Long Form</a>，我々のプロジェクトである<a href="http://lod.ac">LODAC</a>など，SPARQL Endpointを持っているサイトがでてきています．これらのデータを使うためにSPARQLを勉強するには良い本だと思います．</p>
<p>ちなみに今週末開催の<a href="http://linkeddata.jp/2011/07/02/event/">第2回LinkedData勉強会</a>のメインテーマはSPARQLです．SPARQLに少しでも興味がありましたら是非ご参加ください．</p>
<p><iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=torrydiary-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=1449306594" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Learning SPARQL',url: 'http://fumi.me/2011/07/19/learning-sparql/',contentID: 'post-2997',code: 'fumi',suggestTags: 'Book,LinkedData,LOD,SemanticWeb,SPARQL',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="Learning SPARQL image" alt="Learning SPARQL" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/book/" title="Book" rel="tag">Book</a>, <a href="http://fumi.me/tag/linkeddata/" title="LinkedData" rel="tag">LinkedData</a>, <a href="http://fumi.me/tag/lod/" title="LOD" rel="tag">LOD</a>, <a href="http://fumi.me/tag/semanticweb/" title="SemanticWeb" rel="tag">SemanticWeb</a>, <a href="http://fumi.me/tag/sparql/" title="SPARQL" rel="tag">SPARQL</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2011/07/19/learning-sparql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2011/07/19/learning-sparql/" />
	</item>
		<item>
		<title>第1回 LinkedData勉強会</title>
		<link>http://fumi.me/2011/01/29/lodjp/</link>
		<comments>http://fumi.me/2011/01/29/lodjp/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 07:51:17 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[LOD]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2977</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/01/29/lodjp/&amp;text=第1回 LinkedData勉強会&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
先日LinkedDataの勉強会を企画して行いました．今回はLinked Dataに興味があるけどどうやったらいいのかわからないという疑問に答えを見つけるために，プログラミング以外の方法でLinked Dataを作成する [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2011/01/29/lodjp/&amp;text=第1回 LinkedData勉強会&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="第1回 LinkedData勉強会"  title="第1回 LinkedData勉強会 image" /></a></div>
<p>先日LinkedDataの勉強会を企画して行いました．今回はLinked Dataに興味があるけどどうやったらいいのかわからないという疑問に答えを見つけるために，プログラミング以外の方法でLinked Dataを作成するための支援ツールについて，有志に発表して頂きました．各発表資料は<a href="http://linkeddata.jp/2011/01/26/lodjp/">LinkedData.jpのページ</a>にまとめてあります．また，これを期にLinkedData.jp自体も少しずつ作り直しています．</p>
<p>個人の感想としては，Google Refineは今後データクリーニングをしたい人には必須のツールになるのではないかなと思いました．日本語がどの程度できるのかは未知なのですが，英語に関してはかなり良い精度でクリーニングできるようです．</p>
<p>これからは定期的に勉強会を開催していきたいと考えていますので，是非ご興味がある方はご参加ください．</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: '第1回 LinkedData勉強会',url: 'http://fumi.me/2011/01/29/lodjp/',contentID: 'post-2977',code: 'fumi',suggestTags: 'Event,LOD,SemanticWeb',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="第1回 LinkedData勉強会 image" alt="第1回 LinkedData勉強会" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/event/" title="Event" rel="tag">Event</a>, <a href="http://fumi.me/tag/lod/" title="LOD" rel="tag">LOD</a>, <a href="http://fumi.me/tag/semanticweb/" title="SemanticWeb" rel="tag">SemanticWeb</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2011/01/29/lodjp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2011/01/29/lodjp/" />
	</item>
		<item>
		<title>ORF2010</title>
		<link>http://fumi.me/2010/11/18/orf2010/</link>
		<comments>http://fumi.me/2010/11/18/orf2010/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 01:11:54 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ORF]]></category>
		<category><![CDATA[SFC]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2965</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/11/18/orf2010/&amp;text=ORF2010&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
ORFのサイトにはまだ掲載されていませんが，来週11/23(火祝) 10:30-11:00にORF2010 40Fカフェでトークセッションをすることになりました．午前中で且つ裏番組達が強力なのですが，Web技術，地域情報 [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/11/18/orf2010/&amp;text=ORF2010&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="ORF2010 "  title="ORF2010  image" /></a></div>
<p><a href="http://orf.sfc.keio.ac.jp/">ORFのサイト</a>にはまだ掲載されていませんが，来週11/23(火祝) 10:30-11:00に<a href="http://orf.sfc.keio.ac.jp/">ORF2010</a> 40Fカフェでトークセッションをすることになりました．午前中で且つ裏番組達が強力なのですが，Web技術，地域情報・コミュニティ，Open Governmentなどに興味がある方もそうでない方も是非お越しいただければ幸いです．入場費は無料です．</p>
<h4>Open Research Forum &#8220;And You?&#8221; AWA lab. セッション<br />
Linked Dataとコミュニティが拓くオープンガバメント</h4>
<ul>
<li>11/23(火・祝)10:30～11:00</li>
<li>場所：40カフェ</li>
<li>加藤文彦　SFC第9期生　情報システム研究機構 国立情報学研究所特任研究員 LinkedData.jp</li>
<li>小林巌生　Open Community Data Initiative/ 横浜Linked Open Data Project 主宰</li>
<li>司会：深見嘉明　政策・メディア研究科　次世代Web応用技術・ラボ　特別研究助教</li>
</ul>
<p>世界最大のドキュメントデータベースであるウェブ。そのウェブを、データ共有・活用のためのプラットフォームに進化させる技術、それがLinked Open Data(LOD)です。LODはオープンガバメント戦略の中で重要な技術として位置づけられており、イギリス・アメリカでは政府が積極的に取り組んでいます。</p>
<p>本セッションでは、SFC卒業生で国立情報学研究所にて学術情報のLOD化に尽力されている加藤文彦氏と、地域コミュニティの活性化をLODを通じて行う横浜Linked Open Data プロジェクトを主催する小林巌生氏を迎え、アカデミックコミュニティと地域コミュニティによるボトムアップでのオープンガバメントの実現への方策、課題について議論します。</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'ORF2010',url: 'http://fumi.me/2010/11/18/orf2010/',contentID: 'post-2965',code: 'fumi',suggestTags: 'ORF,SFC',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="ORF2010  image" alt="ORF2010 " />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/orf/" title="ORF" rel="tag">ORF</a>, <a href="http://fumi.me/tag/sfc/" title="SFC" rel="tag">SFC</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/11/18/orf2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/11/18/orf2010/" />
	</item>
		<item>
		<title>Virtuoso+OntoWiki</title>
		<link>http://fumi.me/2010/07/07/virtuosoontowiki/</link>
		<comments>http://fumi.me/2010/07/07/virtuosoontowiki/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:47:49 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[OntoWiki]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[Virtuoso]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2951</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/07/07/virtuosoontowiki/&amp;text=Virtuoso+OntoWiki&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
Twitterを見れば分かるとおり最近RDF Storeの調査をしているのですが、その過程でOntoWikiを使おうとして色々嵌っているので、ログを残しておきます。現在Ubuntu10.04での動作を確認しています。 V [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/07/07/virtuosoontowiki/&amp;text=Virtuoso+OntoWiki&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="Virtuoso+OntoWiki"  title="Virtuoso+OntoWiki image" /></a></div>
<p>Twitterを見れば分かるとおり最近RDF Storeの調査をしているのですが、その過程でOntoWikiを使おうとして色々嵌っているので、ログを残しておきます。現在Ubuntu10.04での動作を確認しています。</p>
<h3>Virtuosoのインストール</h3>
<p><a href="http://virtuoso.openlinksw.com/">Open Link Virtuoso</a>は複数のデータ形式を統合して扱えるデータベースです。RDF Triple/Quad Storeとしても使え、SPARQLにも対応しています。<a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/">Open Source版</a>とClosed Source版があり、Closed版ではClusterやSnapshoなどの追加機能があります。ここではOpen Source版を使います。</p>
<p>まず<a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/">Virtuoso Open Source Edition</a>のインストールです。Ubuntuのrepositoryにあるのが6.1.0で、これだと最新のOntoWikiが不具合起こすので、<a href="http://packages.debian.org/squeeze/virtuoso-opensource<br />
">debian squeeze</a>から最新のソースパッケージ持ってきて再構築しました。</p>
<pre><kbd>
$ wget http://ftp.de.debian.org/debian/pool/main/v/virtuoso-opensource/virtuoso-opensource_6.1.1+dfsg1-1.dsc
$ wget http://ftp.de.debian.org/debian/pool/main/v/virtuoso-opensource/virtuoso-opensource_6.1.1+dfsg1.orig.tar.gz
$ wget http://ftp.de.debian.org/debian/pool/main/v/virtuoso-opensource/virtuoso-opensource_6.1.1+dfsg1-1.diff.gz
$ dpkg-source -x virtuoso-opensource_6.1.1+dfsg1-1.dsc
$ cd virtuoso-opensource-6.1.1
</kbd></pre>
<p>再構築に必要なパッケージをインストールします。</p>
<pre><kbd>$ aptitude build-dep virtuoso-opensource
$ aptitude install quilt fakeroot
</kbd></pre>
<p>変更点はbuild formatを変えるだけです。changelogとかもそのままでbuildします。</p>
<pre><kbd>$ echo "3.0 (quilt)" >debian/source/format
$ debuild -us -uc
</kbd></pre>
<p>ライブラリが足りなければ適宜インストールしてください。もし問題がなければ、上のディレクトリに*.debができているのでインストールします。インストール時にデータベースのパスワードを聞かれるので設定します。</p>
<pre><kbd>$ dpkg -i ../*.deb</kbd></pre>
<p>次のコマンドで問題なく起動できればインストール完了です。</p>
<pre><kbd>$ /etc/init.d/virtuoso start</kbd></pre>
<h3>ODBCの設定 (要確認)</h3>
<p><strong>NOTE: この設定は必要ないかもしれないので要確認</strong></p>
<p>まずodbcinstをインストールします。</p>
<pre><kbd>$ aptitude install odbcinst odbcinst1debian1</kbd></pre>
<p>その後、<code>/etc/odbcinst.ini,odbc.ini</code>を以下のように作成します。</p>
<pre><kbd>- /etc/odbcinst.ini
[virtuoso-odbc]
Driver  = /usr/lib/odbc/virtodbc.so

- /etc/odbc.ini
[ODBC Data Sources]
VDS  = Virtuoso

[VDS]
Driver  = virtuoso-odbc
Description  = Virtuoso Open-Source Edition
ServerName  = localhost:1111

[VOS]
Driver  = /usr/lib/odbc/virtodbc.so
Description  = Virtuoso OpenSource Edition
Address = localhost:1111
</kbd></pre>
<h3>OntoWiki</h3>
<p><a href="http://ontowiki.net/">OntoWIki</a>はRDF用の閲覧・編集環境です。CMSと言ったほうがいいかもしれません。</p>
<p>とりあえずphp5とapacheの基本的な設定をしておく必要があります。解説を書いている方がたくさんいるので、やり方はググってください。一点追加で必要なのが、php5-odbcのインストールです。</p>
<pre><kbd>$ sudo aptitude install php5-odbc</kbd></pre>
<p>php5とapacheをインストールしたら、<a href="http://code.google.com/p/ontowiki/wiki/InstallFromMercurial">InstallFromMercurial</a>に書かれている通りに、レポジトリから最新のソースをインストールします。</p>
<pre><kbd>$ cd /var/www
$ hg clone https://ontowiki.googlecode.com/hg/ owrep
$ cd owrep/ontowiki/src/libraries
$ ln -s ../../../erfurt/src/Erfurt .
$ ln -s ../../../RDFauthor .

$ wget http://framework.zend.com/releases/ZendFramework-1.9.4/ZendFramework-1.9.4-minimal.tar.gz
$ tar xvzf ZendFramework-1.9.4-minimal.tar.gz
$ mv ZendFramework-1.9.4-minimal/library/Zend .
$ rm -rf ZendFramework-1.9.4-minimal.tar.gz ZendFramework-1.9.4-minimal

$ cd /var/www/owrep/ontowiki/src
$ cp htaccess-dist .htaccess
$ cp config.ini-dist config.ini
</kbd></pre>
<p>次に<a href="http://code.google.com/p/ontowiki/wiki/UsingOntoWikiWithVirtuoso">UsingOntoWikiWithVirtuoso</a>を参考にconfig.iniの設定をします。</p>
<pre><kbd>[private]
store.backend = virtuoso
store.virtuoso.dsn = VOS
store.virtuoso.username = dba
store.virtuoso.password = dba
</kbd></pre>
<p>その後OntoWikiに必要なディレクトリ作成します。</p>
<pre><kbd>
$ mkdir cache log uploads
$ chown www-data:www-data cache log uploads
</kbd></pre>
<p>Apacheの設定をします。そのままトップに置くのなら<code>/etc/apache2/sites-enabled/000-default</code>のDocumentRootと該当Directoryを変更します。</p>
<pre><kbd>DocumentRoot /var/www/owrep/ontowiki/src
&lt;Directory /var/www/owrep/ontowiki/src&gt;
</kbd></pre>
<p>Apacheを再起動した後、http://localhostにアクセスしてください。問題なければOntoWikiが表示されます。ユーザ名 Admin パスワードなしでログインすると管理画面になります。</p>
<h3>Conference Model Demo</h3>
<p><a href="http://ontowiki.net/Projects/OntoWiki/FirstSteps">FirstStep</a>にConferenceデータのデモの作り方がかかれています。注意する必要があるのは、もしlocalhost以外で動かす場合、Google Maps API Keyの設定が必要です。<a href="http://code.google.com/intl/ja/apis/maps/signup.html">API Key取得ページ</a>で生成した文字列を<code>ontowiki/extensions/components/map/component.ini</code>に設定します。</p>
<pre><kbd>- ontowiki/extensions/components/map/component.ini
apikey.google = "生成した文字列"
</kbd></pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Virtuoso+OntoWiki',url: 'http://fumi.me/2010/07/07/virtuosoontowiki/',contentID: 'post-2951',code: 'fumi',suggestTags: 'DB,OntoWiki,RDF,SPARQL,Ubuntu,Virtuoso',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="Virtuoso+OntoWiki image" alt="Virtuoso+OntoWiki" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/db/" title="DB" rel="tag">DB</a>, <a href="http://fumi.me/tag/ontowiki/" title="OntoWiki" rel="tag">OntoWiki</a>, <a href="http://fumi.me/tag/rdf/" title="RDF" rel="tag">RDF</a>, <a href="http://fumi.me/tag/sparql/" title="SPARQL" rel="tag">SPARQL</a>, <a href="http://fumi.me/tag/ubuntu/" title="Ubuntu" rel="tag">Ubuntu</a>, <a href="http://fumi.me/tag/virtuoso/" title="Virtuoso" rel="tag">Virtuoso</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/07/07/virtuosoontowiki/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/07/07/virtuosoontowiki/" />
	</item>
		<item>
		<title>セマンティックWebプログラミング</title>
		<link>http://fumi.me/2010/06/18/programming-the-semanticweb/</link>
		<comments>http://fumi.me/2010/06/18/programming-the-semanticweb/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 08:05:20 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[LOD]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2948</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/06/18/programming-the-semanticweb/&amp;text=セマンティックWebプログラミング&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
オライリーさんの&#8221;Programming the Semantic Web&#8221;を有志で監訳した本が6/26に出ます．サンプルコードは監訳者一同が結構書き直して動くようにしたので，試しながら読めます． [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/06/18/programming-the-semanticweb/&amp;text=セマンティックWebプログラミング&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="セマンティックWebプログラミング"  title="セマンティックWebプログラミング image" /></a></div>
<p>オライリーさんの&#8221;Programming the Semantic Web&#8221;を有志で監訳した本が6/26に出ます．サンプルコードは監訳者一同が結構書き直して動くようにしたので，試しながら読めます．言語はPythonなんですが，Linked Dataなど，現在Web上にあるデータをどうやって使うのかという話がメインなので，他の言語でも役立つはずです．よろしかったら是非．</p>
<div class="tmkm-amazon-view">
	<p><a href="http://www.amazon.co.jp/%E3%82%BB%E3%83%9E%E3%83%B3%E3%83%86%E3%82%A3%E3%83%83%E3%82%AFWeb-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0-Toby-Segaran/dp/4873114527%3FSubscriptionId%3DAKIAIAILLLDE7T4Q5BMQ%26tag%3Dtorrydiary-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4873114527"><img src="http://ecx.images-amazon.com/images/I/51cO20vg4bL._SL160_.jpg" border="0" alt="セマンティックWebプログラミング"  title="セマンティックWebプログラミング image" /></a></p>
	<p><a href="http://www.amazon.co.jp/%E3%82%BB%E3%83%9E%E3%83%B3%E3%83%86%E3%82%A3%E3%83%83%E3%82%AFWeb-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0-Toby-Segaran/dp/4873114527%3FSubscriptionId%3DAKIAIAILLLDE7T4Q5BMQ%26tag%3Dtorrydiary-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4873114527">セマンティックWeb プログラミング</a></p>
	<p><em>著者／訳者：</em>Toby Segaran Colin Evans Jamie Taylor </p>
	<p><em>出版社：</em>オライリージャパン( 2010-06-26 )</p>
	<p><em>定価：</em>￥ 3,360</p>
	<p><em>Amazon価格：</em>￥ 3,360</p>
	<p>大型本 ( 312 ページ )</p>
	<p>ISBN-10 : 4873114527</p>
	<p>ISBN-13 : 9784873114521</p>
<hr class="tmkm-amazon-clear" /></div>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'セマンティックWebプログラミング',url: 'http://fumi.me/2010/06/18/programming-the-semanticweb/',contentID: 'post-2948',code: 'fumi',suggestTags: 'Book,LOD,python,SemanticWeb',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="セマンティックWebプログラミング image" alt="セマンティックWebプログラミング" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/book/" title="Book" rel="tag">Book</a>, <a href="http://fumi.me/tag/lod/" title="LOD" rel="tag">LOD</a>, <a href="http://fumi.me/tag/python/" title="python" rel="tag">python</a>, <a href="http://fumi.me/tag/semanticweb/" title="SemanticWeb" rel="tag">SemanticWeb</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/06/18/programming-the-semanticweb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/06/18/programming-the-semanticweb/" />
	</item>
		<item>
		<title>Interop2010</title>
		<link>http://fumi.me/2010/06/16/interop2010/</link>
		<comments>http://fumi.me/2010/06/16/interop2010/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 01:35:03 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[LinkedData]]></category>
		<category><![CDATA[LOD]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2945</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/06/16/interop2010/&amp;text=Interop2010&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
しばらく慌ただしかったのでブログを書けずにいました．twitterでは報告済みなのですが，新しいプロジェクトを始めるために4月末で早々に前職を退職し，5月中旬から別の職場に転職しました．Interop2010のW3Cブー [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/06/16/interop2010/&amp;text=Interop2010&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="Interop2010"  title="Interop2010 image" /></a></div>
<p>しばらく慌ただしかったのでブログを書けずにいました．twitterでは報告済みなのですが，新しいプロジェクトを始めるために4月末で早々に前職を退職し，5月中旬から別の職場に転職しました．Interop2010のW3Cブースにて概要を話しましたので，紹介代わりにスライドを貼っておきます．</p>
<p>同時期にW3Cでも<a href="http://www.w3.org/2005/Incubator/lld/">Library Linked Data Incubator Group</a>が始まりました．1年時限付きのグループで，既存の事例集めや要求事項まとめなどが目標のようです．このプロジェクトからも取り敢えず数名参加しています．しかし，一度標準化の世界に関わるとどこ行っても関わることになっているような気がしてこの世界狭いなと．</p>
<div style="width:425px" id="__ss_4471068"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/fumihiro/web-4471068" title="学術資源のためのオープン・ ソーシャル・セマンティックWeb プラットホームプロジェクト">学術資源のためのオープン・ ソーシャル・セマンティックWeb プラットホームプロジェクト</a></strong><object id="__sse4471068" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=interop2010-100610235308-phpapp02&#038;stripped_title=web-4471068" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4471068" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=interop2010-100610235308-phpapp02&#038;stripped_title=web-4471068" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fumihiro">Fumihiro Kato</a>.</div>
</div>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Interop2010',url: 'http://fumi.me/2010/06/16/interop2010/',contentID: 'post-2945',code: 'fumi',suggestTags: 'Academic,Library,LinkedData,LOD',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="Interop2010 image" alt="Interop2010" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/academic/" title="Academic" rel="tag">Academic</a>, <a href="http://fumi.me/tag/library/" title="Library" rel="tag">Library</a>, <a href="http://fumi.me/tag/linkeddata/" title="LinkedData" rel="tag">LinkedData</a>, <a href="http://fumi.me/tag/lod/" title="LOD" rel="tag">LOD</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/06/16/interop2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/06/16/interop2010/" />
	</item>
		<item>
		<title>Webを支える技術</title>
		<link>http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/</link>
		<comments>http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 07:58:43 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[URI]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2891</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/&amp;text=Webを支える技術&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
Webを支える技術 &#8211; HTTP､URI､HTML､そしてREST Amazonで予約して購入していたのですが，やっと読みました．Webアーキテクチャや基礎技術についてのとても良い教科書だと思います．去年まで [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/&amp;text=Webを支える技術&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="Webを支える技術"  title="Webを支える技術 image" /></a></div>
<div class="hreview">
<h2 class="item"><span class="fn">Webを支える技術 &#8211; HTTP､URI､HTML､そしてREST</span></h2>
<div class="description">
<p>Amazonで予約して購入していたのですが，やっと読みました．Webアーキテクチャや基礎技術についてのとても良い教科書だと思います．去年まで3年ほど分散情報システム構成法という講義を何人かで担当していましたが，この講義の最初の数回分の教科書として使えます．</p>
<p>15-17章の<a href="http://zip.ricollab.jp/">郵便番号検索サービス</a>はcontent-negotiationでRDFも返してくれると嬉しいなと思いましたが無理ですかね?ここでも読み仮名語彙問題はでてくるのですが．</p>
<p>後，この本読んだ後には<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web, Volume One</a>を読むのがお勧めです．</p>
</div>
</div>
<div class="tmkm-amazon-view">
	<p><a href="http://www.amazon.co.jp/Web%E3%82%92%E6%94%AF%E3%81%88%E3%82%8B%E6%8A%80%E8%A1%93-HTTP%E3%80%81URI%E3%80%81HTML%E3%80%81%E3%81%9D%E3%81%97%E3%81%A6REST-WEB-PRESS-plus/dp/4774142042%3FSubscriptionId%3DAKIAIAILLLDE7T4Q5BMQ%26tag%3Dtorrydiary-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4774142042"><img src="http://ecx.images-amazon.com/images/I/51qo6pgjaSL._SL160_.jpg" border="0" alt="Webを支える技術"  title="Webを支える技術 image" /></a></p>
	<p><a href="http://www.amazon.co.jp/Web%E3%82%92%E6%94%AF%E3%81%88%E3%82%8B%E6%8A%80%E8%A1%93-HTTP%E3%80%81URI%E3%80%81HTML%E3%80%81%E3%81%9D%E3%81%97%E3%81%A6REST-WEB-PRESS-plus/dp/4774142042%3FSubscriptionId%3DAKIAIAILLLDE7T4Q5BMQ%26tag%3Dtorrydiary-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4774142042">Webを支える技術 -HTTP、URI、HTML、そしてREST (WEB+DB PRESS plus)</a></p>
	<p><em>著者／訳者：</em>山本 陽平</p>
	<p><em>出版社：</em>技術評論社( 2010-04-08 )</p>
	<p><em>定価：</em>￥ 2,699</p>
	<p><em>Amazon価格：</em>￥ 2,699</p>
	<p>単行本（ソフトカバー） ( 400 ページ )</p>
	<p>ISBN-10 : 4774142042</p>
	<p>ISBN-13 : 9784774142043</p>
<hr class="tmkm-amazon-clear" /></div>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Webを支える技術',url: 'http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/',contentID: 'post-2891',code: 'fumi',suggestTags: 'Book,HTML,HTTP,REST,URI,Web',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="Webを支える技術 image" alt="Webを支える技術" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/book/" title="Book" rel="tag">Book</a>, <a href="http://fumi.me/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://fumi.me/tag/http/" title="HTTP" rel="tag">HTTP</a>, <a href="http://fumi.me/tag/rest/" title="REST" rel="tag">REST</a>, <a href="http://fumi.me/tag/uri/" title="URI" rel="tag">URI</a>, <a href="http://fumi.me/tag/web/" title="Web" rel="tag">Web</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/04/27/web%e3%82%92%e6%94%af%e3%81%88%e3%82%8b%e6%8a%80%e8%a1%93/" />
	</item>
		<item>
		<title>LinkedData.jp &#8211; Google Groups</title>
		<link>http://fumi.me/2010/04/25/linkeddata-jp/</link>
		<comments>http://fumi.me/2010/04/25/linkeddata-jp/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 14:34:38 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[LOD]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2888</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/25/linkeddata-jp/&amp;text=LinkedData.jp &#8211; Google Groups&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
今日有志でSemweb&#38;LOD勉強会を行いました．そこでとりあえず日本語で議論できる場所が必要ということになったため，Google GroupsにLinkedData.jpというグループを作りました．Linked [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/25/linkeddata-jp/&amp;text=LinkedData.jp &#8211; Google Groups&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="LinkedData.jp   Google Groups"  title="LinkedData.jp   Google Groups image" /></a></div>
<p>今日有志でSemweb&amp;LOD勉強会を行いました．そこでとりあえず日本語で議論できる場所が必要ということになったため，Google Groupsに<a href="http://groups.google.com/group/linkeddatajp?hl=en">LinkedData.jp</a>というグループを作りました．LinkedDataやSemantic Webについて議論したり開発したりする場になれば良いなと思っています．ご興味のある方は是非ご参加下さい．</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'LinkedData.jp &amp;#8211; Google Groups',url: 'http://fumi.me/2010/04/25/linkeddata-jp/',contentID: 'post-2888',code: 'fumi',suggestTags: 'Event,LOD,SemanticWeb',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="LinkedData.jp   Google Groups image" alt="LinkedData.jp   Google Groups" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/event/" title="Event" rel="tag">Event</a>, <a href="http://fumi.me/tag/lod/" title="LOD" rel="tag">LOD</a>, <a href="http://fumi.me/tag/semanticweb/" title="SemanticWeb" rel="tag">SemanticWeb</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/04/25/linkeddata-jp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/04/25/linkeddata-jp/" />
	</item>
		<item>
		<title>RDF.rb</title>
		<link>http://fumi.me/2010/04/22/rdf-rb/</link>
		<comments>http://fumi.me/2010/04/22/rdf-rb/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:58:10 +0000</pubDate>
		<dc:creator>fumi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SemanticWeb]]></category>
		<category><![CDATA[LinkedData]]></category>
		<category><![CDATA[RDF]]></category>

		<guid isPermaLink="false">http://fumi.me/?p=2876</guid>
		<description><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/22/rdf-rb/&amp;text=RDF.rb&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="" /></a></div>
RubyからRDFを使うライブラリをいくつか紹介してきましたが，最近急ピッチで開発されているRDF.rbが本命になりそうです．まだSPARQLは使えず，基本的なことしかできませんが，やっとどれを使ったらいいのかよくわから [...]]]></description>
			<content:encoded><![CDATA[
<div class="twitterbutton" style="float: left; padding-right: 5px;"><a href="http://twitter.com/share?url=http://fumi.me/2010/04/22/rdf-rb/&amp;text=RDF.rb&amp;via=fumi1&amp;related=DolcePixel"><img align="left" src="http://fumi.me/wp-content/plugins//easy-twitter-button/i/buttons/en/tweetn.png" style="border: none;" alt="RDF.rb"  title="RDF.rb image" /></a></div>
<p>RubyからRDFを使うライブラリをいくつか紹介してきましたが，最近急ピッチで開発されているRDF.rbが本命になりそうです．まだSPARQLは使えず，基本的なことしかできませんが，やっとどれを使ったらいいのかよくわからないという状況が変わりそうです．</p>
<p>ちゃんとした紹介を日本語で書こうと思っていたら，作者達が良くできたチュートリアルを書いてくれたので，それを翻訳することにしました．とりあえずここに置いておくことにします．</p>
<h3>RubyによるRDFデータの解析と永続化 (Parsing and Serializing RDF Data with Ruby)</h3>
<p><a href="http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby">original text</a> 2010/04/21 by Arto</p>
<p>このチュートリアルでは、<a href="http://ruby-lang.org/">Ruby</a>用のライブラリ<a href="http://blog.datagraph.org/2010/03/rdf-for-ruby">RDF.rb</a>を使った<a href="http://www.w3.org/RDF/">RDF</a>データの解析と永続化の方法を学びます。RDFを基礎とした<a href="http://linkeddata.org/">Linked Data</a>の永続化形式には色々ありますが、RDF.rbでは多くの形式が使えます。</p>
<p>このチュートリアルに沿ってコード例を試すには、Rubyと<a href="http://rubygems.org/">Rubygems</a>だけが必要です。最近のRuby 1.8.xや1.9.x、またはJRuby1.4.0以上なら動きます。</p>
<h4>サポートしているRDF形式</h4>
<p>現在RDF.rbで解析や永続化できるRDF形式は以下の通りです。</p>
<pre><code>
形式        | 実装                  | RubyGems gem
------------|-----------------------|-------------
N-Triples   | RDF::NTriples         | rdf
Turtle      | RDF::Raptor::Turtle   | rdf-raptor
RDF/XML     | RDF::Raptor::RDFXML   | rdf-raptor
RDF/JSON    | RDF::JSON             | rdf-json
TriX        | RDF::TriX             | rdf-trix
</code></pre>
<p>RDF.rb自体は比較的軽量なgemで、<a href="http://blog.datagraph.org/2010/03/grepping-ntriples">N-Triples</a>形式のみビルトインでサポートしています。その他の形式については<a href="http://rdf.rubyforge.org/raptor/"><code>RDF::Raptor</code></a>, <a href="http://rdf.rubyforge.org/json/"><code>RDF::JSON</code></a>, <a href="http://rdf.rubyforge.org/trix/"><code>RDF::TriX</code></a>のようなプラグインとして、個別のgemにパッケージ化されています。このアプローチによって、コアライブラリを他から切り離して、RDF.rb自体がいかなるXMLやJSONパーサへの依存しないようにしています。</p>
<p>これら全ての形式サポートを一度に簡単にインストールできます。</p>
<pre><code>$ sudo gem install rdf rdf-raptor rdf-json rdf-trix
Successfully installed rdf-0.1.9
Successfully installed rdf-raptor-0.2.1
Successfully installed rdf-json-0.1.0
Successfully installed rdf-trix-0.0.3
4 gems installed
</code></pre>
<p>注: <code>RDF::Raptor</code> gemは<a href="http:///librdf.org/raptor/">Raptor RDF Parser</a> ライブラリとそのコマンドラインツールがシステムにインストールされている必要があります。MacやLinux, BSDディストリビューションのための簡単なRaptorのインストール方法は以下の通りです。</p>
<pre><code>$ sudo port install raptor             # Mac OS X with MacPorts
$ sudo fink install raptor-bin         # Mac OS X with Fink
$ sudo aptitude install raptor-utils   # Ubuntu / Debian
$ sudo yum install raptor              # Fedora / CentOS / RHEL
$ sudo zypper install raptor           # openSUSE
$ sudo emerge raptor                   # Gentoo Linux
$ sudo pkg_add -r raptor               # FreeBSD
$ sudo pkg_add raptor                  # OpenBSD / NetBSD
</code></pre>
<p>Raptorのインストールや使用方法についての更なる情報は、我々の以前のチュートリアル <a href="http://blog.datagraph.org/2010/04/transmuting-ntriples">RDF for Intrepid Unix Hackers: Trasmuting N-Triples</a>を見てください。</p>
<h4>RDFデータの読み込み</h4>
<p>もしあなたが急いでいて、すぐにRDFデータの正しい読み込み方を知りたいのなら、あなたが知る必要があることは本当に以下だけです。</p>
<pre><code>require 'rdf'
require 'rdf/ntriples'

graph = RDF::Graph.load("http://datagraph.org/jhacker/foaf.nt")
</code></pre>
<p>この例では、まずはじめにRDF.rbとN-Triples形式のサポートを読み込んでいます。その後、<a href="http://rdf.rubyforge.org/RDF/Graph.html"><code>RDF::Graph</code></a>クラスの便利なメソッドを使って、RDFデータを一度に直接ウェブURLから取得して解析します。(loadメソッドはファイル名かURLを受け付けます。)</p>
<p>全てのRDF.rbパーサプラグインは、処理可能なMIMEタイプとファイル拡張子を宣言します。それが、上の例でRDF.rbが、与えられたURLにあるfoaf.ntファイルを読むためのN-Triplesパーサのインスタンスの作り方を知っている理由です。</p>
<p>同じ方法で、RDF.rbは他のいかなるRDFファイル形式を自動検知します。そのためには、以下のどれかを使って形式のサポートを読み込めば良いです。</p>
<pre><code>
require 'rdf/ntriples' # Support for N-Triples (.nt)
require 'rdf/raptor'   # Support for RDF/XML (.rdf) and Turtle (.ttl)
require 'rdf/json'     # Support for RDF/JSON (.json)
require 'rdf/trix'     # Support for TriX (.xml)
</code></pre>
<p>注: もし複数の名前付きグラフを含むRDFファイル(TriXのように名前付きグラフをサポートする永続化形式)を読む必要があるなら、おそらくRDF::Graphの代わりに<a href="http://rdf.rubyforge.org/RDF/Repository.html">RDF::Repository</a>を使いたいでしょう。</p>
<pre><code>
repository = RDF::Repository.load("http://datagraph.org/jhacker/foaf.nt")
</code></pre>
<p>この2つの違いは、<code>RDF::Repository</code>インスタンス内のRDF文が、オプションとしてcontextを含められることです(すなわち4つ組(quad)になれます)。<code>RDF::Graph</code>インスタンスのRDF文は常に同じcontextとなります(すなわちこれらは3つ組(triple)です)。言い換えると、レポジトリは一つ以上のグラフを含み、以下のようにアクセスできます。</p>
<pre><code>repository.each_graph do |graph|
  puts graph.inspect
end
</code></pre>
<h4>RDF形式の内部処理</h4>
<p>RDF.rbの解析や永続化APIは以下の3つの基底クラスを基にしています。</p>
<ul>
<li><a href="http://rdf.rubyforge.org/RDF/Format.html">RDF::Format</a>は特定のRDF永続化形式を記述するために使われます。</li>
<li><a href="http://rdf.rubyforge.org/RDF/Reader.html">RDF::Reader</a>RDFパーサ実装用の基底クラスです。</li>
<li><a href="http://rdf.rubyforge.org/RDF/Writer.html">RDF::Writer</a>RDF永続化実装用の基底クラスです。</li>
</ul>
<p>もしあなたが解析や永続化をしたいファイル形式について何か知っているなら、形式指定用のクラスを以下の何れかの方法で取得できます。</p>
<pre><code>require 'rdf/raptor'

RDF::Format.for(:rdfxml)       #=> RDF::Raptor::RDFXML::Format
RDF::Format.for("input.rdf")
RDF::Format.for(:file_name      => "input.rdf")
RDF::Format.for(:file_extension => "rdf")
RDF::Format.for(:content_type   => "application/rdf+xml")
</code></pre>
<p>一度そのような形式指定用のクラスを持てば、そこから解析/永続化実装を取得可能です。</p>
<pre><code>format = RDF::Format.for("input.nt")   #=> RDF::NTriples::Format
reader = format.reader                 #=> RDF::NTriples::Reader
writer = format.writer                 #=> RDF::NTriples::Writer
</code></pre>
<p>また、RDF::ReaderとRDF::Writerにも、直接対応するファクトリメソッドがあります。</p>
<pre><code>reader = RDF::Reader.for("input.nt")   #=> RDF::NTriples::Reader
writer = RDF::Writer.for("output.nt")  #=> RDF::NTriples::Writer
</code></pre>
<p>以上が、URLやファイル名をRDF::Graph.loadに渡したときに、RDF.rbが正しい解析実装を得るために内部で依存するものです。もちろん、永続化形式を自動検出して、解析や永続化用の適切な実装クラスに委譲する必要がある、他のいかなるメソッドも同様です。</p>
<h4>RDFデータの解析</h4>
<p>もし、より明示的にRDFデータの解析、例えばデータセットをメモリに読み込めないので文毎に処理したい、ということをする必要があるのなら、<a href="http://rdf.rubyforge.org/RDF/Reader.html"><code>RDF::Reader</code></a>を直接使う必要があります。</p>
<h5>ファイルからRDF文を解析</h5>
<p>RDFパーサ実装は一般的に<a href="http://rdf.rubyforge.org/RDF/Enumerable.html"><code>RDF::Enumerable</code></a>インタフェースのストリーミング互換なサブセットをサポートします。これは<code>#each_statement</code>メソッドを基にしています。以下はRDFファイルを文毎に列挙しながら読み込む方法です。</p>
<pre><code>require 'rdf/raptor'

RDF::Reader.open("foaf.rdf") do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end
</code></pre>
<p><code>RDF::Reader.open</code>をRubyブロックと一緒に使うことで、入力ファイルが処理後に自動的に閉じられることが保障されます。</p>
<h5>URLからRDF文を解析</h5>
<p>前の通り、ファイル名を使えていた場所全てで<code>http://</code>や<code>https://</code>のURLを使えます。</p>
<pre><code>require 'rdf/json'

RDF::Reader.open("http://datagraph.org/jhacker/foaf.json") do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end
</code></pre>
<h5>文字列からRDF文を解析</h5>
<p>時々、すでにメモリバッファ上のどこかに永続化されたRDFコンテンツを持っているときがあります。例えばデータベースから取得した場合です。そのような場合、前に示したパーサ実装を取得して、その後<code>RDF::Reader.new</code>を直接使います。</p>
<pre><code>require 'rdf/ntriples'

input = open('http://datagraph.org/jhacker/foaf.nt').read

RDF::Reader.for(:ntriples).new(input) do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end
</code></pre>
<p><code>RDF::Reader</code>コンストラクタはダックタイピングを使用しているので、<code>#readline</code>メソッドに応答するいかなる入力(例えば<code>IO</code>や<code>StringIO</code>オブジェクト)を受け付けます。もし入力の引数が何も与えられないときは、入力データはデフォルトで標準入力から読み込まれます。</p>
<h4>RDFデータの永続化</h4>
<p>RDFデータの永続化は解析とほとんど同様です。名前付きの出力ファイルに永続化されるとき、与えられたファイル拡張子によって正しい永続化実装がファイル拡張子によって自動検出されます。</p>
<h5>出力ファイルにRDF文を永続化する</h5>
<p>RDF永続化実装は一般的に<a href="http://rdf.rubyforge.org/RDF/Mutable.html"><code>RDF::Mutable</code></a>インタフェースのサブセットであり、追加だけ可能です。主に<code>#insert</code>メソッドとそのエイリアス<code>#&lt;&lt;</code>が対応します。以下がRDFファイルに文毎に出力する方法です。</p>
<pre><code>require 'rdf/ntriples'
require 'rdf/raptor'

data = RDF::Graph.load("http://datagraph.org/jhacker/foaf.nt")

RDF::Writer.open("output.rdf") do |writer|
  data.each_statement do |statement|
    writer << statement
  end
end
</code></pre>
<p>またですが、<code>RDF::Writer.open</code>をRubyブロックと一緒に使うことで、処理後に出力ファイルが自動的にフラッシュされ閉じられることが保障されています。</p>
<h5>RDF文を文字列結果に永続化</h5>
<p>ある共通のユースケースは、文字列バッファにRDFグラフを永続化することです。例えば<a href="http://www.rubyonrails.org/">Rails</a>アプリケーションからRDFデータを供給するときです。<code>RDF::Writer</code>には便利な<code>buffer</code>クラスメソッドがあり、<code>StringIO</code>に出力を溜め込んで最後に文字列として返してくれます。</p>
<pre><code>require 'rdf/ntriples'

output = RDF::Writer.for(:ntriples).buffer do |writer|
  subject = RDF::Node.new
  writer << [subject, RDF.type, RDF::FOAF.Person]
  writer << [subject, RDF::FOAF.name, "J. Random Hacker"]
  writer << [subject, RDF::FOAF.mbox, RDF::URI("mailto:jhacker@example.org")]
  writer << [subject, RDF::FOAF.nick, "jhacker"]
end
</code></pre>
<h5>永続化出力をカスタマイズ</h5>
<p>もし特定の永続化実装が名前空間接頭辞宣言や基底URIのようなオプションをサポートしているなら、これらのオプションを<code>RDF::Writer.open</code>や<code>RDF::Writer.new</code>にキーワード引数として与えることで指定できます。</p>
<pre><code>RDF::Writer.open("output.ttl", :base_uri => "http://rdf.rubyforge.org/")
RDF::Writer.for(:rdfxml).new($stdout, :base_uri => "http://rdf.rubyforge.org/")
</code></pre>
<h4>サポートチャンネル</h4>
<p>皆さん、今はこれで終わりです。このチュートリル以上のAPIについての情報は、RDF.rb <a href="http://rdf.rubyforge.org/">API文書</a>を参照してください。何か質問があれば、<a href="http://swig.xmlhack.com/">#swig</a>か <a href="http://lists.w3.org/Archives/Public/public-rdf-ruby/">public-rdf-ruby@w3.org</a>メーリングリストで遠慮なく聞いて下さい。</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'RDF.rb',url: 'http://fumi.me/2010/04/22/rdf-rb/',contentID: 'post-2876',code: 'fumi',suggestTags: 'LinkedData,Programming,RDF,Ruby,SemanticWeb',providerName: 'Fumihiro Kato / 加藤 文彦',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-jp.png" class="evernoteSiteMemoryButton" title="RDF.rb image" alt="RDF.rb" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>
	Tags: <a href="http://fumi.me/tag/linkeddata/" title="LinkedData" rel="tag">LinkedData</a>, <a href="http://fumi.me/tag/programming/" title="Programming" rel="tag">Programming</a>, <a href="http://fumi.me/tag/rdf/" title="RDF" rel="tag">RDF</a>, <a href="http://fumi.me/tag/ruby/" title="Ruby" rel="tag">Ruby</a>, <a href="http://fumi.me/tag/semanticweb/" title="SemanticWeb" rel="tag">SemanticWeb</a><br />
]]></content:encoded>
			<wfw:commentRss>http://fumi.me/2010/04/22/rdf-rb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://fumi.me/2010/04/22/rdf-rb/" />
	</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
