Search Mailing List Archives
[protege-discussion] Heap space and runtime problem
Umut
umut0815 at yahoo.com
Mon Oct 25 11:38:47 PDT 2010
Hey!
Im using Protege 3.x API (also im not quite sure why ;)).
Actually it should be less than 6000 instances, because many of the sensors have
the same attributes. So one instance is linked to more than 1 sensor.
here is a bit of the code:
This is one method to add "observedProperties" to one sensor, all the other
methods are about the same.
private OWLNamedClass observedProperties;
private OWLObjectProperty hasObservedProperty;
....
observedProperties = owlModel.getOWLNamedClass("om-r:ObservedProperty");
hasObservedProperty = owlModel.getOWLObjectProperty("sos:hasObservedProperty");
....
public void addObservedProperty(Sensor sensor){
ArrayList<OWLIndividual> observedProps = new ArrayList<OWLIndividual>();
for(int j = 0; j < sensor.getObservedProperties().size();j++){
observedPropertyIndividual = (OWLIndividual)
owlModel.getSimpleInstance(sensor.getObservedProperties().get(j));
if(observedPropertyIndividual == null){
observedProps.add(observedProperties.createOWLIndividual(sensor.getObservedProperties().get(j)));
}else{
observedProps.add(observedPropertyIndividual);
}
}
sensorIndividual.setPropertyValues(hasObservedProperty, observedProps);
}
--------------------------------
If this is not what you need i´ll be happy to post more code :)
Thanks
bye
umut
________________________________
From: Thomas Russ <tar at isi.edu>
To: User support for Core Protege and the Protege-Frames editor
<protege-discussion at lists.stanford.edu>
Sent: Mon, October 25, 2010 8:12:45 PM
Subject: Re: [protege-discussion] Heap space and runtime problem
On Oct 25, 2010, at 11:06 AM, Umut wrote:
> Dear all!
>
> Im new to the Protege API and im currently trying to develope an ontology for
>Sensor Observation Services.
> Theses services can contain several hundred sensors, and this is where the
>trouble starts. When I map the Sensor Observation Service into my OWL ontology I
>have to create individuals of all sensors and their attributes (~20 per Sensor).
>Especially the creating of properties between all the attributes and the sensors
>takes a lot of time (30-40min, which is actually not a big problem) and
>apparently heap space.
> No matter how much I increase the heap space my program crashes when mapping
>Sensor Observation Services with more than 300 Sensors.
> Is this normal or do I have some unefficient code? If yes, any ideas where I
>should check?
> Im also open for different solutions to solve the problem :D
This sounds like you would have about 6000 instances, which is a reasonable,
although not too huge size.
Which API are you using? Protege-OWL-API (Protege 3.x) or OWL-API (Protege
4.x)?
Could you show us a bit of the code that you are running to create the
individuals, attributes and link them using properties?
_______________________________________________
protege-discussion mailing list
protege-discussion at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-discussion
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-discussion/attachments/20101025/0fb600a2/attachment.html>
More information about the protege-discussion
mailing list