I'm also experiencing some problems working with the HermiT reasoner. I switched to another reasoner (Pellet) and
everything seems to work. Using the latest SKOS API v3, OWL API v3 and Pellet 2.3.0 [1], the following example code should work for you.
SKOSDataset skosCoreOntology = manager.loadDataset(URI.create ("file://skos-owl1-dl.rdf"));
SKOSDataset dataSet = manager.loadDatasetFromPhysicalURI(URI.create("file://your_skos_file.owl"));
OWLOntology mySkosAsOWLOntology = converter.getAsOWLOntology(dataSet);
// your skos dataset needs to import the skos core ontology, we do this using the OWL API
// create the pellet reasoner
OWLReasoner reasoner= new com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory().createReasoner(converter.getAsOWLOntology(dataSet));
// pass the pellet reasoner and the SKOS ontology file to the SKOSReasoner
SKOSReasoner skosreasoner = new SKOSReasoner(manager, reasoner, converter.getAsOWLOntology(skosCoreOntology));
// example of getting inferred skos:narrowerTransitive concepts
for (SKOSConcept con : skosreasoner.getSKOSConcepts()) {
System.out.println("Concept:" + con.getURI());
for (SKOSConcept broaderCon : skosreasoner.getSKOSNarrowerTransitiveConcepts(con)) {
for (SKOSAnnotation literal : broaderCon.getSKOSAnnotationsByURI(dataSet, manager.getSKOSDataFactory().getSKOSPrefLabelProperty().getURI())) {
System.out.println("Narrower concepts: " + literal.getAnnotationValueAsConstant().getLiteral());
}
}
}