<?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/"
	>

<channel>
	<title>Erix Lab</title>
	<atom:link href="http://eriman.blog.qrobo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriman.blog.qrobo.com</link>
	<description>Just another QroboPress weblog</description>
	<lastBuildDate>Thu, 11 Jun 2009 12:07:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>항소심서 &#8220;티맥스서 개작&#8221; 판결… 손해배상ㆍ배포금지는 기각</title>
		<link>http://eriman.blog.qrobo.com/2009/06/11/%ed%95%ad%ec%86%8c%ec%8b%ac%ec%84%9c-%ed%8b%b0%eb%a7%a5%ec%8a%a4%ec%84%9c-%ea%b0%9c%ec%9e%91-%ed%8c%90%ea%b2%b0%e2%80%a6-%ec%86%90%ed%95%b4%eb%b0%b0%ec%83%81%e3%86%8d%eb%b0%b0%ed%8f%ac%ea%b8%88/</link>
		<comments>http://eriman.blog.qrobo.com/2009/06/11/%ed%95%ad%ec%86%8c%ec%8b%ac%ec%84%9c-%ed%8b%b0%eb%a7%a5%ec%8a%a4%ec%84%9c-%ea%b0%9c%ec%9e%91-%ed%8c%90%ea%b2%b0%e2%80%a6-%ec%86%90%ed%95%b4%eb%b0%b0%ec%83%81%e3%86%8d%eb%b0%b0%ed%8f%ac%ea%b8%88/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:21:56 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[Programing]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=102</guid>
		<description><![CDATA[지난 2004년 말 시작된 이번 소송은 티맥스소프트의 제품이 FNS사의 제품을 개작, 즉 소스코드를 도용했는 지가 핵심으로, 1심에서  프로뱅크의 개작이 인정된 이후 이번 2심에서는 프로프레임까지 개작한 것으로 판결해 재판부는 사실상 큐로컴과 FNS의 손을  들어줬다.
이번 판결에는 티맥스소프트가 두 제품의 자체개발 근거 자료를 충분히 제시하지 못한 것이 주요 요인이었던 것으로 알려졌다.  또한 티맥스소프트 제품 소스코드에 [...]]]></description>
			<content:encoded><![CDATA[<p><span>지난 2004년 말 시작된 이번 소송은 티맥스소프트의 제품이 FNS사의 제품을 개작, 즉 소스코드를 도용했는 지가 핵심으로, 1심에서  프로뱅크의 개작이 인정된 이후 이번 2심에서는 프로프레임까지 개작한 것으로 판결해 재판부는 사실상 큐로컴과 FNS의 손을  들어줬다.</p>
<p>이번 판결에는 티맥스소프트가 두 제품의 자체개발 근거 자료를 충분히 제시하지 못한 것이 주요 요인이었던 것으로 알려졌다.  또한 티맥스소프트 제품 소스코드에 경쟁제품 제작 언어로 만들어진 주석이 다수 존재하고 있고 컴퓨터프로그램보호위원회가 두 제품간 유사도를 검증한  결과 높은 유사도를 보인 점도 고려됐다.</p>
<p>그러나 재판부는 티맥스소프트를 대상으로 신청한 손해배상과 배포 금지 요청은 대부분  기각했다. 큐로컴이 주장한 30억원 손해배상과 배포금지는 모두 기각됐고 호주 FNS의 피해만 일부 인정, 티맥스소프트가 1억100만원을  배상하라고 판결했다.</p>
<p>2심에서 개작 판결이 나옴에 따라 큐로컴은 가능한 모든 민형사상 대응에 나설 방침이다. 김동준 큐로컴 대표는 &#8220;티맥스 두 제품에 대해  개작이라고 판결된 것이 가장 중요하다&#8221;며 &#8220;티맥스소프트는 물론 프로프레임 사용 업체에 대해서도 적절한 법적 조치를 취할 것&#8221;이라고 말했다.  큐로컴은 이번 재판 결과가 대법원에서 확정될 경우 매년 1000억원 이상의 매출과 300억원 이상의 영업이익을 기대하고 있다.</p>
<p>전문; <a href="http://www.dt.co.kr/contents.html?article_no=2009061002010660744001" target="_blank">http://www.dt.co.kr/contents.html?article_no=2009061002010660744001</a></p>
<p>프로프레임이란</p>
<p><a href="http://enc.daum.net/dic100/contents.do?query1=10XX129404" target="_blank">http://enc.daum.net/dic100/contents.do?query1=10XX129404</a><br />
서울고등법원 민사4부가 지난달 27일 “티맥스소프트의 ‘프로뱅크’와 ‘프로프레임’은 큐로컴의 ‘뱅스’를 불법으로 개작한 것”이라며  “해당 프로그램의 배포를 금지하라”고 판결했다는 것. 1심에서 불법 개작이 입증됐던 티맥스소프트의 ‘프로뱅크’뿐만 아니라 ‘프로프레임’도  ‘뱅스’를 불법 개작했음이 명백하게 드러났다는 게 큐로컴의 설명이다.</p>
<p>큐로컴은 특히 “티맥스소프트 측이 ‘프로뱅크’와 ‘프로프레임’을 자체 개발했는 주장을 입증할 만한 근거자료를 전혀 제시하지 못했고,  터무니없이 짧은 기간에 결함 없는 금융 관련 소프트웨어를 개발했다는 주장을 신뢰할 수 없다는 게 재판부의 판결”이라고 전했다.</p>
<p>또 “‘C 언어’로 작성한 소프트웨어 원천코드에 ‘코볼언어’ 주석이 다수 존재하는 게 명백한 ‘개작의 증거’라는 주장을 재판부가  받아들였다”고 덧붙였다.</p>
<p>큐로컴은 이 판결을 바탕으로 티맥스소프트의 저작권 침해 행위와 핵심기술을 도용한 책임을 물을 계획이다.</p>
<p>전문; <a href="http://heygoodman7.tistory.com/675" target="_blank">http://heygoodman7.tistory.com/675</a></p>
<p>쩝 그나마 IT기업중 중소기업중에서 돈좀주고 24시간 빢시게 돌리는 티맥스 지지요-_-;;</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/06/11/%ed%95%ad%ec%86%8c%ec%8b%ac%ec%84%9c-%ed%8b%b0%eb%a7%a5%ec%8a%a4%ec%84%9c-%ea%b0%9c%ec%9e%91-%ed%8c%90%ea%b2%b0%e2%80%a6-%ec%86%90%ed%95%b4%eb%b0%b0%ec%83%81%e3%86%8d%eb%b0%b0%ed%8f%ac%ea%b8%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>개발자 일상 생활</title>
		<link>http://eriman.blog.qrobo.com/2009/05/20/107/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/20/107/#comments</comments>
		<pubDate>Wed, 20 May 2009 09:23:33 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[Programing]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=107</guid>
		<description><![CDATA[
ㅡ_- 일상 생활 논문 시한 마추기 커피빼고 다 같네 나랑 하루에 3시간자기
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-105" src="http://eriman.blog.qrobo.com/files/2009/06/eab09cebb09c-300x289.jpg" alt="개발자생각" width="300" height="289" /></p>
<p>ㅡ_- 일상 생활 논문 시한 마추기 커피빼고 다 같네 나랑 하루에 3시간자기</p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/20/107/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4. SPARQL Protocol</title>
		<link>http://eriman.blog.qrobo.com/2009/05/14/4-sparql-protocol/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/14/4-sparql-protocol/#comments</comments>
		<pubDate>Thu, 14 May 2009 05:32:46 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=52</guid>
		<description><![CDATA[
4.1. Can I receive the results of SPARQL queries as  RDF?

The SPARQL  protocol requires that the results of SPARQL CONSTRUCT and DESCRIBE queries be RDF graphs.
SELECT and ASK queries, on the other hand, usually have their results  returned as XML (or sometimes as JSON).  However, as part of the group&#8217;s test [...]]]></description>
			<content:encoded><![CDATA[<div id="results-in-rdf" class="faq">
<h4 class="question">4.1. <a class="question-text" name="#results-in-rdf" href="http://thefigtrees.net/lee/sw/sparql-faq#results-in-rdf">Can I receive the results of SPARQL queries as  RDF?</a></h4>
<div class="answer">
<p>The <a href="http://www.w3.org/TR/rdf-sparql-protocol/#SparqlQuery">SPARQL  protocol</a> requires that the results of SPARQL <a href="http://www.w3.org/TR/rdf-sparql-query/#construct"><tt>CONSTRUCT</tt></a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#describe"><tt>DESCRIBE</tt></a> queries be RDF graphs.</p>
<p><a href="http://www.w3.org/TR/rdf-sparql-query/#select"><tt>SELECT</tt></a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#ask"><tt>ASK</tt></a> queries, on the other hand, usually have their <a href="http://thefigtrees.net/lee/sw/sparql-faq#results-in-xml">results  returned as XML</a> (or sometimes <a href="http://thefigtrees.net/lee/sw/sparql-faq#results-in-json">as JSON</a>).  However, as part of the group&#8217;s test suite, the <abbr title="Data Access Working Group">DAWG</abbr> includes an <a href="http://www.w3.org/2001/sw/DataAccess/tests/result-set.n3">RDF  vocabulary</a> which can be used to represent the results of <tt>SELECT</tt> or  <tt>ASK</tt> queries in RDF.</div>
</div>
<div id="results-in-xml" class="faq">
<h4 class="question">4.2. <a class="question-text" name="#results-in-xml" href="http://thefigtrees.net/lee/sw/sparql-faq#results-in-xml">Can I receive the results of SPARQL queries as  XML?</a></h4>
<div class="answer">
<p>The <abbr title="Data Access Working Group">DAWG</abbr> defines an XML  serialization format, the <a href="http://www.w3.org/TR/rdf-sparql-XMLres/">SPARQL Query Results XML  Format</a>, which is used to return the results of SPARQL <a href="http://www.w3.org/TR/rdf-sparql-query/#select"><tt>SELECT</tt></a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#ask"><tt>ASK</tt></a> queries. The  SPARQL protocol requires that the results of SPARQL <a href="http://www.w3.org/TR/rdf-sparql-query/#construct"><tt>CONSTRUCT</tt></a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#describe"><tt>DESCRIBE</tt></a> queries be RDF graphs, which can be represented using the XML-based <a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML  syntax</a>.</div>
</div>
<div id="results-in-json" class="faq">
<h4 class="question">4.3. <a class="question-text" name="#results-in-json" href="http://thefigtrees.net/lee/sw/sparql-faq#results-in-json">Can I receive the results of SPARQL queries as  JSON?</a></h4>
<div class="answer">
<p><a href="http://www.json.org/">JSON</a> is a lightweight serialization format  which is a subset of JavaScript&#8217;s literal-object notation. It is a useful format  to use for SPARQL results when a Web client is issuing the queries and  processing the results. The <abbr title="Data Access Working Group">DAWG</abbr> has published <a href="http://www.w3.org/TR/rdf-sparql-json-res/">a Note  defining a JSON format</a> that closely follows the <a href="http://www.w3.org/TR/rdf-sparql-XMLres/">SPARQL Query Results XML  Format</a>, and which can be used to return the results of SPARQL <a href="http://www.w3.org/TR/rdf-sparql-query/#select"><tt>SELECT</tt></a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#ask"><tt>ASK</tt></a> queries.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/14/4-sparql-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3. SPARQL Language</title>
		<link>http://eriman.blog.qrobo.com/2009/05/13/3-sparql-language/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/13/3-sparql-language/#comments</comments>
		<pubDate>Wed, 13 May 2009 05:32:27 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=50</guid>
		<description><![CDATA[
3.1. Can I  use SPARQL to search for substring matches within literal values?

SPARQL provides the function, regex(),  which can be used to test whether a literal value contains a certain substring:
   SELECT ?title
   WHERE {
     _:book :title ?title .
     FILTER (regex(?title, [...]]]></description>
			<content:encoded><![CDATA[<div id="regex" class="faq">
<h4 class="question">3.1. <a class="question-text" name="#regex" href="http://thefigtrees.net/lee/sw/sparql-faq#regex">Can I  use SPARQL to search for substring matches within literal values?</a></h4>
<div class="answer">
<p>SPARQL provides the function, <a href="http://www.w3.org/TR/rdf-sparql-query/#funcex-regex"><tt>regex()</tt></a>,  which can be used to test whether a literal value contains a certain substring:</p>
<pre>   SELECT ?title
   WHERE {
     _:book :title ?title .
     FILTER (regex(?title, "SPARQL")) .
   }</pre>
</div>
</div>
<div id="regex-language-tag" class="faq">
<h4 class="question">3.2. <a class="question-text" name="#regex-language-tag" href="http://thefigtrees.net/lee/sw/sparql-faq#regex-language-tag">Why don&#8217;t I get any matches when I use <tt>regex()</tt> to match typed literals or plain literals with language tags?</a></h4>
<div class="answer">
<p>The <a href="http://thefigtrees.net/lee/sw/sparql-faq#regex"><tt>regex()</tt></a> function expects its first argument  to be either a plain literal without a language tag or else a typed literal with  a datatype of <tt>xsd:string</tt>. Plain literals <em>with</em> a language tag or  typed literals of other datatypes will evaluate to a type error which causes the  filter to fail. If you wish <tt>regex()</tt> to match solely based upon a  literal&#8217;s lexical value, use the <a href="http://www.w3.org/TR/rdf-sparql-query/#func-str"><tt>str()</tt></a> function, which converts typed and plain literals to simple literals—i.e., plain  literals without a language tag:</p>
<pre>   SELECT ?title
   WHERE {
     _:book :title ?title .
     FILTER (regex(str(?title), "SPARQL")) .
   }</pre>
</div>
</div>
<div id="transitiv8" class="faq">
<h4 class="question">3.3. <a class="question-text" name="#transitiv8" href="http://thefigtrees.net/lee/sw/sparql-faq#transitiv8">How can I query transitive closures / trees / hierarchies / RDF  lists in SPARQL?</a></h4>
<div class="answer">
<p>There is no built-in support within SPARQL to query hierarchical structures  of an unknown depth (e.g. trees or lists), to query transitive relations, or to  query via XPath like paths. The Data Access Working Group postponed <a href="http://www.w3.org/2001/sw/DataAccess/issues#accessingCollections">this  issue</a> in early 2005.</p>
<p>There are several workarounds to perform these queries using SPARQL:</p>
<ul>
<li><em>Repeated queries.</em> A repeating structure can be queried via a series  of queries. If the structure&#8217;s internal nodes have URIs (or if the SPARQL  endpoint supports blank node identifiers which are stable across queries (&#8221;told  bnodes&#8221;), then the same query can be issued repeatedly to explore the structure.  Alternatively, an ever-growing query can be created which repeatedly queries the  structure from its root to an increasing, fixed depth (until a desired value is  found or the end of the structure is reached).</li>
<li><em>Inference.</em> In an environment which supports querying over an inferred  graph, inference rules can be used to specify transitive closures or hierarchy  membership relations that can then be queried with SPARQL. <a href="http://www.agfa.com/w3c/jdroo/">Jos De Roo</a> has sketched <a href="http://lists.w3.org/Archives/Public/www-archive/2005Nov/att-0005/arc.html">examples</a> of such SPARQL queries using <a href="http://www.agfa.com/w3c/jdroo/">cwm</a> and <a href="http://www.agfa.com/w3c/euler/">Euler</a> and a suitable <a href="http://eulersharp.sourceforge.net/2003/03swap/rpo-rules.n3">set of N3  rules.</a></li>
<li><em>Implementation-specific approaches.</em> Several SPARQL implementations  provide ways to address this question. In <a href="http://jena.sourceforge.net/ARQ/">ARQ</a>, for example, there are two  approaches:
<ol>
<li>A filter function named  <tt>&lt;java:com.hp.hpl.jena.query.function.library.listMember&gt;</tt> which  takes an RDF list node and a resource as parameters and returns <tt>true</tt> if  the resource is a member of the list.</li>
<li>A special predicate named  <tt>&lt;http://www.jena.hpl.hp.com/ARQ/list#member&gt;</tt> can be used inside  the SPARQL query pattern (the <tt>WHERE</tt> clause) to associate an RDF list  head with all the list members.</li>
</ol>
</li>
</ul>
</div>
</div>
<div id="subqueries" class="faq">
<h4 class="question">3.4. <a class="question-text" name="#subqueries" href="http://thefigtrees.net/lee/sw/sparql-faq#subqueries">Can I include subqueries in a SPARQL query?</a></h4>
<div class="answer">
<p>While SPARQL does support nested graph patterns, it does not directly support  subqueries (for example, the <tt>FROM</tt> clause of a SPARQL query cannot  itself contain a <tt>CONSTRUCT</tt> query which generates the dataset to be  queried against). The Data Access Working Group postponed <a href="http://www.w3.org/2001/sw/DataAccess/issues#cascadedQueries">this  issue</a> in early 2005. A very limited form of subqueries can be accomplished  with SPARQL engines that will perform HTTP GETs upon graphs named in  <tt>FROM</tt> or <tt>FROM NAMED</tt> clauses by creating a URL consisting of an  embedded SPARQL <tt>CONSTRUCT</tt> query submitted to a SPARQL endpoint and  supplying this URL as part of the RDF dataset being queried. In practice, this  technique is often inefficient and is subject to possible URL-maximum-length  restrictions of the involved software.</div>
</div>
<div id="variable-values" class="faq">
<h4 class="question">3.5. <a class="question-text" name="#variable-values" href="http://thefigtrees.net/lee/sw/sparql-faq#variable-values">Can I bind a variable to a specific value (e.g., the  result of a function call)?</a></h4>
<div class="answer">
<p>SPARQL does not support setting variable bindings except via graph pattern  matching or via the <tt>GRAPH ?g</tt> construct. Expressions are not allowed in  the <tt>SELECT</tt> list of a SPARQL query.</div>
</div>
<div id="universal" class="faq">
<h4 class="question">3.6. <a class="question-text" name="#universal" href="http://thefigtrees.net/lee/sw/sparql-faq#universal">How can I use SPARQL to query maximum/minimum values or other  universally quantified criteria?</a></h4>
<div class="answer">
<p>A combination of the SPARQL <tt>OPTIONAL</tt> keyword and the  <tt>bound(...)</tt> filter function can be used to mimic some universally  quantified queries. As an example, consider this query which finds the minimum  price of every book in the underlying default graph:</p>
<pre>  PREFIX ex: &lt;http://example.org/&gt;
  SELECT ?book ?minprice
  WHERE {
    ?book a ex:book ; ex:price ?minprice .
    OPTIONAL {
      ?book ex:price ?otherprice .
      FILTER( ?otherprice &lt; ?minprice ) .
    } .
    FILTER ( !bound(?otherprice) ) .
  }</pre>
</div>
</div>
<p>&lt;!&#8211; @@ Needs settling of RDF term equal function situation.</p>
<div class="faq" id="plain-vs-typed-literals">
<h4 class="question">How can I use SPARQL to distinguish between plain and typed literals?</h4>
<div class="answer">
<p>use RDFTerm-equal? how is that surfaced in the syntax?</p></div>
</div>
<p>&#8211;&gt;</p>
<div id="alternative-predicates" class="faq">
<h4 class="question">3.7. <a class="question-text" name="#alternative-predicates" href="http://thefigtrees.net/lee/sw/sparql-faq#alternative-predicates">Can I use SPARQL to select a single value based on  an ordered list of predicates which might appear in the data?</a></h4>
<div class="answer">
<p>When writing SPARQL queries against heterogeneous data sources, one often  wants to select a value for a certain purpose without knowing which one of  several predicates might be used in the data. The SPARQL <a href="http://www.w3.org/TR/rdf-sparql-query/#optionals"><tt>OPTIONAL</tt></a> keyword can be used to accomplish this. Suppose we are selecting a  human-readable label for a Web page, and we want to use the value of the <a href="http://dublincore.org/">Dublin Core</a> <a href="http://dublincore.org/2006/08/28/dces.rdf#title">title</a> predicate  (<tt>dc:title</tt>) if it exists, and otherwise use the value of the <a href="http://www.w3.org/TR/rdf-schema/#ch_label"><tt>rdfs:label</tt></a> predicate. This can be accomplished with SPARQL idiom:</p>
<pre>  PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
  PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
  SELECT ?text
  WHERE {
    OPTIONAL { &lt;http://example.org/myWebPage&gt; dc:title ?text . }
    OPTIONAL { &lt;http://example.org/myWebPage&gt; rdfs:label ?text . }
  }</pre>
<p>More information on this idiom is available in <a href="http://www.thefigtrees.net/lee/blog/2006/04/sparql_calendar_demo_using_spa.html">this  blog post</a>.</div>
</div>
<div id="rdfs" class="faq">
<h4 class="question">3.8. <a class="question-text" name="#rdfs" href="http://thefigtrees.net/lee/sw/sparql-faq#rdfs">Can I use  SPARQL to query RDFS entailments?</a></h4>
<div class="answer">
<p>It is sometimes desirable to use SPARQL to query triples entailed from  subclass, subproperty, range, domain, and other relations which can be  represented using <a href="http://www.w3.org/TR/rdf-schema/">RDF Schema.</a></p>
<p>The SPARQL specification <a href="http://www.w3.org/TR/rdf-sparql-query/#BasicGraphPatternMatching">defines</a> the results of queries based on <a href="http://www.w3.org/TR/rdf-mt/#entail">RDF simple entailment</a>. However,  the specification does present a general, parametrized definition of graph  pattern matching that can be expanded to other entailments beyond RDF simple  entailment.</p>
<p>As an alternative, the SPARQL specification acknowledges that queries are  often performed against a virtual graph which may not be fully materialized.  Because RDFS entailment rules will always lead to a unique, deductive closure of  a base graph, a query engine can treat the RDFS deductive closure of a base  graph as the virtual graph against which (simple-entailment based) SPARQL  queries are executed.</p>
<p>Whether or not a particular query endpoint supports RDFS entailment is  implementation defined. Such a property might be advertised as part of the  endpoint&#8217;s <a href="http://thefigtrees.net/lee/sw/sparql-faq#service-description">functional description</a>.</p>
<p>For more information, see information on <a href="http://esw.w3.org/topic/SPARQL/Extensions/Entailment_Regimes">SPARQL  extensions for other entailment regimes</a>.</div>
</div>
<div id="owl" class="faq">
<h4 class="question">3.9. <a class="question-text" name="#owl" href="http://thefigtrees.net/lee/sw/sparql-faq#owl">Can I use  SPARQL to query OWL entailments?</a></h4>
<div class="answer">
<p>For the most part, the answer to this question is the same as the <a href="http://thefigtrees.net/lee/sw/sparql-faq#rdfs">above answer</a> regarding RDFS entailment. However, OWL-DL axioms  do not always result in a <em>unique</em> deductive closure, and as such querying  OWL-DL entailments requires instantiating the parametrized SPARQL basic graph  pattern definition with values appropriate for OWL-DL entailment. The  open-source OWL-DL reasoner, <a href="http://www.mindswap.org/2003/pellet/">Pellet</a>, will answer SPARQL  queries while considering OWL-DL entailments.</p>
<p>For more information, see information on <a href="http://esw.w3.org/topic/SPARQL/Extensions/Entailment_Regimes">SPARQL  extensions for other entailment regimes</a>.</div>
</div>
<div id="blank-nodes" class="faq">
<h4 class="question">3.10. <a class="question-text" name="#blank-nodes" href="http://thefigtrees.net/lee/sw/sparql-faq#blank-nodes">What do blank nodes mean in a SPARQL query?</a></h4>
<div class="answer">
<p>For the most part, blank nodes in SPARQL queries function exactly as  variables which cannot be returned to the user/client. So, the following two  queries behave identically:</p>
<pre>  SELECT ?title WHERE { _:book :hasTitle ?title }</pre>
<pre>  SELECT ?title WHERE { ?book :hasTitle ?title }</pre>
<p>However, a SPARQL query <em>may not</em> reuse the same blank node label twice  in different <a href="http://www.w3.org/TR/rdf-sparql-query/#BasicGraphPatternMatching">basic  graph patterns</a>. That is, the following is not a legal SPARQL query:</p>
<pre>  SELECT ?title WHERE {
    _:book rdfs:seeAlso ?g .
    GRAPH ?g { _:book dc:title ?title }
  }</pre>
<p>In most cases, it is best practice to use the <tt>[]</tt> and <tt>[ :prop  <img src='http://eriman.blog.qrobo.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> bj ]</tt> syntaxes for blank nodes and to only use explicit blank node labels  for constructs that cannot be expresed otherwise.</div>
</div>
<div id="where-keyword" class="faq">
<h4 class="question">3.11. <a class="question-text" name="#where-keyword" href="http://thefigtrees.net/lee/sw/sparql-faq#where-keyword">Did you know that the SPARQL <tt>WHERE</tt> keyword is  optional?</a></h4>
<div class="answer">
<p>Well, it is!</p></div>
</div>
<div id="numbers" class="faq">
<h4 class="question">3.12. <a class="question-text" name="#numbers" href="http://thefigtrees.net/lee/sw/sparql-faq#numbers">Why don&#8217;t I get any matches when I search for numbers?</a></h4>
<div class="answer">
<p>Numbers in RDF data can be represented as plain literals or as typed literals  (using <a href="http://www.w3.org/TR/xmlschema-2/">XML Schema datatypes</a> such  as <tt>xsd:int</tt>). Numbers written in a SPARQL query <em>with</em> surrounding  quotation marks (e.g., <tt>"4"</tt>) will only match plain literals in the  dataset. Numbers written <em>without</em> quotation marks (e.g. <tt>4</tt>) will  only match typed literals. Be sure to use the appropriate form for the data you  are querying.</p>
<p>If your data contains numbers as plain literals, then they will be compared  as strings not numbers, and you may have to cast them to typed literals to get  the desired results. For example, to check if a number expressed as a plain  literal is less than 100, you&#8217;d say:</p>
<pre>  ...
  FILTER (xsd:int(?number) &lt; 100)
  ...</pre>
<p><em>Many thanks to <a href="http://dowhatimean.net/">Richard Cyganiak</a> for  contributing this question and answer.</em></div>
</div>
<div id="update" class="faq">
<h4 class="question">3.13. <a class="question-text" name="#update" href="http://thefigtrees.net/lee/sw/sparql-faq#update">Can  I use SPARQL to insert, update, or delete RDF data?</a></h4>
<div class="answer">
<p>The current, standardized version of SPARQL deals only with retrieving  selected data from RDF graphs. There is no equivalent of the SQL  <tt>INSERT</tt>, <tt>UPDATE</tt>, or <tt>DELETE</tt> statements. Most RDF-based  applications handle new, changing, and stale data directly via the APIs provided  by <a href="http://esw.w3.org/topic/SemanticWebTools#head-805c63479c854babe4657d5184de605910f6d3e2">specific  RDF storage systems</a>. Alternatively, RDF data can exist virtually (i.e.  created on-demand in response to a SPARQL query). Also, there are systems which  create RDF data from other forms of markup, such as <a href="http://wiki.ontoworld.org/index.php/Semantic_Wiki_State_Of_The_Art">Wiki  markup</a> or <a href="http://wingerz.com/blog/?p=35">the Atom Syndication  Format</a>.</p>
<p>However, there is significant active work going on to extend SPARQL to  support update operations. See the <a href="http://esw.w3.org/topic/SPARQL/Extensions/Update">SPARQL extension wiki  page dealing with update</a> for more details.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/13/3-sparql-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2. W3C and the Data Access (DAWG) and SPARQL Working Groups</title>
		<link>http://eriman.blog.qrobo.com/2009/05/12/2-w3c-and-the-data-access-dawg-and-sparql-working-groups/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/12/2-w3c-and-the-data-access-dawg-and-sparql-working-groups/#comments</comments>
		<pubDate>Tue, 12 May 2009 05:31:25 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=48</guid>
		<description><![CDATA[
2.1. What is the status of the W3C SPARQL  specifications?

On January 15, 2008, the W3C published the three SPARQL specifications as  Recommendations. This means that the specifications have been endorsed by the  W3C membership and should be considered stable documents.
In February 2009, the W3C re-chartered the SPARQL Working Group (new name)  [...]]]></description>
			<content:encoded><![CDATA[<div id="specification-status" class="faq">
<h4 class="question">2.1. <a class="question-text" name="#specification-status" href="http://thefigtrees.net/lee/sw/sparql-faq#specification-status">What is the status of the W3C SPARQL  specifications?</a></h4>
<div class="answer">
<p>On January 15, 2008, the W3C published the three SPARQL specifications as  Recommendations. This means that the specifications have been endorsed by the  W3C membership and should be considered stable documents.</p>
<p>In February 2009, the W3C re-chartered the <a href="http://www.w3.org/2009/sparql/wiki/">SPARQL Working Group</a> (new name)  to produce specifications for extensions to the SPARQL language, protocol, and  landscape. This new Working Group has an 18-month timeframe.</div>
</div>
<div id="future-specification" class="faq">
<h4 class="question">2.2. <a class="question-text" name="#future-specification" href="http://thefigtrees.net/lee/sw/sparql-faq#future-specification">Will there be a SPARQL 2? When will feature X be  standardized?</a></h4>
<div class="answer">
<p>The in-progress <a href="http://www.w3.org/2009/sparql/wiki/">SPARQL Working  Group</a> is working on a new version of SPARQL. The group&#8217;s work can be  followed on two public mailing lists:</p>
<ul>
<li><a href="http://lists.w3.org/Archives/Public/public-rdf-dawg/">public-rdf-dawg@w3.org</a> &#8211; Working Group business</li>
<li><a href="http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/">public-rdf-dawg-comments@w3.org</a> &#8211; Community feedback to/from the Working Group</li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/12/2-w3c-and-the-data-access-dawg-and-sparql-working-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1. General SPARQL Discussion</title>
		<link>http://eriman.blog.qrobo.com/2009/05/11/1-general-sparql-discussion/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/11/1-general-sparql-discussion/#comments</comments>
		<pubDate>Mon, 11 May 2009 05:29:33 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=45</guid>
		<description><![CDATA[
1.1. What is SPARQL?

SPARQL is a recursive acronym standing for SPARQL Protocol and RDF Query Language. As the name implies, SPARQL  is a general term for both a protocol and a query language.
Most uses of the SPARQL acronym refer to the RDF query language. In this  usage, SPARQL is a syntactically-SQL-like language for [...]]]></description>
			<content:encoded><![CDATA[<div id="what-is" class="faq">
<h4 class="question">1.1. <a class="question-text" name="#what-is" href="http://thefigtrees.net/lee/sw/sparql-faq#what-is">What is SPARQL?</a></h4>
<div class="answer">
<p>SPARQL is a <a href="http://en.wikipedia.org/wiki/Recursive_acronym">recursive acronym</a> standing for SPARQL Protocol and RDF Query Language. As the name implies, SPARQL  is a general term for both a protocol and a query language.</p>
<p>Most uses of the SPARQL acronym refer to the RDF query language. In this  usage, SPARQL is a syntactically-SQL-like language for querying <a href="http://www.w3.org/RDF/">RDF</a> graphs via pattern matching. The  language&#8217;s features include basic conjunctive patterns, value filters, optional  patterns, and pattern disjunction.</p>
<p>The SPARQL protocol is a method for remote invocation of SPARQL queries. It  specifies a simple interface that can be supported via HTTP or SOAP that a  client can use to issue SPARQL queries against some endpoint.</p>
<p>Both the SPARQL query language and the SPARQL protocol are products of the <a href="http://www.w3c.org/">W3C&#8217;s</a> <a href="http://www.w3.org/2001/sw/DataAccess/">RDF Data Access Working Group</a>.  The latest released versions of the Working Group&#8217;s specifications (excluding  intermediate working drafts) can be found here:</p>
<ul>
<li><a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL Query  Language</a></li>
<li><a href="http://www.w3.org/TR/rdf-sparql-protocol/">SPARQL Protocol</a></li>
<li><a href="http://www.w3.org/TR/rdf-sparql-XMLres/">SPARQL Query Results XML  Format</a></li>
</ul>
</div>
</div>
<div id="tutorials" class="faq">
<h4 class="question">1.2. <a class="question-text" name="#tutorials" href="http://thefigtrees.net/lee/sw/sparql-faq#tutorials">How can I learn SPARQL?</a></h4>
<div class="answer">
<p>There are a variety of SPARQL tutorials and introductions scattered around  the Web. Some notable ones include:</p>
<ul>
<li><a href="http://jena.sourceforge.net/ARQ/Tutorial/">Jena/ARQ SPARQL  tutorial</a></li>
<li><a href="http://www.xml.com/lpt/a/2005/11/16/introducing-sparql-querying-semantic-web-tutorial.html">Leigh  Dodds&#8217; &#8220;Introducing SPARQL&#8221; article</a></li>
<li><a href="http://www-128.ibm.com/developerworks/library/j-sparql/">Philip  McCarthy&#8217;s &#8220;Search RDF data with SPARQL&#8221; article</a></li>
<li><a href="http://www.cambridgesemantics.com/2008/09/sparql-by-example/">SPARQL By  Example</a></li>
</ul>
</div>
</div>
<div id="benefits" class="faq">
<h4 class="question">1.3. <a class="question-text" name="#benefits" href="http://thefigtrees.net/lee/sw/sparql-faq#benefits">What are the benefits/drawbacks of SPARQL vis a vis SQL and  XQuery?</a></h4>
<div class="answer">
<p>The jury is still out on best practices surrounding using SPARQL compared to  other query languages. Some benefits of SPARQL include:</p>
<ul>
<li>Queries RDF data. If your data is in RDF, then SPARQL can query it  natively.</li>
<li>Implicit join syntax. SPARQL queries RDF graphs, which consist of various  triples expressing binary relations between resources, by specifying a subgraph  with certain resources replaced by variables. Because all relationships are of a  fixed size and data lives in a single graph, SPARQL does not require explicit  joins that specify the relationship between differently structured data. That  is, SPARQL is a query language for pattern matching against RDF graphs, and the  queies themselves <em>look and act</em> like RDF. This is one main point made by  Oracle&#8217;s Jim Melton in his analysis of SPARQL vis a vis SQL and XQuery: <a href="http://xtech06.usefulinc.com/schedule/paper/119">SQL, XQuery, and SPARQL:  What&#8217;s Wrong With This Picture?</a>.</li>
<li>SPARQL has strong support for querying semistructured and ragged data—i.e.,  data with an unpredictable and unreliable structure. Variables may occur in the  predicate position to query unknown relationships, and the <tt>OPTIONAL</tt> keyword provides support for querying relationships that may or may not occur in  the data (a la SQL left joins).</li>
<li>SPARQL is often an appropriate query language for querying disparate data  sources (not sharing a single native representation) in a single query. Because  RDF represents all data as a collection of simple binary relations, most data  can be easily mapped to RDF and then queried and joined using SPARQL. Often,  these mappings can be performed on the fly, meaning that SPARQL can be used to  join heterogeneous data at a higher level than that of the native structure of  the data.</li>
<li>SPARQL is built to support queries in a networked, web environment. SPARQL  introduces the notion of an RDF dataset, which is the pairing of a default graph  and zero or more named graphs. As both the default graph and the named graphs  are identified by URIs, it is common for SPARQL implementations to retrieve a  graph by performing an HTTP GET on the graph&#8217;s URI. This allows a single query  to join information from multiple data sources accessible across different Web  sites.</li>
<li>Similarly, the SPARQL <tt>GRAPH</tt> keyword allows data to be queried along  with its provenance information. <tt>GRAPH</tt> can be used to discover the URI  of the graph that contains the data that matches the query.</li>
</ul>
<p>Some drawbacks are:</p>
<ul>
<li>Lack of wide deployment. SPARQL is relatively young, and as such there are  not many data stores which can be directly queried with SPARQL (as compared with  SQL or XPath).</li>
<li>Immaturity. As a young query language, SPARQL lacks the explicit processing  model of XQuery or the decades of SQL-optimization research. As with the above  point, this is likely to improve as current and new research and implementations  contribute to a body of knowledge surrounding SPARQL.</li>
<li>Lack of support for transitive/hierarchical queries. While SPARQL is  designed to query RDF graphs, SPARQL has no facilities for easily querying  transitive relations or hierarchical structures within a graph. There are <a href="http://thefigtrees.net/lee/sw/sparql-faq#transitive">some workarounds</a> for this, but SPARQL does not approach  the power of, for instance, <a href="http://www.w3.org/TR/xquery/#axes">XQuery&#8217;s  axes</a>.</li>
</ul>
</div>
</div>
<div id="implementations" class="faq">
<h4 class="question">1.4. <a class="question-text" name="#implementations" href="http://thefigtrees.net/lee/sw/sparql-faq#implementations">What SPARQL implementations are available?</a></h4>
<div class="answer">
<p>The community maintains <a href="http://esw.w3.org/topic/SparqlImplementations">a list of SPARQL  implementations</a> at the W3C ESW Wiki.</div>
</div>
<div id="non-rdf-sources" class="faq">
<h4 class="question">1.5. <a class="question-text" name="#non-rdf-sources" href="http://thefigtrees.net/lee/sw/sparql-faq#non-rdf-sources">Can I use SPARQL to query data that&#8217;s not stored in  RDF?</a></h4>
<div class="answer">
<p>Several software packages exist which allow SPARQL queries to generate  answers from data sources other than RDF, such as relational databases, LDAP  servers, or XML data. The community maintains <a href="http://esw.w3.org/topic/RdfAndSql">a list of these tools</a> at the W3C  ESW Wiki.</p>
<p>The W3C recently completed an <a href="http://www.w3.org/2005/Incubator/rdb2rdf/">incubator group</a> examining  the state of the art in accessing relational databases via SPARQL. As a result  of this incubator group, a new Working Group may be established to produce  specifications in this area.</div>
</div>
<div id="service-description" class="faq">
<h4 class="question">1.6. <a class="question-text" name="#service-description" href="http://thefigtrees.net/lee/sw/sparql-faq#service-description">How can I tell what dataset, functions, or extensions  a SPARQL endpoint supports?</a></h4>
<div class="answer">
<p>There is currently no established, interoperable method for representing or  accessing functional descriptions of SPARQL endpoints. (This is not to be  confused with the <a href="http://www.w3.org/TR/rdf-sparql-protocol/sparql-protocol-query.wsdl">WSDL</a> which describes the SPARQL Protocol itself.)</p>
<p>The Data Access Working Group postponed this topic in 2005, leaving behind <a href="http://www.w3.org/2001/sw/DataAccess/proto-wd/saddle">a draft</a> &#8220;of  historical interest only.&#8221; In the meantime, implementations have devised their  own vocabularies and techniques for specifying and advertising the services and  datasets supported by a SPARQL endpoint. For example, HP Labs&#8217; <a href="http://www.joseki.org/">Joseki</a> allows service descriptions to be <a href="http://www.joseki.org/configuration.html">specified</a> with an RDF  configuration vocabulary. See <a href="http://esw.w3.org/topic/SPARQL/Extensions/Service_Description">the SPARQL  service description wiki page</a> for more information.</div>
</div>
<div id="dataset-size" class="faq">
<h4 class="question">1.7. <a class="question-text" name="#dataset-size" href="http://thefigtrees.net/lee/sw/sparql-faq#dataset-size">Do SPARQL queries perform well against small datasets? Large  datasets?</a></h4>
<div class="answer">
<p>The performance of a SPARQL query against any particular dataset depends not  only upon the size of the dataset but also on the nature of the dataset&#8217;s  storage (a relational store, a native triple store, LDAP, etc.), the complexity  of the query itself, optimizations in use by the SPARQL engine, the distribution  of the data, and other environmental factors. To date, little work has been done  in analyzing SPARQL query performance in particular, and the field of SPARQL  query optimization is relatively inchoate.</p>
<p>Some analysis has been done on the topic of RDF stores which can handle large  datasets. (A large dataset in this context is usually considered one on the  order of tens or hundreds of millions of triples). The W3C ESW wiki <a href="http://esw.w3.org/topic/LargeTripleStores">contains</a> information on a  variety of RDF stores which can scale to large numbers of triples, but does not  speak specifically to the performance of SPARQL queries against these  stores.</div>
</div>
<div id="sparql-online" class="faq">
<h4 class="question">1.8. <a class="question-text" name="#sparql-online" href="http://thefigtrees.net/lee/sw/sparql-faq#sparql-online">Is there anywhere on the Web where I can try out SPARQL  queries?</a></h4>
<div class="answer">
<p>The creators of several SPARQL implementations provide online services where  SPARQL queries can be input and executed against either canned datasets or  arbitrary datasets (identified by URLs). The community maintains <a href="http://esw.w3.org/topic/SparqlEndpoints">a list of SPARQL endpoints</a> on  the W3C ESW Wiki.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/11/1-general-sparql-discussion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JENA] Tutorial &#8211; Controlling Prefixes</title>
		<link>http://eriman.blog.qrobo.com/2009/05/08/jena-tutorial-controlling-prefixes/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/08/jena-tutorial-controlling-prefixes/#comments</comments>
		<pubDate>Fri, 08 May 2009 07:22:01 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[JENA]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=96</guid>
		<description><![CDATA[Tutorial 5 에 이어 Controlling Prefixes 설명 부분이다.
전에 정의한 네임스페이스를 전처리기 처럼 미리 정의하여 코드를 간략히 하는 예제이다.
Jena는 이러한 긴 URI들을 간략히 하여 표현하는 간단한 예제를 보여준다.
//모델 생성
Model m = ModelFactory.createDefaultModel();
//스트링형 URIs
String nsA = &#8220;http://hacks.wo.to/ju0e#&#8221;;
String nsB = &#8220;http://hackscd.goanygate.com/ju0e#&#8221;;
//리소스 생성
Resource root = m.createResource( nsA + &#8220;root&#8221; );
//프로퍼티 생성
Property P = m.createProperty( nsA + &#8220;P&#8221; );
Property Q = [...]]]></description>
			<content:encoded><![CDATA[<p>Tutorial 5 에 이어 Controlling Prefixes 설명 부분이다.</p>
<p>전에 정의한 네임스페이스를 전처리기 처럼 미리 정의하여 코드를 간략히 하는 예제이다.<br />
Jena는 이러한 긴 URI들을 간략히 하여 표현하는 간단한 예제를 보여준다.</p>
<p>//모델 생성<br />
Model m = ModelFactory.createDefaultModel();</p>
<p>//스트링형 URIs<br />
String nsA = &#8220;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>#&#8221;;<br />
String nsB = &#8220;<a href="http://hackscd.goanygate.com/ju0e" target="_blank">http://hackscd.goanygate.com/ju0e</a>#&#8221;;</p>
<p>//리소스 생성<br />
Resource root = m.createResource( nsA + &#8220;root&#8221; );</p>
<p>//프로퍼티 생성<br />
Property P = m.createProperty( nsA + &#8220;P&#8221; );<br />
Property Q = m.createProperty( nsB + &#8220;Q&#8221; );<br />
Property x = m.createProperty( nsA + &#8220;x&#8221; );<br />
Property y = m.createProperty( nsA + &#8220;y&#8221; );<br />
Property z = m.createProperty( nsA + &#8220;z&#8221; );</p>
<p>//모델 등록<br />
m.add( root, P, x )<br />
.add( root, P, y )<br />
.add( y, Q, z );</p>
<p>System.out.println( &#8220;# &#8212; no special prefixes defined&#8221; );<br />
m.write( System.out );<br />
System.out.println( &#8220;# &#8212; nsA defined&#8221; );</p>
<p>//네임스페이스 세팅<br />
m.setNsPrefix( &#8220;nsA&#8221;, nsA );</p>
<p>m.write( System.out );<br />
System.out.println( &#8220;# &#8212; nsA and cat defined&#8221; );</p>
<p>//네임스페이스 세팅<br />
m.setNsPrefix( &#8220;cat&#8221;, nsB );</p>
<p>m.write( System.out );</p>
<p>결과는 코드에 비해 상당히 많은 내용들이 출력되어 진다.</p>
<p><a name="317067_1"></a># &#8212; no special prefixes defined<br />
&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:j.0=&#8221;<a href="http://hackscd.goanygate.com/ju0e" target="_blank">http://hackscd.goanygate.com/ju0e</a>#&#8221;<br />
xmlns:j.1=&#8221;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>#&#8221; &gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#root" target="_blank">http://hacks.wo.to/ju0e#root</a>&#8220;&gt;<br />
&lt;j.1:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y&#8221;/</a>&gt;<br />
&lt;j.1:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#x" target="_blank">http://hacks.wo.to/ju0e#x&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y</a>&#8220;&gt;<br />
&lt;j.0:Q rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#z" target="_blank">http://hacks.wo.to/ju0e#z&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
<p># &#8212; nsA defined<br />
&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:j.0=&#8221;<a href="http://hackscd.goanygate.com/ju0e" target="_blank">http://hackscd.goanygate.com/ju0e</a>#&#8221;<br />
xmlns:nsA=&#8221;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>#&#8221; &gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#root" target="_blank">http://hacks.wo.to/ju0e#root</a>&#8220;&gt;<br />
&lt;nsA:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y&#8221;/</a>&gt;<br />
&lt;nsA:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#x" target="_blank">http://hacks.wo.to/ju0e#x&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y</a>&#8220;&gt;<br />
&lt;j.0:Q rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#z" target="_blank">http://hacks.wo.to/ju0e#z&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
<p># &#8212; nsA and cat defined<br />
&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:cat=&#8221;<a href="http://hackscd.goanygate.com/ju0e" target="_blank">http://hackscd.goanygate.com/ju0e</a>#&#8221;<br />
xmlns:nsA=&#8221;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>#&#8221; &gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#root" target="_blank">http://hacks.wo.to/ju0e#root</a>&#8220;&gt;<br />
&lt;nsA:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y&#8221;/</a>&gt;<br />
&lt;nsA:P rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#x" target="_blank">http://hacks.wo.to/ju0e#x&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e#y" target="_blank">http://hacks.wo.to/ju0e#y</a>&#8220;&gt;<br />
&lt;cat:Q rdf:resource=&#8221;<a href="http://www.egloos.com/egloo/'http://hacks.wo.to/ju0e#z" target="_blank">http://hacks.wo.to/ju0e#z&#8221;/</a>&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/08/jena-tutorial-controlling-prefixes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JENA] Tutorial05</title>
		<link>http://eriman.blog.qrobo.com/2009/05/07/jena-tutorial05/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/07/jena-tutorial05/#comments</comments>
		<pubDate>Thu, 07 May 2009 07:20:06 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[JENA]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=85</guid>
		<description><![CDATA[Reading RDF
Tutorial 5 는 모델로부터 RDF에 있는 내용을 읽는법을 설명한다.
이미 만들어져 있는 RDF파일을 InputStream형태의 객체로 읽어 화면에 출력해주는 간단한 내용이다.
파일메니저를 이용하여 RDF파일을 읽는다.
InputStream in = FileManager.get().open(inputFileName);
만약 파일이 없다면 IllegalArgumentException오류를 발생하도록 한다.
if(in == null) {
throw new IllegalArgumentException(&#8221; RDF File not found&#8221;);
}
RDF/XML파일을 읽는 메소드로 RDF 내용을 읽어온다.
model.read(in, &#8220;&#8221;);
Tutorial04에서 표준으로 화면에 쓰는 메소드를 사용하여 읽어온 내용을 확인한다.
model.write(System.out);
[ SOURCE [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Reading RDF</strong></p>
<p>Tutorial 5 는 모델로부터 RDF에 있는 내용을 읽는법을 설명한다.<br />
이미 만들어져 있는 RDF파일을 InputStream형태의 객체로 읽어 화면에 출력해주는 간단한 내용이다.</p>
<p>파일메니저를 이용하여 RDF파일을 읽는다.<br />
InputStream in = FileManager.get().open(inputFileName);</p>
<p>만약 파일이 없다면 IllegalArgumentException오류를 발생하도록 한다.<br />
if(in == null) {<br />
throw new IllegalArgumentException(&#8221; RDF File not found&#8221;);<br />
}</p>
<p>RDF/XML파일을 읽는 메소드로 RDF 내용을 읽어온다.<br />
model.read(in, &#8220;&#8221;);</p>
<p>Tutorial04에서 표준으로 화면에 쓰는 메소드를 사용하여 읽어온 내용을 확인한다.<br />
model.write(System.out);</p>
<p><a name="317064_1"></a><strong>[ SOURCE : vc-db-1.rdf ]</strong></p>
<p>&lt;rdf:RDF<br />
xmlns:rdf=&#8217;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#8217;<br />
xmlns:vCard=&#8217;http://www.w3.org/2001/vcard-rdf/3.0#&#8217;<br />
&gt;</p>
<p>&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e/" target="_blank">http://hacks.wo.to/ju0e/</a>&#8220;&gt;<br />
&lt;vCard:FN&gt;Ju-young Noh&lt;/vCard:FN&gt;<br />
&lt;vCard:N rdf:parseType=&#8221;Resource&#8221;&gt;<br />
&lt;vCard:Family&gt;Noh&lt;/vCard:Family&gt;<br />
&lt;vCard:Given&gt;Ju-young&lt;/vCard:Given&gt;<br />
&lt;/vCard:N&gt;<br />
&lt;/rdf:Description&gt;</p>
<p>&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/phd/" target="_blank">http://hacks.wo.to/phd/</a>&#8220;&gt;<br />
&lt;vCard:FN&gt;Hae-dong Park&lt;/vCard:FN&gt;<br />
&lt;vCard:N rdf:parseType=&#8221;Resource&#8221;&gt;<br />
&lt;vCard:Family&gt;Park&lt;/vCard:Family&gt;<br />
&lt;vCard:Given&gt;Hae-dong&lt;/vCard:Given&gt;<br />
&lt;/vCard:N&gt;<br />
&lt;/rdf:Description&gt;</p>
<p>&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/hjy/" target="_blank">http://hacks.wo.to/hjy/</a>&#8220;&gt;<br />
&lt;vCard:FN&gt;Jong-hyun&lt;/vCard:FN&gt;<br />
&lt;vCard:N rdf:parseType=&#8221;Resource&#8221;&gt;<br />
&lt;vCard:Family&gt;Ha&lt;/vCard:Family&gt;<br />
&lt;vCard:Given&gt;Jong-hyun&lt;/vCard:Given&gt;<br />
&lt;/vCard:N&gt;<br />
&lt;/rdf:Description&gt;</p>
<p>&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/kjw/" target="_blank">http://hacks.wo.to/kjw/</a>&#8220;&gt;<br />
&lt;vCard:FN&gt;Jun-wook Kang&lt;/vCard:FN&gt;<br />
&lt;vCard:N<br />
vCard:Family=&#8221;Kang&#8221;<br />
vCard:Given=&#8221;Jun-wook&#8221;/&gt;<br />
&lt;/rdf:Description&gt;</p>
<p>&lt;/rdf:RDF&gt;</p>
<p><strong>[ SOURCE : Tutorial05.java ]</strong></p>
<p>import com.hp.hpl.jena.rdf.model.*;<br />
import com.hp.hpl.jena.util.*;</p>
<p>import java.io.*;</p>
<p>public class Test extends Object<br />
{<br />
static final String inputFileName = &#8220;data/vc-db-1.rdf&#8221;;</p>
<p>public static void main(String args[])<br />
{<br />
Model model = ModelFactory.createDefaultModel();</p>
<p>InputStream in = FileManager.get().open(inputFileName);<br />
if(in == null)<br />
{<br />
throw new IllegalArgumentException(&#8221; File : &#8221; + inputFileName + &#8221; not found&#8221;);<br />
}</p>
<p>model.read(in, &#8220;&#8221;);<br />
model.write(System.out);<br />
}<br />
}</p>
<p><strong>[ EXECUTE ]</strong></p>
<p>&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:vCard=&#8221;<a href="http://www.w3.org/2001/vcard-rdf/3.0" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0</a>#&#8221; &gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/hjy/" target="_blank">http://hacks.wo.to/hjy/</a>&#8220;&gt;<br />
&lt;vCard:N rdf:nodeID=&#8221;A0&#8243;/&gt;<br />
&lt;vCard:FN&gt;Jong-hyun&lt;/vCard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/phd/" target="_blank">http://hacks.wo.to/phd/</a>&#8220;&gt;<br />
&lt;vCard:N rdf:nodeID=&#8221;A1&#8243;/&gt;<br />
&lt;vCard:FN&gt;Hae-dong Park&lt;/vCard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/kjw/" target="_blank">http://hacks.wo.to/kjw/</a>&#8220;&gt;<br />
&lt;vCard:N rdf:nodeID=&#8221;A2&#8243;/&gt;<br />
&lt;vCard:FN&gt;Jun-wook Kang&lt;/vCard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:nodeID=&#8221;A3&#8243;&gt;<br />
&lt;vCard:Given&gt;Ju-young&lt;/vCard:Given&gt;<br />
&lt;vCard:Family&gt;Noh&lt;/vCard:Family&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e/" target="_blank">http://hacks.wo.to/ju0e/</a>&#8220;&gt;<br />
&lt;vCard:N rdf:nodeID=&#8221;A3&#8243;/&gt;<br />
&lt;vCard:FN&gt;Ju-young Noh&lt;/vCard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:nodeID=&#8221;A2&#8243;&gt;<br />
&lt;vCard:Given&gt;Jun-wook&lt;/vCard:Given&gt;<br />
&lt;vCard:Family&gt;Kang&lt;/vCard:Family&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:nodeID=&#8221;A1&#8243;&gt;<br />
&lt;vCard:Given&gt;Hae-dong&lt;/vCard:Given&gt;<br />
&lt;vCard:Family&gt;Park&lt;/vCard:Family&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:nodeID=&#8221;A0&#8243;&gt;<br />
&lt;vCard:Given&gt;Jong-hyun&lt;/vCard:Given&gt;<br />
&lt;vCard:Family&gt;Ha&lt;/vCard:Family&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/07/jena-tutorial05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JENA] Tutorial04</title>
		<link>http://eriman.blog.qrobo.com/2009/05/06/jena-tutorial04/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/06/jena-tutorial04/#comments</comments>
		<pubDate>Wed, 06 May 2009 07:18:55 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[JENA]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=83</guid>
		<description><![CDATA[Writing RDF
Jena에서는 RDF로 쓰고 읽는 것을 XML형태로 볼 수 있다.
XML형태로 출력되는 것을 확인해보자.
구분은 아래와 같이 간단하다.
model.write(System.out)&#8217;;
Tutorial03에서 N-Triples 형태로 보기위해 get 함수를 이용하였다.
Jena에 기록되는 내용을 XML로 화면에 출력하고 모델에 기록하는 코드이다.
import com.hp.hpl.jena.rdf.model.*;
import com.hp.hpl.jena.vocabulary.*;
public class Test extends Object
{
static String personURI  = &#8220;http://hacks.wo.to/ju0e&#8220;;
static String hacksName  = &#8220;Ju-young Noh&#8221;;
static String hacksEmail1 = &#8220;hacks@korea.com&#8220;;
static String hacksEmail2 = &#8220;hacks@hacks.wo.to&#8220;;
static String title   = &#8220;An Introduction to RDF [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Writing RDF</strong></p>
<p>Jena에서는 RDF로 쓰고 읽는 것을 XML형태로 볼 수 있다.<br />
XML형태로 출력되는 것을 확인해보자.<br />
구분은 아래와 같이 간단하다.</p>
<p><span>model.write(System.out)&#8217;;</span></p>
<p>Tutorial03에서 N-Triples 형태로 보기위해 get 함수를 이용하였다.<br />
Jena에 기록되는 내용을 XML로 화면에 출력하고 모델에 기록하는 코드이다.</p>
<p><a name="317061_1"></a>import com.hp.hpl.jena.rdf.model.*;<br />
import com.hp.hpl.jena.vocabulary.*;</p>
<p>public class Test extends Object<br />
{<br />
static String personURI  = &#8220;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&#8220;;<br />
static String hacksName  = &#8220;Ju-young Noh&#8221;;<br />
static String hacksEmail1 = &#8220;<a href="mailto:hacks@korea.com" target="_blank">hacks@korea.com</a>&#8220;;<br />
static String hacksEmail2 = &#8220;<a href="mailto:hacks@hacks.wo.to" target="_blank">hacks@hacks.wo.to</a>&#8220;;<br />
static String title   = &#8220;An Introduction to RDF and the Jena API&#8221;;<br />
static String date   = &#8220;13/8/2006&#8243;;</p>
<p>public static void main(String args[])<br />
{<br />
String personURI = &#8220;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&#8220;;<br />
String givenName = &#8220;Ju-young&#8221;;<br />
String familyName = &#8220;Noh&#8221;;<br />
String fullName  = givenName + &#8221; &#8221; + familyName;</p>
<p>Model model = ModelFactory.createDefaultModel();</p>
<p>Resource ju0e<br />
= model.createResource(personURI)<br />
.addProperty(VCARD.FN, fullName)<br />
.addProperty(VCARD.N,<br />
model.createResource()<br />
.addProperty(VCARD.Given, givenName)<br />
.addProperty(VCARD.Family, familyName));</p>
<p>model.write(System.out);<br />
}<br />
}</p>
<p>model.write(System.out); 구분에 RDF/XML-ABREV 나 N-TRIPLE을 사용하면 XML형태를 다르게도 표현할 수 있다.</p>
<p>위 코드의 결과는 기본값으로 출력물이 길고 복잡하다.</p>
<p>&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:vcard=&#8221;<a href="http://www.w3.org/2001/vcard-rdf/3.0" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0</a>#&#8221; &gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&#8220;&gt;<br />
&lt;vcard:N rdf:nodeID=&#8221;A0&#8243;/&gt;<br />
&lt;vcard:FN&gt;Ju-young Noh&lt;/vcard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;rdf:Description rdf:nodeID=&#8221;A0&#8243;&gt;<br />
&lt;vcard:Family&gt;Noh&lt;/vcard:Family&gt;<br />
&lt;vcard:Given&gt;Ju-young&lt;/vcard:Given&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
<p>만약 model.write(System.out, &#8220;RDF/XML-ABBREV&#8221;); 를 사용하게 된다면 심플한 형태로 축약되어 결과를 볼 수 있다.</p>
<p>&lt;rdf:RDF<br />
xmlns:rdf=&#8221;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&#8221;<br />
xmlns:vcard=&#8221;<a href="http://www.w3.org/2001/vcard-rdf/3.0" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0</a>#&#8221;&gt;<br />
&lt;rdf:Description rdf:about=&#8221;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&#8220;&gt;<br />
&lt;vcard:N rdf:parseType=&#8221;Resource&#8221;&gt;<br />
&lt;vcard:Family&gt;Noh&lt;/vcard:Family&gt;<br />
&lt;vcard:Given&gt;Ju-young&lt;/vcard:Given&gt;<br />
&lt;/vcard:N&gt;<br />
&lt;vcard:FN&gt;Ju-young Noh&lt;/vcard:FN&gt;<br />
&lt;/rdf:Description&gt;<br />
&lt;/rdf:RDF&gt;</p>
<p>model.write(System.out, &#8220;N-TRIPLE&#8221;); 을 사용하게 되면 결과를 N-TRIPLE 형태로 볼 수 있다.</p>
<p>_:A302520d0X3aX10d06c16345X3aXX2dX8000 &lt;<a href="http://www.w3.org/2001/vcard-rdf/3.0#Family" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0#Family</a>&gt; &#8220;Noh&#8221; .<br />
_:A302520d0X3aX10d06c16345X3aXX2dX8000 &lt;<a href="http://www.w3.org/2001/vcard-rdf/3.0#Given" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0#Given</a>&gt; &#8220;Ju-young&#8221; .<br />
&lt;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&gt; &lt;<a href="http://www.w3.org/2001/vcard-rdf/3.0#N" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0#N</a>&gt; _:A302520d0X3aX10d06c16345X3aXX2dX8000 .<br />
&lt;<a href="http://hacks.wo.to/ju0e" target="_blank">http://hacks.wo.to/ju0e</a>&gt; &lt;<a href="http://www.w3.org/2001/vcard-rdf/3.0#FN" target="_blank">http://www.w3.org/2001/vcard-rdf/3.0#FN</a>&gt; &#8220;Ju-young Noh&#8221; .</p>
<p>N-TRIPLE 형태로 보게 될  때 결과에서 알수 없는 부분이 출력되는 것은 Jena에서 임의로 노드를 지정한 것이다.</p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/06/jena-tutorial04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JENA] Tutorial03</title>
		<link>http://eriman.blog.qrobo.com/2009/05/05/jena-tutorial03/</link>
		<comments>http://eriman.blog.qrobo.com/2009/05/05/jena-tutorial03/#comments</comments>
		<pubDate>Tue, 05 May 2009 07:18:36 +0000</pubDate>
		<dc:creator>eriman</dc:creator>
				<category><![CDATA[JENA]]></category>

		<guid isPermaLink="false">http://eriman.blog.qrobo.com/?p=81</guid>
		<description><![CDATA[Resource, Property, Value(Resource)를 구현한 내용을 N-Triples 형태로 보도록 하자.
Tutorial02 소스에 출력부분을 추가하면 된다.
// list the statements in the Model
StmtIterator iter = model.listStatements();
// print out the predicate, subject and object of each statement
while(iter.hasNext()) {
Statement stmt  = iter.nextStatement();      // get next statement
Resource subject = stmt.getSubject();       // get the subject
Property predicate = stmt.getPredicate();   // get the predicate
RDFNode object  = stmt.getObject();         // get the [...]]]></description>
			<content:encoded><![CDATA[<p>Resource, Property, Value(Resource)를 구현한 내용을 N-Triples 형태로 보도록 하자.<br />
Tutorial02 소스에 출력부분을 추가하면 된다.</p>
<p>// list the statements in the Model<br />
StmtIterator iter = model.listStatements();</p>
<p>// print out the predicate, subject and object of each statement<br />
while(iter.hasNext()) {<br />
Statement stmt  = iter.nextStatement();      // get next statement<br />
Resource subject = stmt.getSubject();       // get the subject<br />
Property predicate = stmt.getPredicate();   // get the predicate<br />
RDFNode object  = stmt.getObject();         // get the object<br />
System.out.println();<br />
System.out.println(&#8221;ⓡ &#8221; + subject.toString());<br />
System.out.println(&#8221;ⓟ &#8221; + predicate.toString());<br />
if(object instanceof Resource) {<br />
System.out.println(&#8221;ⓥ &#8221; + object.toString());<br />
} else {<br />
System.out.println(&#8221;ⓡ &#8221; + &#8220;&#8221;" + object.toString() + &#8220;&#8221;");<br />
}<br />
}</p>
<p>get을 이용하여 해당 위치의 값을 가져와서 화면에 출력해주는 내용이다.<br />
출력되는 화면은 N-Triples 형태로 출력된다.</p>
<p>본래의 소스에서 출력형태를 보기 쉽도록 약간 수정하였다.<br />
ⓡ은 Resource, ⓟ는 Property, ⓥ는 Value를 의미한다.<br />
Value위치의 값이 Value가 될 경우 &#8220;&#8221;안에 표기되어 출력된다.<br />
총 4개의 N-Triples로 구성된 것을 알 수 있다.</p>
<p>다시 말하면 기본 R-P-V 형태이지만 R-P-R형태로 자원이 자원을 가리킬 수 있도록 의미를 부여한다.<br />
알아볼 수 없는 문자들은 Namespace가 지정돼지 않았기 때문에 Jena에서 임의적으로 부여한 것이다.</p>
<p><a name="317050_1"></a>import com.hp.hpl.jena.rdf.model.*;<br />
import com.hp.hpl.jena.vocabulary.*;</p>
<p>public class Test extends Object<br />
{<br />
static String personURI = &#8220;http://hacks.wo.to/ju0e&#8221;;<br />
static String givenName = &#8220;Ju-young&#8221;;<br />
static String familyName = &#8220;Noh&#8221;;<br />
static String fullName = givenName + &#8221; &#8221; + familyName;<br />
public static void main(String args[]) {<br />
Model model = ModelFactory.createDefaultModel();<br />
Resource ju0e = model.createResource(personURI)<br />
.addProperty(VCARD.FN, fullName)<br />
.addProperty(VCARD.N,<br />
model.createResource()<br />
.addProperty(VCARD.Given, givenName)<br />
.addProperty(VCARD.Family, familyName));<br />
StmtIterator iter = model.listStatements();<br />
while(iter.hasNext()) {<br />
Statement stmt = iter.nextStatement();<br />
Resource subject = stmt.getSubject();<br />
Property predicate = stmt.getPredicate();<br />
RDFNode object = stmt.getObject();<br />
System.out.println();<br />
System.out.println(&#8221;ⓡ &#8221; + subject.toString());<br />
System.out.println(&#8221;ⓟ &#8221; + predicate.toString());<br />
if(object instanceof Resource) {<br />
System.out.println(&#8221;ⓡ &#8221; + object.toString());<br />
} else {<br />
System.out.println(&#8221;ⓥ &#8221; + &#8220;&#8221;" + object.toString() + &#8220;&#8221;");<br />
}<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://eriman.blog.qrobo.com/2009/05/05/jena-tutorial03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
