Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Is it normal for the changed namespace delcaration when saving changed ontology

zhang weishan dr_zhangws at yahoo.com
Tue Jan 8 02:47:18 PST 2008


Hello Tania,
  The reason to use OWLModelWriter is that it is the only way that works for me.  I searched the mailing list to see how to use it.
  I used relative path in the repository file which allow the update of the imported ontology.  I updated one imported ontology, when using owlmodel.save, if save(importingontologyName), it will only save the importing ontology while not saving the modified imported ontology. When i use save(importedontologyName), all importing ontology is saved in this imported ontology then which is not what i want.
  Did i misuse them?

  Cheers,
  Weishan
 




----- Original Message ----
From: Tania Tudorache <tudorache at stanford.edu>
To: User support for the Protege-OWL editor <protege-owl at lists.stanford.edu>
Sent: Tuesday, January 8, 2008 11:17:35 AM
Subject: Re: [protege-owl] Is it normal for the changed namespace delcaration when saving changed ontology


Weishan,

I wondered why did you use the OWLModelWriter. Did you find it anywhere
 
in the documentation?

The OWLModelWriter is the Protege experimental native writer. The 
RDF/XML writer used when you save an ontology from the Protege UI or 
when you invoke the owlModel.save method is the Jena writer, which is 
the default one for Protege. For that reason, the output of the two
 save 
methods are different.

Tania



zhang weishan wrote:
> It seems that OWLModelWriter is quite different with the 
> owlModel.save, which should be explained in the tutorial, or 
> somewhere... Sorry if i missed this information if it exists already.
>
>
> ----- Original Message ----
> From: zhang weishan <dr_zhangws at yahoo.com>
> To: protege-owl at lists.stanford.edu
> Sent: Tuesday, January 8, 2008 4:08:03 AM
> Subject: [protege-owl] Is it normal for the changed namespace 
> delcaration when saving changed ontology
>
> Dear All,
>   I am using the an ontology which contains SWRL rules, and it
 imports 
> another ontology (StateMachine.owl) that is updated periodiacally.
>   When i use :
>     FileWriter writer = new 
> FileWriter("D:/Tomcat/webapps/ontology/StateMachine.owl");
>
>                    OWLModelWriter omw = new OWLModelWriter(owlModel, 
>                            
> owlModel.getTripleStoreModel().getActiveTripleStore(), writer);
>                    omw.write();
>                    writer.close();
>
>   The original name space declaration is:
>   <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xmlns="http://localhost:9999/ontology/StateMachine.owl#"
>     xmlns:owl="http://www.w3.org/2002/07/owl#"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
>     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
>   xml:base="http://localhost:9999/ontology/StateMachine.owl">
>
> After switching the active triple store, the StateMachine.owl is
 saved 
> after changed. But now the name space declaration is as attached. It 
> is a valid but not as tidy as the original one. Is this normal? Or 
> what should i do to avoid this?
>
> Cheers,
> Weishan
>
>
>
>
> <!DOCTYPE rdf:RDF [
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
> ]>
>
>
>
>      xml:base="http://localhost:9999/ontology/StateMachine.owl"
>      
>
 xmlns:operatingSystem="http://localhost:9999/ontology/OperatingSystem.owl#"
>      xmlns:Java="http://localhost:9999/ontology/Java.owl#"
>      
>
 xmlns:abox="http://swrl.stanford.edu/ontologies/built-ins/3.3/abox.owl#"
>      
>
 xmlns:sqwrl="http://sqwrl.stanford.edu/ontologies/built-ins/3.4/sqwrl.owl#"
>      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
>      xmlns:swrl="http://www.w3.org/2003/11/swrl#"
>      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>      xmlns:owl11="http://www.w3.org/2006/12/owl11#"
>      xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
>      xmlns:owl11xml="http://www.w3.org/2006/12/owl11-xml#"
>      xmlns:error="http://localhost:9999/ontology/Error.owl#"
>      
>
 xmlns:swrlx="http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl#"
>    
  xmlns:statemachine="http://localhost:9999/ontology/StateMachine.owl#"
>      xmlns:units="http://localhost:9999/ontology/Units.owl#"
>      
>
 xmlns:swrlm="http://swrl.stanford.edu/ontologies/built-ins/3.4/swrlm.owl#"
>      
>
 xmlns:SoftwarePlatform="http://localhost:9999/ontology/SoftwarePlatform.owl#"
>      xmlns:Hardware="http://localhost:9999/ontology/Hardware.owl#"
>      
>
 xmlns:temporal="http://swrl.stanford.edu/ontologies/built-ins/3.3/temporal.owl#"
>      xmlns:owl="http://www.w3.org/2002/07/owl#"
>      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
>      xmlns:device="http://localhost:9999/ontology/Device.owl#"
>      xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
>      xmlns:DotNet="http://localhost:9999/ontology/DotNet.owl#"
>      
>
 xmlns:tbox="http://swrl.stanford.edu/ontologies/built-ins/3.3/tbox.owl#"
>    
  xmlns:swrla="http://swrl.stanford.edu/ontologies/3.3/swrla.owl#">
>
>
 ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
 Try 
> it now. 
>
 <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> 
>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
 <mailto:protege-owl at lists.stanford.edu>
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>
 ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
 Try 
> it now. 
>
 <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> 
>
>
 ------------------------------------------------------------------------
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing:
 http://protege.stanford.edu/doc/faq.html#01a.03 
>   

_______________________________________________
protege-owl mailing list
protege-owl at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing:
 http://protege.stanford.edu/doc/faq.html#01a.03 






      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20080108/44ec5f8f/attachment.html>


More information about the protege-owl mailing list