Thanks, Dave and Rob,
It works now.
> On 14 Jan 2015, at 10:52 pm, Dave Reynolds <[email protected]> wrote:
>
> On 14/01/15 11:19, Kamalraj Jairam wrote:
>> This is probably easier
>>
>> https://s3-ap-southeast-2.amazonaws.com/kamal-documents/KamalDisk_1/homes/kamal/CloudStation/DB.ttl
>
> So that seems to be a modest number of ex: axioms followed by a large chunk
> of schema.org. As an aside then using imports to separate these might be
> worth considering.
>
>> I have attached the Unit test as well
>
>> @Test
>> public void reasoningTest(){
>>
>> ontModel = ModelFactory.createOntologyModel();
>> data = ModelFactory.createDefaultModel();
>>
>> Model model =
>> RDFDataMgr.loadModel("/Users/kamalrajjairam/Downloads/DB.ttl", Lang.TURTLE);
>>
>> ontModel.add(model);
>>
>> Reasoner reasoner = PelletReasonerFactory.THE_SPEC.getReasoner();
>>
>> OntClass classa = ontModel.createClass("http://test.com#A");
>>
>> Resource instanceA = data.createResource("http://test.com#A1");
>>
>> Statement s = new StatementImpl(instanceA, RDF.type, classa);
>>
>> data.add(s);
>>
>> reasoner = reasoner.bindSchema(ontModel);
>
> This puts your whole ontology into the reasoner and so it will become part of
> the InfModel.
>
>> InfModel infModel = ModelFactory.createInfModel(reasoner, data);
>>
>> infModel.add(ontModel);
>
> This adds the whole of your ontology in a second time. Not harmful but causes
> redundant work. Do either this or bindSchema but not both. Since you are not
> reusing the partially-bound reasoner multiple times and since there has been
> a suggestion that Pellet doesn't like bindSchema then suggest not using it.
>
> Dropping the redundant bindSchema step and using the OWLMicroReasoner this
> test completes in 18s for me.
>
> Dave
>
>
>
>