Edit : 

It create the RDF.type, but the code :

String thesisType = "semantic.OntologyKomputasi.mechanicalTurk";


Resource thesis = model.createResource(thesisURI)
                .addProperty(RDF.type, thesisType)
                .addProperty(DC.creator, creator)
                .addProperty(semantic.OntologyKomputasi.anotationBy, 
anotationBy);

Model schema = FileManager.get().loadModel(RDF_FILE);
        Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
        reasoner = reasoner.bindSchema(schema);

        InfModel infmodel = ModelFactory.createInfModel(reasoner, model);

        Resource yoga = infmodel.getResource(thesisURI);

        System.out.println("thesisURI Inference :");

        printStatements(infmodel, yoga, null, null);
        
        m.add(yoga.listProperties());

It doesn't want to create the inference like the static one does the inference. 
Thanks for the help.


________________________________
 Dari: Yoga Indra Pamungkas <[email protected]>
Kepada: "[email protected]" <[email protected]> 
Dikirim: Minggu, 2 September 2012 14:37
Judul: Dynamic RDF.type
 
Well, I have problem to make dynamic RDF.type. The RDF.type should get dynamic 
from anotation by user. 

This is my static RDF.type code :


Resource thesis = model.createResource(thesisURI)
                .addProperty(RDF.type, 
semantic.OntologyKomputasi.mechanicalTurk)
                .addProperty(DC.creator, creator)
                .addProperty(semantic.OntologyKomputasi.anotasiOleh, 
anotasiOleh);

So I try to make it dynamic by creating parameter thesisType, but when I run 
it, it doesn't want to create RDF.type property.
semantic.OntologyKomputasi is my ontology java code generated from jena 
schemagen, and semantic.OntologyKomputasi.mechanicalTurk is class in the 
ontology.


String thesisType = "semantic.OntologyKomputasi.mechanicalTurk";


Resource thesis = model.createResource(thesisURI)
                .addProperty(RDF.type, thesisType)
                .addProperty(DC.creator, creator)
                .addProperty(semantic.OntologyKomputasi.anotationBy, 
anotationBy);

Is there any way to make RDF.type become dynamic?
Thanks for the help.

Reply via email to