概要 この記事では、Microsoft Visioを用いたデータからRDF形式への変換プロセスと、特定のURI(今回は葛飾北斎の情報を含むジャパンサーチのURI)が指定された場合のRDFデータへの追加方法について説明します。変換プロセスを通じて、Visioで作成したデータをRDF形式で扱えるようにする手法を紹介し、さらに具体的な例として、葛飾北斎の情報を取り入れた結果を示します。
背景 以下の記事で、Microsoft Visioを使って作成したデータをRDFに変換する例を紹介しました。
今回は、URIが指定されていた場合、そのRDFデータを追加する処理を加えたので、その備忘録です。
サンプルデータ 今回は、ジャパンサーチで公開されている葛飾北斎のURIを指定しています。
処理結果 変換後のttlファイルは以下のようになりました。
@ @ @ @ @ @ f e < p p p p p p o x h r r r r r r a : t e e e e e e f B t f f f f f f : r r r r o o n O e f p r n n n n n n n r o i i i i i i P d d d d w w s B x o s d s s s s s s s d w x x x x x x e f f f f l l 2 : a : f 1 1 1 1 1 1 1 f l r s s s s : : : e t f / s : : : : : : : s : e f n n o r s o : : : : f d f e < t x y : / < : b d d i n " " " " " " " " " " " " " " " " " s u : s < < < < < < < < x o s s w d o w l c i s o i o q h e : p t j h l i e e m a か 前 前 前 前 勝 北 北 北 北 北 北 画 葛 葛 か カ u r i a h h h h h h h h : a 1 2 l f n l a o s u a s a u t r k e o p t a r a s a m つ 北 北 北 北 川 斉 斉 斎 斎 斎 斎 狂 飾 飾 つ ツ b l s m t t t t t t t t f : : : s : b m D b f j f i t m n p s t b t t c g e し 斎 斎 斎 斎 春 " 載 " 主 宗 為 人 北 卍 し シ j D e t t t t t t t t < : : a C e m e C : o : v p _ o f i e p e h h r e か " 卍 為 為 朗 @ 斗 @ 人 理 一 北 斎 老 か カ e < e A p p p p p p p p h < < < l l e f l A i P a : s w o c a s l D D i " 北 @ " 一 一 " j 改 j " " 卍 斎 " 人 c h f s : : : : : : : : t < h h h < r a n i a g n r l / t s a _ r : a a p < K 斎 j @ " 老 @ a 葛 a @ @ " " @ " ほ ホ t t i / t h t t t h d s " t n s e t o e / a f i c / " t t t h a " a j @ 人 j , 飾 , j j @ @ j @ く ク O t n < / p t t t t t f s P e s n W j n w t e : n h 葛 e e i t t @ , a j " a 為 a a j j a j さ サ f p e h d d e i j l w : t p p p t s e " d O t i e t w u x P t . j 飾 o t s j , a @ , 一 , , a a , a い イ s d t a b d d a o i w / p : : : p : ; r A B f t c C w s : e e g p 北 < < n p u a , j " , , , " " < : B t t p a . . d a w / : : C s y ; h t l . A r r o s 斎 h h s s , a @ @ @ h / y p a e n n d . f . e / / l o p < a w " l s e . e " t t " : h , j j j t / : . d . d b a . w x s w w / a n e f h f ; s 3 s i o s j a t t 1 / i a a a t j < b i s l p c i a x c w w w s " r o t o s . t c n t p r ; p p 7 / k , - - p p h / n a i . e r k m m h w w w s s a t a o a e / c s s 6 c a h k s s t c f . . g d i g i p l e . . w , ; o f p f n r b ; < e h : : 0 o , i a : e t o . o e o i d d l n m w w . n : : : s g l ; h n . / ? m r n / a p l f r d . a v a e s a 3 3 w . / O 1 / e t t g / - m H a a / r s l r g u j . 1 i t . . . . . 3 " ; / r : 2 " t i o j j 1 o o , j c : e / / / p 6 a a o c o o o . w g P 0 p t . p p 8 n k ; p h c a r s r 2 f . r o r r r o ; w a e 0 . s y j s s 4 s u s . / t r e a a g 6 o g m g g g r w n r 0 : / p e e 9 . s e g j i k s a u / > 6 r / / / / / g . i s / c / a a , w a a o p o : m t r , 9 g > f > 2 2 / w z 1 / h t r r i i r . s n u / h e 0 / o 0 0 2 3 a n 0 j n e c c 江 k " c j e . 1 r i / s 3 e a 0 0 0 . t , / p a r h h 戸 i @ h p a b 2 c d e o 3 n f 3 2 0 o i s s m m . . 時 m e . / r r 1 e n u 7 t / / / 0 r o w e e g g 代 e n g g c i 4 p t r 1 i 0 0 0 / g n a a t o o 後 d , o a h t 8 H e i c 7 t . 6 7 0 / , p r 葛 y . . 期 i . l . i / o r t e > y 1 / / 1 2 / c 飾 p j j の a j l g s c k s y , / / s o / 0 p h 北 e p p 浮 . p e o h b u o 葛 Q > w w r 0 i . 斎 / / / 世 o / r . m 1 s n 0 飾 5 - l d 3 m g > P e e 絵 r d y j u 2 a - 0 北 5 v # f / / o e n n 師 g a / p s 4 i i 2 斎 8 o > - 0 c . a r t t 。 / t n / e 9 > n 7 > 6 c s 1 o j s i i 姓 w a d e u 5 , s 0 , > a c / n p < o t t は i / l n m 4 t 3 b h g t / h n y y 川 k n - t . 8 i 3 - e e a e t > / / 村 i i x i o 1 t 1 s m o c n t t t 氏 / j b t r 4 u > t a / t t p ; i i 、 S 1 z y g # t , a # w # i s m m 幼 p 5 l / / a i t > g P t : e e 名 e - 6 c i b o u s e y / / / は c n V h d n s 8 r / / 1 1 時 i i V n u / / 4 s c j 7 8 太 a j O a p t 2 n _ o h p 6 4 郎 l l p m e > 2 s p n n s 0 9 、 : _ k e r , 6 # o > a e > > の F n h / s 7 > s m a ち i i j > o > # ; e r ; ; 鉄 l j z n , S / c 蔵 e l l ; - p 葛 h 。 P _ g i a 飾 . 通 a n > n t 北 g 称 t i s i 斎 o は h j ; t a > . 中 / l i l j 島 H _ t T p 八 o k u h / 右 k o t i t 衛 u t i n e 門 s e o g r 。 a n n > m 号 i g / , / は _ a 1 t 勝 p k 8 y 川 o u 2 p 春 r t 0 e 朗 t o > / 、 r u , A 宗 a g g 理 i o e 、 t u n 戴 _ h t 斗 w y > 、 h a , 為 i k 一 t k 、 e a 画 B _ 狂 a h 老 c a 人 k g 、 g a 卍 r j な o i ど u n 。 n m " d e . i ; p j n i g t ? e w n i _ d 0 t 0 h 0 = 2 3 9 5 1 0 7 > 2 > ; ; URIを介してRDFデータを追加しなかった場合のデータは以下です。以下と比較することで、foaf:Personや葛飾北斎に関するデータが追加されていることが確認できます。
...