<br><font size=2 face="sans-serif">Hi Peter, </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; In XML/ABBREV mode, the
serializer uses rdf:Types for element names. &nbsp;Since your example doesn't
have an rdf:Type, it uses the default Jena element names.</font>
<br>
<br><font size=2 face="sans-serif">- Ben</font>
<br>
<br>
<br><font size=2 face="sans-serif">Ben Szekely<br>
IBM Software Engineer<br>
Advanced Internet Technology, Cambridge, MA<br>
bhszekel@us.ibm.com</font>
<br>
<br><tt><font size=2>tdwg-guid-bounces@mailman.nhm.ku.edu wrote on 09/25/2006
11:02:30 AM:<br>
<br>
&gt; Hi Everyone,<br>
&gt; <br>
&gt; Does anyone have/or know of any good examples of using Jena to output<br>
&gt; RDF metadata with non-typical namespaces such as TCS/RDF? <br>
&gt; <br>
&gt; Currently I have the following code for my metadata method(I know
it's<br>
&gt; wrong!).<br>
&gt; <br>
&gt; String TN_NS = &quot;http://tdwg.org/2006/03/12/TaxonNames/&quot;;<br>
&gt; ByteArrayOutputStream byteStream = new ByteArrayOutputStream();<br>
&gt; Model model = ModelFactory.createDefaultModel();<br>
&gt; Resource res = model.createResource(&quot;http://test&quot;);<br>
&gt; res.addProperty(model.createProperty(TN_NS,&quot;testProperty&quot;),&quot;test&quot;);<br>
&gt; <br>
&gt; model.write(byteStream, &quot;RDF/XML-ABBREV&quot;);<br>
&gt; return new MetadataResponse(new<br>
&gt; ByteArrayInputStream(byteStream.toByteArray()),null,MetadataResponse.RDF<br>
&gt; _FORMAT);<br>
&gt; <br>
&gt; ...which gives me.<br>
&gt; <br>
&gt; &lt;rdf:RDF<br>
&gt; &nbsp; &nbsp; xmlns:j.0=&quot;http://tdwg.org/2006/03/12/TaxonNames/&quot;<br>
&gt; &nbsp; &nbsp; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;<br>
&gt; &nbsp; &lt;rdf:Description rdf:about=&quot;http://test&quot;&gt;<br>
&gt; &nbsp; &nbsp; &lt;j.0:testProperty &gt;test&lt;/j.0:testProperty&gt;<br>
&gt; &nbsp; &lt;/rdf:Description&gt;<br>
&gt; &lt;/rdf:RDF&gt;<br>
&gt; <br>
&gt; ...whereas I could really do with something along the lines of the
IPNI<br>
&gt; metadata.<br>
&gt; <br>
&gt; &lt;rdf:RDF xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>
&gt; &nbsp; &nbsp; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;<br>
&gt; xmlns:dcterms=&quot;http://purl.org/dc/terms/&quot;<br>
&gt; &nbsp; &nbsp; xmlns:tn=&quot;http://tdwg.org/2006/03/12/TaxonNames/&quot;<br>
&gt; &nbsp; &nbsp; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;<br>
&gt; &nbsp; &nbsp; <br>
&gt; &nbsp; &nbsp; &lt;!-- example family (has an unlinked typifying name
withnon-<br>
&gt; standard format data)--&gt;<br>
&gt; &nbsp; &nbsp; &lt;tn:TaxonName<br>
&gt; rdf:about=&quot;urn:lsid:ipni.org:names:30000959-2:1.1.2.1&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:nomenclaturalCode rdf:resource=&quot;&amp;tn;#botanical&quot;
/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;dc:title&gt;Amaryllidaceae J.St.-Hil.&lt;/dc:title&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;dcterms:created&gt;2004-01-20 00:00:00.0&lt;/dcterms:created&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;dcterms:modified&gt;2005-06-23<br>
&gt; 15:45:33.0&lt;/dcterms:modified&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:rankString&gt;fam.&lt;/tn:rankString&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:nameComplete&gt;Amaryllidaceae&lt;/tn:nameComplete&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:uninomial&gt;Amaryllidaceae&lt;/tn:uninomial&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:authorship&gt;J.St.-Hil.&lt;/tn:authorship&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:publishedIn&gt;Expos. Fam. Nat. 1: 134.
1805 [Feb-Apr<br>
&gt; 1805]&lt;/tn:publishedIn&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:year&gt;1805&lt;/tn:year&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tn:typifiedBy&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tn:NomenclaturalType&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;dc:title&gt;Amaryllis Linnaeus,
nom.<br>
&gt; cons.&lt;/dc:title&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;/tn:NomenclaturalType&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;/tn:typifiedBy&gt;<br>
&gt; &nbsp; &nbsp; &lt;/tn:TaxonName&gt;<br>
&gt; &nbsp; &nbsp; <br>
&gt; I think the main problem I have is creating resources that aren't<br>
&gt; defined as vocabularies within Jena already. I can't seem to find
a way<br>
&gt; to create that &lt;tn:TaxonName root resource element.<br>
&gt; <br>
&gt; I'm starting to think that just outputting vanilla text could be the<br>
&gt; best option here, or am I barking up the wrong tree?<br>
&gt; <br>
&gt; Many thanks, Peter. <br>
&gt; <br>
&gt; Peter Hollas MSc BSc(hons) (Peter.Hollas@thomson.com)<br>
&gt; Software Engineer /Systems Administrator<br>
&gt; Thomson Zoological<br>
&gt; Innovation Centre<br>
&gt; York Science Park<br>
&gt; Heslington<br>
&gt; York<br>
&gt; YO10 5DG<br>
&gt; <br>
&gt; Tel: 01904-435113<br>
&gt; Fax: 01904-435114 <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; TDWG-GUID mailing list<br>
&gt; TDWG-GUID@mailman.nhm.ku.edu<br>
&gt; http://mailman.nhm.ku.edu/mailman/listinfo/tdwg-guid<br>
</font></tt>