innoq / iqvoc

iQvoc - A SKOS(-XL) Vocabulary Management System for the Semantic Web
http://iqvoc.net/
Other
117 stars 44 forks source link

A question about export #352

Closed etcware closed 8 years ago

etcware commented 8 years ago

I would like to export my thesaurus that has two levels (top and narrower): the export operation produces only a list of the top terms with the id of narrower terms, and doesn't produce the narrower terms description as you can see in the RDF/XML in the following. Do I miss anything?

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/spec/" xmlns:void="http://rdfs.org/ns/void#" xmlns:iqvoc="http://try.iqvoc.net/schema#" xmlns="http://mydomain.it/" xmlns:schema="http://mydomain.it/schema#">
  <rdf:Description rdf:about="http://mydomain.it/_93b204d5">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">food &amp; drink</skos:prefLabel>
    <skos:prefLabel xml:lang="it">cibo &amp; bevande</skos:prefLabel>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/_b02a85c5">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">green</skos:prefLabel>
    <skos:prefLabel xml:lang="it">verde</skos:prefLabel>
    <skos:narrower rdf:resource="http://mydomain.it/_6da4ee26"/>
    <skos:narrower rdf:resource="http://mydomain.it/_3e5e5b86"/>
    <skos:narrower rdf:resource="http://mydomain.it/_578aadeb"/>
    <skos:narrower rdf:resource="http://mydomain.it/_3e5e5b86"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/_0ad94639">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">heritage</skos:prefLabel>
    <skos:prefLabel xml:lang="it">heritage</skos:prefLabel>
    <skos:narrower rdf:resource="http://mydomain.it/_09830aeb"/>
    <skos:narrower rdf:resource="http://mydomain.it/_a1ff3cb9"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/_eb7ad68f">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">holy</skos:prefLabel>
    <skos:prefLabel xml:lang="it">sacro</skos:prefLabel>
    <skos:narrower rdf:resource="http://mydomain.it/_f5b0915d"/>
    <skos:narrower rdf:resource="http://mydomain.it/_d79094c6"/>
    <skos:narrower rdf:resource="http://mydomain.it/_7544cb27"/>
    <skos:narrower rdf:resource="http://mydomain.it/_dbed9041"/>
    <skos:narrower rdf:resource="http://mydomain.it/_52905fcc"/>
    <skos:narrower rdf:resource="http://mydomain.it/_6da0846f"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/_332e07f3">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">shopping</skos:prefLabel>
    <skos:prefLabel xml:lang="it">shopping</skos:prefLabel>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/_6ab65502">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://mydomain.it/scheme"/>
    <skos:inScheme rdf:resource="http://mydomain.it/scheme"/>
    <skos:prefLabel xml:lang="en">urban</skos:prefLabel>
    <skos:prefLabel xml:lang="it">urbano</skos:prefLabel>
    <skos:narrower rdf:resource="http://mydomain.it/_744a352e"/>
    <skos:narrower rdf:resource="http://mydomain.it/_20617637"/>
    <skos:narrower rdf:resource="http://mydomain.it/_bca06a3a"/>
    <skos:narrower rdf:resource="http://mydomain.it/_5a55f92b"/>
    <skos:narrower rdf:resource="http://mydomain.it/_e3586176"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://mydomain.it/scheme">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#ConceptScheme"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_93b204d5"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_b02a85c5"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_0ad94639"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_eb7ad68f"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_332e07f3"/>
    <skos:hasTopConcept rdf:resource="http://mydomain.it/_6ab65502"/>
  </rdf:Description>
</rdf:RDF>
mjansing commented 8 years ago

Hmm that looks weird. Currently we don't know such a rdf-export issue.

I tried to reprodruce this behavour with a minimal example (1 top concept and a narrower) and couldn't find any problems.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/spec/" xmlns:void="http://rdfs.org/ns/void#" xmlns:iqvoc="http://try.iqvoc.net/schema#" xmlns="http://try.iqvoc.net/" xmlns:schema="http://try.iqvoc.net/schema#">
  <rdf:Description rdf:about="http://try.iqvoc.net/_fd795288">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:topConceptOf rdf:resource="http://try.iqvoc.net/scheme"/>
    <skos:inScheme rdf:resource="http://try.iqvoc.net/scheme"/>
    <skos:prefLabel xml:lang="en">Top-Term Concept</skos:prefLabel>
    <skos:narrower rdf:resource="http://try.iqvoc.net/_fa58f8ea"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://try.iqvoc.net/_fa58f8ea">
    <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
    <skos:inScheme rdf:resource="http://try.iqvoc.net/scheme"/>
    <skos:prefLabel xml:lang="en">Narrower Concept</skos:prefLabel>
    <skos:broader rdf:resource="http://try.iqvoc.net/_fd795288"/>
  </rdf:Description>
</rdf:RDF>

Which iQvoc version you are using? Did you try a different RDF-serialisation like N-Triples or Turtle?

etcware commented 8 years ago

Thanks for your answer, I think that it is not an issue as I told in #352. The version I’m using is the open source ruby version 4.9.0 (is a java version available?) To get the content I put on the issue I go to Scheme page and I click on Representation -RDF/XML. My doubt is that export is another feature with respect to Representation, but when I go to Dashboard - Export and I request an export it doesn’t return any file, it starts a job that doesn’t terminate and I have only 20 concepts. Where is saved the export file? Regards Alessandra

Il giorno 11 feb 2016, alle ore 10:52, Marc Jansing notifications@github.com ha scritto:

Hmm that looks weird. Currently we don't know such a rdf-export issue.

I tried to reprodruce this behavour with a minimal example (1 top concept and a narrower) and couldn't find any problems.

<?xml version="1.0" encoding="UTF-8"?>

Top-Term Concept/skos:prefLabel /rdf:Description Narrower Concept/skos:prefLabel /rdf:Description /rdf:RDF Which iQvoc version you are using? Did you try a different RDF-serialisation like N-Triples or Turtle? — Reply to this email directly or view it on GitHub https://github.com/innoq/iqvoc/issues/352#issuecomment-182786439.
mjansing commented 8 years ago

OK now I got it. You visited iQvoc's concept scheme page and switched from HTML-representation to XML. It's absolutely correct that this representation only references narrower concept and not fully include them into this representation. If you wan't to export your whole thesaurus data, you should use iQvoc's export functionality.

There are two ways to export thesaurus data:

  1. Use iQvoc's web interface to trigger thesaurus export. Please note that this method only spawns an asynchronous export job. You need a job worker which start this job or trigger it manually via command line with [bundle exec] rake jobs:workoff
  2. Start export directly via command line without creating a export job on web interface: [bundle exec] rake iqvoc:export TYPE=<ttl|nt|xml> NAMESPACE='<URI>'

Where is saved the export file?

Exports will be saved in public/exports/*

The version I’m using is the open source ruby version 4.9.0 (is a java version available?)

Yes. It's possible to use iQvoc with JRuby so you're able to run iQvoc on the JVM. Please note that you have to switch Gemfile-Dependencies which use native extensions to JRuby compatibe versions (especially database adaptors like mysql2, sqlite3 to activerecord-jdbc-adapter, jdbc-mysql etc.)