Search in sources :

Example 1 with InfModelImpl

use of org.apache.jena.rdf.model.impl.InfModelImpl in project jena by apache.

the class ModelFactory method createRDFSModel.

/**
     * Return a Model through which all the RDFS entailments
     * derivable from the given model are accessible. Some work is done
     * when the inferenced model is created but each query will also trigger some
     * additional inference work.
     *
     * @param model the Model containing both instance data and schema assertions to be inferenced over
     */
public static InfModel createRDFSModel(Model model) {
    Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
    InfGraph graph = reasoner.bind(model.getGraph());
    return new InfModelImpl(graph);
}
Also used : InfGraph(org.apache.jena.reasoner.InfGraph) Reasoner(org.apache.jena.reasoner.Reasoner) InfModelImpl(org.apache.jena.rdf.model.impl.InfModelImpl)

Aggregations

InfModelImpl (org.apache.jena.rdf.model.impl.InfModelImpl)1 InfGraph (org.apache.jena.reasoner.InfGraph)1 Reasoner (org.apache.jena.reasoner.Reasoner)1