Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

Commit 51f856c

Browse files
committed
ont-map: handle ont-api changes with transformers (see owlcs/ont-api#4)
1 parent b374ac7 commit 51f856c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/github/owlcs/map/Managers.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.github.owlcs.map.spin.system.SystemLibraries;
2525
import com.github.owlcs.ontapi.*;
2626
import com.github.owlcs.ontapi.jena.utils.Graphs;
27+
import com.github.owlcs.ontapi.transforms.GraphFilter;
2728
import com.github.owlcs.ontapi.transforms.GraphTransformers;
2829
import org.apache.jena.graph.Factory;
2930
import org.apache.jena.graph.Graph;
@@ -66,7 +67,7 @@ public boolean withTransforms() {
6667
* The filter to skip transformations on system library graphs (from {@code file://resources/etc})
6768
* and on any incoming spin-rdf mapping file.
6869
*/
69-
public static final GraphTransformers.Filter TRANSFORM_FILTER = g -> {
70+
public static final GraphFilter TRANSFORM_FILTER = g -> {
7071
if (SystemLibraries.graphs().containsKey(Graphs.getURI(g))) return false;
7172
return Graphs.getImports(g).stream().noneMatch(SpinModels::isTopSpinURI);
7273
};
@@ -134,8 +135,8 @@ public static OWLMapManager createOWLMapManager(Graph primary, ReadWriteLock loc
134135
res.getOntologyStorers().set(OWLLangRegistry.storerFactories().collect(Collectors.toSet()));
135136
res.getOntologyParsers().set(OWLLangRegistry.parserFactories().collect(Collectors.toSet()));
136137
res.getDocumentSourceMappers().set(MAP_RESOURCES_MAPPING);
137-
GraphTransformers.Store store = res.getOntologyConfigurator().getGraphTransformers();
138-
res.getOntologyConfigurator().setGraphTransformers(store.addFilter(TRANSFORM_FILTER));
138+
GraphTransformers store = res.getOntologyConfigurator().getGraphTransformers();
139+
res.getOntologyConfigurator().setGraphTransformers(store.setFilter(TRANSFORM_FILTER));
139140
return res;
140141
}
141142

0 commit comments

Comments
 (0)