2012-04-25 52 views
0

我想生成遵循OWL格式的RDF代碼。我能夠生成一個RDF文件,但我需要將其轉換爲OWL。以下是我可以生成的RDF。將RDF轉換爲OWL

<?xml version="1.0" encoding="UTF-8"?> 
<rdf:RDF 
    xmlns:ns1="http://example.com/nodetypes/2012/04/24/vehicle/" 
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
> 
    <rdf:Description rdf:about="http://example.com/nodetypes/2012/04/24/vehicle/2"> 
    <ns1:nodetype_ptr_id>2</ns1:nodetype_ptr_id> 
    <ns1:slug>vehicle</ns1:slug> 
    <ns1:last_update>2012-04-24 23:49:36.633689</ns1:last_update> 
    <ns1:end_publication>2042-03-15 00:00:00</ns1:end_publication> 
    <ns1:tree_id>2</ns1:tree_id> 
    <ns1:featured>False</ns1:featured> 
    <ns1:parent_id>None</ns1:parent_id> 
    <ns1:content></ns1:content> 
    <ns1:rating_score>0</ns1:rating_score> 
    <ns1:rating_votes>0</ns1:rating_votes> 
    <ns1:start_publication>2012-04-24 23:49:15</ns1:start_publication> 
    <ns1:level>0</ns1:level> 
    <ns1:creation_date>2012-04-24 23:49:15</ns1:creation_date> 
    <ns1:status>2</ns1:status> 
    <ns1:template>gstudio/nodetype_detail.html</ns1:template> 
    <ns1:content_org>None</ns1:content_org> 
    <ns1:excerpt></ns1:excerpt> 
    <ns1:plural>vehicles</ns1:plural> 
    <ns1:comment_enabled>True</ns1:comment_enabled> 
    <ns1:password></ns1:password> 
    <ns1:title>vehicle</ns1:title> 
    <ns1:login_required>False</ns1:login_required> 
    <ns1:pingback_enabled>True</ns1:pingback_enabled> 
    <ns1:rurl></ns1:rurl> 
    </rdf:Description> 
</rdf:RDF> 

回答

9

您已完成。你在那裏有一個RDF/XML文件。 OWL的規範語法是RDF/XML。所以它也是一個OWL文件。

11

正如cygri所說,這項工作已經完成。但是,現在有兩個額外的規範語法:OWL/XMLFunctional syntax,它用於指定什麼是OWL本體並指定其直接語義。除此之外,還有OWL的非規範語法:The Manchester syntax和所有RDF序列化語法(Turtle,N-Triples,Notation3,JSON-LD, RDF/JSON,等)。 RDF Working Group工作在making Turtle a standard,以及a JSON serialisation

爲了切換格式,您可以使用the converter at University of Manchester,它可以輸出RDF/XML,Turtle,OWL/XML,曼徹斯特語法,函數語法和LaTeX(用於文章中的良好渲染)。

編輯:自2014年2月起,Turtle,N-Triples,N-QuadsTrig是RDF的規範語法。

+0

非常感謝!在曼徹斯特大學的轉換器真的很棒,但我不想使用任何轉換器從rdf/xml切換到owl/xml,而是需要一個可以幫助我做到這一點的代碼。 ???? plzz幫助... – 2012-04-26 09:12:26

+0

Amita,如果您使用的是Java,請使用OWL API。 http://owlapi.sourceforge.net/ – 2012-04-28 08:09:19

+0

謝謝...但我不使用java,而是在Django框架上使用python .. – 2012-05-03 10:20:34