/** * Asynchronously explains why {@code instance} is an instance of {@code cl} * * @param instance The instance * @param cl The class * @param callback The {@link Callback} to execute after the explanation is done */ public void instance(Resource instance, Resource cl, Callback<Graph> callback) { String query = selectQuery(instance.toString(), RDF.TYPE.stringValue(), cl.stringValue()); query(query, callback); }
/** * Explains why {@code instance} is an instance of {@code cl} * * @param instance The instance * @param cl The class * @return The explanation {@link org.openrdf.model.Graph Graph} * @throws PelletClientException If there is an error or the {@code instance} is not an instance * of {@code cl} */ public Graph instance(Resource instance, Resource cl) throws PelletClientException { String query = selectQuery(instance.toString(), RDF.TYPE.stringValue(), cl.stringValue()); return query(query); }