<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://chem-bla-ics.linkedchemistry.info/feed/by_tag/skos.xml" rel="self" type="application/atom+xml" /><link href="https://chem-bla-ics.linkedchemistry.info/" rel="alternate" type="text/html" /><updated>2026-06-15T12:00:19+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/feed/by_tag/skos.xml</id><title type="html">chem-bla-ics</title><subtitle>Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.</subtitle><author><name>Egon Willighagen</name></author><entry><title type="html">MetWare screenshot: propagating XML Schema data types</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html" rel="alternate" type="text/html" title="MetWare screenshot: propagating XML Schema data types" /><published>2008-08-26T00:00:00+00:00</published><updated>2008-08-26T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html"><![CDATA[<p>Just a quick screenshot. Remember our use of <a href="https://chem-bla-ics.linkedchemistry.info/2008/05/16/metware-status-report.html">SKOS in MetWare <i class="fa-solid fa-recycle fa-xs"></i></a>?
<a href="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html">Steffen <i class="fa-solid fa-recycle fa-xs"></i></a> has been working on creating integrated
<a href="http://en.wikipedia.org/wiki/JavaServer_Faces">JSF pages</a>, while I am focusing on autogeneration of blobs. The below screenshot is
such a blob, called a UI component in JSF, which allows easy embedding the the aggregations Steffen is working on.</p>

<p>Autogeneration of web content benefits greatly from well defined input, including data types.
<a href="http://www.metware.org/">MetWare</a> uses <a href="http://en.wikipedia.org/wiki/XML_Schema_(W3C)#Data_Types">XML Schema Data Types</a>
for this, as <a href="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html">mentioned ealier <i class="fa-solid fa-recycle fa-xs"></i></a> when I briefly
mentioned generation of search pages. That example showed the creation of range input on <code class="language-plaintext highlighter-rouge">xsd:integer</code> types. The below screenshot
shows the different output for <code class="language-plaintext highlighter-rouge">xsd:string</code> (input text box) and <code class="language-plaintext highlighter-rouge">xsd:boolean</code>:</p>

<p><img src="/assets/images/boolDataType.png" alt="" /></p>

<p>Now, this example is not really shocking, but MetWare defines additional types, for example an InChI data type:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;simpleType</span> <span class="na">name=</span><span class="s">"inchi"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;restriction</span> <span class="na">base=</span><span class="s">"string"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;pattern</span> <span class="na">value=</span><span class="s">"InChI=1/.*"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/restriction&gt;</span>
<span class="nt">&lt;/simpleType&gt;</span>
</code></pre></div></div>

<p>This allows me to tweak the HTML output created by the JSF pages to include <a href="http://microformats.org/">microformats</a> to support
the <a href="https://chem-bla-ics.linkedchemistry.info/2007/05/05/cb-comments-for-inchis.html">Sechemtic <i class="fa-solid fa-recycle fa-xs"></i></a> userscript (see also
doi:<a href="https://doi.org/10.1186/1471-2105-8-487">10.1186/1471-2105-8-487</a>).</p>

<p>Or, to provide a drop down box, listing the allowed values:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;simpleType</span> <span class="na">name=</span><span class="s">"deviceVendor"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;restriction</span> <span class="na">base=</span><span class="s">"string"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;enumeration</span> <span class="na">value=</span><span class="s">"BioCrates"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;enumeration</span> <span class="na">value=</span><span class="s">"Bruecker"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/restriction&gt;</span>
<span class="nt">&lt;/simpleType&gt;</span>
</code></pre></div></div>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="xml" /><category term="skos" /><category term="doi:10.1186/1471-2105-8-487" /><summary type="html"><![CDATA[Just a quick screenshot. Remember our use of SKOS in MetWare ? Steffen has been working on creating integrated JSF pages, while I am focusing on autogeneration of blobs. The below screenshot is such a blob, called a UI component in JSF, which allows easy embedding the the aggregations Steffen is working on.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/boolDataType.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/boolDataType.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">MetWare screenshot: spectrum support #2</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html" rel="alternate" type="text/html" title="MetWare screenshot: spectrum support #2" /><published>2008-08-21T00:00:00+00:00</published><updated>2008-08-21T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html"><![CDATA[<p>As <a href="https://chem-bla-ics.linkedchemistry.info/2008/08/20/metware-screenshot-spectrum-support.html">promised yesterday <i class="fa-solid fa-recycle fa-xs"></i></a>, here’s the pretty
visualization of the mass spectrum, using JavaScript from the <a href="http://www.ebi.ac.uk/pride/#soft">PRIDE project</a>:</p>

<p><img src="/assets/images/msGUI.png" alt="" /></p>

<p>Note the manual adding of peaks at 10 and 100 m/z to get the real peaks somewhere in the middle instead of on the left and right border of the graph.</p>

<p>Meanwhile, the search page is now autogenerated too, and the types of searches allowed (min, max in the picture) again depends on the
XML Scheme data type defined in the <a href="http://metware.svn.sourceforge.net/viewvc/metware/BigMet/trunk/src/main/onto/metware.skos?content-type=text%2Fxml&amp;revision=HEAD">MetWare SKOS</a>:</p>

<p><img src="/assets/images/mwSearch.png" alt="" /></p>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="metabolomics" /><category term="xml" /><category term="skos" /><summary type="html"><![CDATA[As promised yesterday , here’s the pretty visualization of the mass spectrum, using JavaScript from the PRIDE project:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msGUI.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msGUI.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">MetWare, SKOS and Java Server Faces</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/04/30/metware-skos-and-java-server-faces.html" rel="alternate" type="text/html" title="MetWare, SKOS and Java Server Faces" /><published>2008-04-30T00:00:00+00:00</published><updated>2008-04-30T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/04/30/metware-skos-and-java-server-faces</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/04/30/metware-skos-and-java-server-faces.html"><![CDATA[<p>The <a href="http://metware.sf.net/">MetWare</a> components are slowly coming together. The RAW data upload facility prototype went into beta stage,
while the <a href="http://chem-bla-ics.blogspot.com/search?q=SKOS">SKOS</a> has proven really useful for various things. <!-- keep link --></p>

<p>Because of being compatible with various Java libraries and tools, we decided some time ago to use Java. We also wanted to start of with a
HTML GUI to MetWare, which led us to <a href="http://java.sun.com/javaee/javaserverfaces/">Java Server Faces</a>. Not being so fond of Tomcat (e.g.
use by the <a href="http://www.nmrshiftdb.org/">NMRShiftDB</a>), I was not sure how that would turn out, but Steffen was rather positive about it. And I like it :)</p>

<p><img src="/assets/images/metwareJSF2.png" alt="" /></p>

<p>The source code for this screenshot is rather simple:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;table&gt;</span>
  <span class="nt">&lt;tr</span> <span class="na">valign=</span><span class="s">"top"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;td&gt;&lt;br/&gt;</span>Monoisotopic Mass:<span class="nt">&lt;br/&gt;</span>
          min=<span class="nt">&lt;inputText</span> <span class="na">id=</span><span class="s">"monomassmin"</span> <span class="na">value=</span><span class="s">"#{metidMetaboliteQuery.monoisotopicMassMin}"</span><span class="nt">/&gt;&lt;br/&gt;</span>
          max=<span class="nt">&lt;inputText</span> <span class="na">id=</span><span class="s">"monomassmax"</span> <span class="na">value=</span><span class="s">"#{metidMetaboliteQuery.monoisotopicMassMax}"</span><span class="nt">/&gt;&lt;br/&gt;</span>
        <span class="nt">&lt;commandButton</span> <span class="na">value=</span><span class="s">"Search"</span> <span class="na">id=</span><span class="s">"submit"</span> <span class="na">action=</span><span class="s">"#{metidMetaboliteQuery.search}"</span><span class="nt">/&gt;</span>

        <span class="c">&lt;!--  search results --&gt;</span>
        <span class="nt">&lt;p&gt;&lt;dataTable</span> <span class="na">value=</span><span class="s">"#{metidMetaboliteQuery.results}"</span> <span class="na">var=</span><span class="s">"mbolite"</span><span class="nt">&gt;</span>
           <span class="nt">&lt;facet</span> <span class="na">name=</span><span class="s">"caption"</span><span class="nt">&gt;</span>Search Results...<span class="nt">&lt;/facet&gt;</span>
           <span class="nt">&lt;column&gt;</span>
             <span class="nt">&lt;facet</span> <span class="na">name=</span><span class="s">"header"</span><span class="nt">&gt;&lt;outputText</span> <span class="na">value=</span><span class="s">"Monoisotopic mass"</span><span class="nt">/&gt;&lt;/facet&gt;</span>
             <span class="nt">&lt;outputText</span> <span class="na">value=</span><span class="s">"#{mbolite.monoisotopicMass}"</span><span class="nt">/&gt;</span>
           <span class="nt">&lt;/column&gt;</span>
           <span class="nt">&lt;column&gt;</span>
             <span class="nt">&lt;facet</span> <span class="na">name=</span><span class="s">"header"</span><span class="nt">&gt;&lt;outputText</span> <span class="na">value=</span><span class="s">"InChIKey"</span><span class="nt">/&gt;&lt;/facet&gt;</span>
             <span class="nt">&lt;outputText</span> <span class="na">value=</span><span class="s">"#{mbolite.inchikey}"</span><span class="nt">/&gt;</span>
           <span class="nt">&lt;/column&gt;</span>
         <span class="nt">&lt;/dataTable&gt;&lt;/p&gt;</span>
        <span class="nt">&lt;/td&gt;</span>
    <span class="nt">&lt;td</span> <span class="na">width=</span><span class="s">"25%"</span><span class="nt">&gt;</span>
      <span class="nt">&lt;b&gt;&lt;outputText</span> <span class="na">id=</span><span class="s">"tabelName"</span> <span class="na">value=</span><span class="s">"#{metidMetabolite.prefLabel}"</span><span class="nt">/&gt;</span>:<span class="nt">&lt;/b&gt;</span>
      <span class="nt">&lt;br/&gt;</span>
      <span class="nt">&lt;outputText</span> <span class="na">id=</span><span class="s">"tabelDef"</span> <span class="na">value=</span><span class="s">"#{metidMetabolite.definition}"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;/td&gt;</span>
  <span class="nt">&lt;/tr&gt;</span>
<span class="nt">&lt;/table&gt;</span>
</code></pre></div></div>

<p>Key concept here is that JSF uses <a href="https://en.wikipedia.org/wiki/JavaBeans">Java Beans</a>, which are referred to in the above example with code like <code class="language-plaintext highlighter-rouge">#{bean.field}</code>
for bean fields, and with <code class="language-plaintext highlighter-rouge">#{bean.method}</code>, assuming a bean exists with <code class="language-plaintext highlighter-rouge">getField()</code>, <code class="language-plaintext highlighter-rouge">setField()</code> and <code class="language-plaintext highlighter-rouge">method()</code>.
The <code class="language-plaintext highlighter-rouge">&lt;h:outputText&gt;</code> stuff is JSF to work out bean details and will create HTML in the output. As really brief intro.</p>

<h2 id="the-metware-beans">The Metware Beans</h2>

<p>It is clear that java beans for Metware would be useful, and this is what I have been working on for the last few weeks.
The relevant beans for the above example are automagically created from the SKOS, complemented with extra bits of RDF
for the additional details, like field data type, mapping to SQL tables, and an example value. This all works very
smoothly (the code to <code class="language-plaintext highlighter-rouge">load()</code> and <code class="language-plaintext highlighter-rouge">save()</code> into the SQL database is automatically generated too!) as you can see in
the above example. The screenshot shows matches from a (local) live SQL metabolomics database. The text on the right
side is directly taken from the SKOS.</p>

<p>Now, the bean library allows integration with other tools too, though this cannot be found in our current roadmap.
But, for example, I have been thinking about a simple <a href="http://www.bioclipse.net/">Bioclipse</a> wrapper around these
beans. What is on our roadmap involves workflows for metabolomics.</p>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="java" /><category term="bioclipse" /><category term="skos" /><category term="nmrshiftdb" /><summary type="html"><![CDATA[The MetWare components are slowly coming together. The RAW data upload facility prototype went into beta stage, while the SKOS has proven really useful for various things.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/metwareJSF2.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/metwareJSF2.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>