/** * Create and return a new instance of the reasoner identified by * the given uri. * @param uri the uri of the reasoner to be created, expressed as a simple string * @param configuration an optional set of configuration information encoded in RDF this * parameter can be null if no configuration information is required. * @return a reaoner instance * @throws ReasonerException if there is not such reasoner or if there is * some problem during instantiation */ public Reasoner create(String uri, Resource configuration) throws ReasonerException { ReasonerFactory factory = getFactory(uri); if (factory != null) { return factory.create(configuration); } else { throw new ReasonerException("Attempted to instantiate an unknown reasoner: " + uri); } }
/** * Create and return a new instance of the reasoner identified by * the given uri. * @param uri the uri of the reasoner to be created, expressed as a simple string * @param configuration an optional set of configuration information encoded in RDF this * parameter can be null if no configuration information is required. * @return a reaoner instance * @throws ReasonerException if there is not such reasoner or if there is * some problem during instantiation */ public Reasoner create(String uri, Resource configuration) throws ReasonerException { ReasonerFactory factory = getFactory(uri); if (factory != null) { return factory.create(configuration); } else { throw new ReasonerException("Attempted to instantiate an unknown reasoner: " + uri); } }
/** Answer a ReasonerFactory which delivers reasoners with the given URL <code>reasonerURL</code>. If there is no such reasoner, throw an <code>UnknownreasonerException</code>. */ public static ReasonerFactory getReasonerFactoryByURL( Resource root, Resource reasonerURL ) { String url = reasonerURL.getURI(); ReasonerFactory factory = ReasonerRegistry.theRegistry().getFactory( url ); if (factory == null) throw new UnknownReasonerException( root, reasonerURL ); return factory; } }
/** Answer a ReasonerFactory which delivers reasoners with the given URL <code>reasonerURL</code>. If there is no such reasoner, throw an <code>UnknownreasonerException</code>. */ public static ReasonerFactory getReasonerFactoryByURL( Resource root, Resource reasonerURL ) { String url = reasonerURL.getURI(); ReasonerFactory factory = ReasonerRegistry.theRegistry().getFactory( url ); if (factory == null) throw new UnknownReasonerException( root, reasonerURL ); return factory; } }