is there support for files created by external tools like protege? would be great if you can make your hirarchical tree outside in an axternal programm and import it then via rdf(s).

CommentFileSizeAuthor
#5 IMA.txt2.33 KBmarcoka
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

It supports a bunch of different formats, based on several publicly available resources and freely available downloads from useful sources.
I've not seen any examples of 'protoge'. Does it create RDF or its own proprietary file format?

The idea is that any good taxonomy management tool should be able to export something that other tools can import. And that this module should be able to import a few widely-supported open standards.
What have you found in the way of documentation for this output so far?

marcoka’s picture

they use some custom stuff like:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [
	 <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	 <!ENTITY kb 'http://protege.stanford.edu/kb#'>
	 <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
]>
<rdf:RDF xmlns:rdf="&rdf;"
	 xmlns:kb="&kb;"
	 xmlns:rdfs="&rdfs;">
<rdfs:Class rdf:about="&kb;Animals"
	 rdfs:label="Animals">
	<rdfs:subClassOf rdf:resource="&rdfs;Resource"/>
</rdfs:Class>
<rdfs:Class rdf:about="&kb;Brick"
	 rdfs:label="Brick">
	<rdfs:subClassOf rdf:resource="&kb;Stone"/>
</rdfs:Class>

i think thats why it does not work. ysome knows any tools that output a "standard" markup?

marcoka’s picture

But:
Paste this

<?xml version="1.0"?>


<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
    <!ENTITY Ontology1272015195984 "http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#" >
]>


<rdf:RDF xmlns="http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#"
     xml:base="http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:Ontology1272015195984="http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#">
    <owl:Ontology rdf:about=""/>
    


    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Classes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Animals -->

    <owl:Class rdf:about="#Animals"/>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Glass -->

    <owl:Class rdf:about="#Glass"/>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Metal -->

    <owl:Class rdf:about="#Metal">
        <rdfs:subClassOf rdf:resource="&owl;Thing"/>
    </owl:Class>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Nature -->

    <owl:Class rdf:about="#Nature"/>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Paper -->

    <owl:Class rdf:about="#Paper"/>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Plastic -->

    <owl:Class rdf:about="#Plastic"/>
    


    <!-- http://www.semanticweb.org/ontologies/2010/3/Ontology1272015195984.owl#Stone -->

    <owl:Class rdf:about="#Stone"/>
    


    <!-- http://www.w3.org/2002/07/owl#Thing -->

    <owl:Class rdf:about="&owl;Thing"/>
</rdf:RDF>


INTO:http://www.w3.org/RDF/Validator/

it says valid.

dman’s picture

That's valid enough. And indeed works like I'd have expected to, Running that file through taxonomy_xml rdf input gives me 8 terms, one as a subset.

If you look at the help docs provided with the module there is a large writeup on the many formats I've evaluated so far, and the ones I've been able to support.
The code you paste above is good - it looks like it conforms with the same reference I used :
(from the module documentation)

The dialect of RDF used in this module (even within this
strict schema there are markup variations possible) is
intended to resemble the (non-normative) examples found in
the W3C
recommendations
, specifically the sample Wine Ontology
[ href="http://www.w3.org/TR/owl-guide/wine.rdf">RDF].

We don't mind if the protoge tool extends the data with other things - it is correctly namespaced by the looks of things http://protege.stanford.edu/kb# so it's all tidy.
So any data that is specific to only that protoge tool might not have a way to be stored within Drupal.

The structure - what we work with - is the rdf & rdfs element names.
So that part should all just work.

If you can supply any pointers to the dataset you are having trouble with, I may be able to test some simple fixes . But the example you pasted above works great for me!

Did you follow the install instructions for ARC in install.txt? Note that that refers to ARC1, ARC2 is now out, but that won't be upgraded to until the Drupal 7 rewrite.

marcoka’s picture

FileSize
2.33 KB

it works with the sample files.
when i copy the above text and paste it into a test.rdf and import it it says:

* Loaded file IMA.rdf. Now processing it.
* Created vocabulary 56 IMA.rdf to put these terms into. You probably want to go edit it now.
* Parsing RDF
* 10 data triples (atomic statements) found in the source RDF doc
* Found 2 different kinds of resources in the input : http://www.w3.org/2002/07/owl#Ontology, http://www.w3.org/2002/07/owl#Class
* Found 0 resources to be imported as terms into vocabulary 56

Failed to import any new terms. This may be due to syntax or formattings errors in the import file.
The attached file works for you?

thanks