[Pellet-users] Save A-Box and java.lang.UnsupportedOperationException
Christiane Telöken
teloeken at tzi.de
Thu Jan 31 18:11:41 UTC 2008
Dear Pellet-users,
I am using Jena and Pellet 1.5 and I have an OWL-DL-ontology with the
expressivity ALCHF(D) which you will find in the attachment.
I would like to add a statement to a model and save the model
separately. Doing this results in a warning and then in an exception.
My statements are contained in this datastructure:
public ArrayList <Statement> statementResources = new ArrayList
<Statement> ();
The code looks like:
Statement stmt = null;
Statement newStmt = null;
Resource res;
Property prop;
String obj;
SaveABox newAbox = currentAbox;
for (int i = 0; i < currentAbox.statementResources.size(); i++){
stmt = newAbox.statementResources.get(i);
if (stmt.getSubject().toString().equals(newElement)){
prop = stmt.getPredicate();
obj = stmt.getObject().toString();
newStmt = ontoModel.createStatement(res, prop, obj);
System.out.println (newStmt);
##################################################################################
The statement looks fine and correct:
[http://www.owl-ontologies.com/Ontology1200661107.owl#NewInstance_1,
http://www.owl-ontologies.com/Ontology1200661107.owl#hasGoal,
"http://www.owl-ontologies.com/Ontology1200661107.owl#InGoalRadium224"]
##################################################################################
Model model = ontoModel.add(res, prop, obj);
##################################################################################
Here, Pellet gives a warning:
WARN [main] (KnowledgeBase.java:773) - Ignoring literal value
literal(http://www.owl-ontologies.com/Ontology1200661107.owl#InGoalRadium224,(),())
for object property
http://www.owl-ontologies.com/Ontology1200661107.owl#hasGoal
##################################################################################
try{
model.commit();
}
catch (Exception e){
System.out.println (e);
}
##################################################################################
Pellet throws this exception:
java.lang.UnsupportedOperationException: this model does not support
transactions
##################################################################################
}
}
}
The objective of my work is to change the A-Box of the ontology and save
it separately. As I am a newbie to Pellet and the Jena-framework I am
not sure if this is the way I should do it.
I would be very glad for any hints why the warning and exception is
thrown and would be very grateful if somebody could tell me if this is
the right way to save the A-Box of the ontology.
Thank you for any help in advance,
Christiane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ABoxThoriumReiheOI.owl
Type: text/rdf
Size: 173128 bytes
Desc: not available
Url : http://lists.owldl.com/pipermail/pellet-users/attachments/20080131/8ea54977/attachment-0001.bin
More information about the Pellet-users
mailing list