I used the OWLGrinder to create the assembly and imported the library into my project. That works fine. Now I want to write my own set of classes. Therefore I extended these with the equivalent of the assembly. But it just doesn't work.
The ontology holds a class named ManagementObject.
I created another Class (C#) called RealWorldObject:
public class RealWorldObject : ManagementObject { public RealWorldObject(string uri) : base(uri) { } public RealWorldObject(string uri, RdfDocument rdfdocument) : base(uri, rdfdocument) { } public RealWorldObject(RdfDocument rdfdocument) : base(rdfdocument) { } public String getClassName() { return this.OwlClassName; } public static RdfDocument addRealWorldObjectIndividualt(RdfDocument rdfDocument) { Vehicle vehicle = new Vehicle("vehicle1", rdfDocument); FixedEvent fxE1 = new FixedEvent("autoGekauft", rdfDocument); fxE1.agent = new xmlns.com.foaf._01.Person("robert", rdfDocument); vehicle.hasFixedEvent = fxE1; return rdfDocument; }
Which leads to the error:
ObjectManagement.Object.RealWorldObject does declare one (and only one) OwlClassAttribute. This is an implementation bug of the plugin.
How else should I extend the generated classes by the OWLGrinder
.
Thx it is a long time ago that I used C#, so I'm kind of rusty.