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] [POSSIBLE VIRUS:###] Re: converting with kazuki to java

Mark Rot deus.mark at gmx.at
Sat Jul 10 04:12:17 PDT 2010


Hi and thank you very much!!

it really helped :).. however.. i have one more question to ask:

is it possible to store the data in a tdb jena database? i want to have 
them persistent and easy to access..

kind regards


Am 06.07.2010 19:21, schrieb Timothy Redmond:
>
> You can save the ontology using the owlModel.getProject().save() 
> method.  The following code works.
>
> -Timothy
>
>
>                  Collection errors = new ArrayList();
>                  Project p = new Project("Customer.pprj", errors);
>                  if (!errors.isEmpty()) {
>                      System.out.println("Error");
>                      return;
>                  }
>                  OWLModel model = (OWLModel) p.getKnowledgeBase();
>
>
>                  MyFactory factory = new MyFactory(model);
>                  Customer c = factory.createCustomer("test");
>                  c.setFirstName("Timothy");
>                  c.setLastName("Redmond");
>
>                  p.setProjectFilePath("/tmp/CustomerIndividual.owl");
>                  p.save(errors);
>                  if (!errors.isEmpty()) {
>                      System.out.println("Error");
>                      return;
>                  }
>        
>
>
> On 07/06/2010 09:50 AM, Mark Rot wrote:
>> ya, thanks, however this is what i already did. i also followed this 
>> [1] tutorial at the end of the page.
>> now i want to create a new customer with a new first and last name 
>> and want to save it back in the owl file. is this somehow possible to 
>> achieve using the createCustomer method form der myFactory class? and 
>> i, right now, have no clue how to save it back in *.owl?!
>>
>> maybe you do have a hint for me?!
>>
>> [1] http://protege.stanford.edu/plugins/owl/api/guide.html
>>
>> Am 06.07.2010 18:39, schrieb Timothy Redmond:
>>>
>>>>
>>>> Unfortunately I just tried kazuki on the latest protege 3 and it 
>>>> did not work (NoSuchMethodError).  I have used it in the past so I 
>>>> am checking this out now. 
>>>
>>> If you are willing to generate code that requires the protege owl 
>>> jars to run, the "Generate Protege-OWL Java code" menu seems to work 
>>> fine.
>>>
>>> -Timothy
>>>
>>>
>>>
>>> On 07/06/2010 09:18 AM, Timothy Redmond wrote:
>>>> On 07/06/2010 01:50 AM, Mark Rot wrote:
>>>>> hi,
>>>>>
>>>>> i want to convert an owl file out of protege to java code with 
>>>>> kazuki (want to use the jena api).. but everytime i try it i get 
>>>>> the following message:
>>>>>
>>>>> Error: java.ioIOException: CreateProcess: javac -classpath 
>>>>> plugins/edu.stanford.smi.protegex.owl/jena.jar C:\Program Files 
>>>>> (x86)\..\Schema.java error=2
>>>>>
>>>>> afaik means error=2 file not found..
>>>>
>>>> I suspect that you are right about the "file not found".  It may be 
>>>> that what is happening is that kazuki is not finding the java 
>>>> compiler (javac).  Some things to ask include whether you have a 
>>>> jdk installed, whether the jdk is the java version that Protege is 
>>>> using and finally whether javac is on your execution path.
>>>>
>>>> Unfortunately I just tried kazuki on the latest protege 3 and it 
>>>> did not work (NoSuchMethodError).  I have used it in the past so I 
>>>> am checking this out now.
>>>>
>>>> -Timothy
>>>>
>>>>> i tried it already with protege 3.2 to 3.4.3.. but everytime the 
>>>>> same error.
>>>>>
>>>>> anyone here knows how to handle this?
>>>>> _______________________________________________
>>>>> 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
>>>
>>> _______________________________________________
>>> 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
>
>
> _______________________________________________
> 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
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100710/a9904041/attachment.html>


More information about the protege-owl mailing list