|
From: HARUYAMA S. <har...@qu...> - 2002-12-04 10:44:25
|
RAA(http://www.ruby-lang.org/en/raa.html)の情報をCodeRidgeの内部表現に するテストプログラムを作成しました。 (微妙におかしい気がしますが) http://www.unixuser.org/%7Eharuyama/tmp/RAAInfo20021204.tar.bz2 *****README***** RAAの情報をCodeRidgeの内部表現に変換する ---------- 内容: RAAGetInfoFromName.java 指定した名前のソフトウェアの情報を その名前のファイル('/'は'_'に変更)に書き出す RAAのWSDL(下記)をAxisのWSDL2Javaしたクラス群と Axisのjarに依存 (% java RAAGetInfoFromName goRua) RAAInfoToUriAndTripleArray.java ファイルからRAA.Info形式のソフトウェアを 読みorg.fanal.coderidge.UriAndTripleArray に変換する。 上の加えて、FANAL,coderidge-soap,coderidge-rdf のjarに依存 (% java RAAInfoToUriAndTripleArray goRua) data/ RAAGetInfoFromName で得たいくつかのRAA.Infoなインスタンス ---------- CodeRidgeでは、ソフトウェア開発者にソフトウェアの情報を集めたRDFファイルを 用意してもらいこれを読みこんで検索に使用する。(内部での表現は N-Tripleである。) (参照: http://coderidge.org/doc/coderidge-rdf.pdf) 従来型のソフトウェアマップとの連携をする場合、そのソフトウェアマップでの 情報の表現をCodeRidgeの表現に変換する必要がある。 ソフトウェアの情報を加工しやすい形で提供しているソフトウェアマップには ・ RAA ・ Freshmeat があった。(他はまだ調査していない) * RAA Ruby Application Archive(RAA)はSOAPのインタフェイスやXML表現を提供している。 SOAPインタフェイスのWSDLが http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.1/ で得られる。 これをAxis(http://xml.apache.org/axis/)のWSDL2Javaで変換してJavaで利用することができる。 現在定義されているメソッドは ########## getAllListings() # => Array of String(product name) getProductTree() # => Hash(major category) of Hash(minor category) of Array of String(product name) getInfoFromCategory( Category|Struct::Category category ) # => Array of Info getModifiedInfoSince( Date|Time time ) # => Array of Info getInfoFromName( String name ) # => Info ########## で、動的にCodeRidgeの検索に組みこむのは難しい。適当なキャッシュをすることになるだろう。 ---------- org.ruby_lang.www.Infoの例 Owner: id: (int)249 name: HARUYAMA Seigo email: mailto:har...@un... Category: major: Application minor: WWW Product: id: (int)383 name: goRua version: 0.15 status: beta homepage: http://www.unixuser.org/%7Eharuyama/software/goRua/ download: http://www.unixuser.org/%7Eharuyama/software/goRua/ license:GPL description: goRua (Gtk+ on Ruby User Agent for 2ch) is the browser of the huge bbs, 2ch (http://www.2ch.net), and 2ch-like systems.? update: (java.util.Calendar) ---------- idや名前(の一部)の一意性はRAAが保ってくれると期待してよいだろうとして RAAInfoToUriAndTripleArray は次のような変換をしてみた。 (実際の変換結果は N-Triple.) * RAA.Owner -> http://coderidge.org/schemas/author/1.0# <rdf:Description about="urn:raa:owner(author?):(raa_id)"> ... * RAA.Category -> http://coderidge.org/schemas/category/1.0# <rdf:Description about="urn:category:internal:raa:Application/WWW"> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <!-- リソースにしたほうがよいか? --> <rdf:li parseType="Literal">Application</rdf:li> <rdf:li parseType="Literal">WWW</rdf:li> </http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> </http://www.w3.org/1999/02/22-rdf-syntax-ns#type> </rdf:Description> * RAA.Info、Product -> http://coderidge.org/schemas/core/1.0# <rdf:Description about="http://coderidge.org/registry/raa/(product_id)"> ... ---------- 変換結果 Tripleの配列 [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Author,urn:raa:owner:249] [urn:raa:owner:249,http://coderidge.org/schemas/author/1.0#Name,"HARUYAMA Seigo"] [urn:raa:owner:249,http://coderidge.org/schemas/author/1.0#Email,"mailto:har...@un..."] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Category,urn:category:internal:raa:Application/WWW] [urn:category:internal:raa:Application/WWW,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag] [urn:category:internal:raa:Application/WWW,http://www.w3.org/1999/02/22-rdf-syntax-ns#_1,"Application"] [urn:category:internal:raa:Application/WWW,http://www.w3.org/1999/02/22-rdf-syntax-ns#_2,"WWW"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Name,"goRua"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Version,"0.15"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Status,"beta"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Homepage,"http://www.unixuser.org/%7Eharuyama/software/goRua/"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Download,"http://www.unixuser.org/%7Eharuyama/software/goRua/"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#License,"GPL"] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#Description,"goRua (Gtk+ on Ruby User Agent for 2ch) is the browser of the huge bbs, 2ch (http://www.2ch.net), and 2ch-like systems. "] [http://coderidge.org/registry/raa/383,http://coderidge.org/schemas/core/1.0#UpdatedTime,"Wed Sep 11 01:33:13 JST 2002"] 見やすくしたもの: http://coderidge.org/schemas/core/1.0#Name: goRua http://coderidge.org/schemas/core/1.0#Author: urn:raa:owner:249 http://coderidge.org/schemas/core/1.0#Download: http://www.unixuser.org/%7Eharuyama/software/goRua/ http://coderidge.org/schemas/core/1.0#Status: beta http://coderidge.org/schemas/core/1.0#License: GPL http://coderidge.org/schemas/core/1.0#Homepage: http://www.unixuser.org/%7Eharuyama/software/goRua/ http://coderidge.org/schemas/core/1.0#Category: urn:category:internal:raa:Application/WWW http://coderidge.org/schemas/core/1.0#Description: goRua (Gtk+ on Ruby User Agent for 2ch) is the browser of the huge bbs, 2ch (http://www.2ch.net), and 2ch-like systems. http://coderidge.org/schemas/core/1.0#Version: 0.15 http://coderidge.org/schemas/core/1.0#UpdatedTime: Wed Sep 11 01:33:13 JST 2002 |