|
24 | 24 | import com.github.owlcs.map.spin.system.SystemLibraries;
|
25 | 25 | import com.github.owlcs.ontapi.*;
|
26 | 26 | import com.github.owlcs.ontapi.jena.utils.Graphs;
|
| 27 | +import com.github.owlcs.ontapi.transforms.GraphFilter; |
27 | 28 | import com.github.owlcs.ontapi.transforms.GraphTransformers;
|
28 | 29 | import org.apache.jena.graph.Factory;
|
29 | 30 | import org.apache.jena.graph.Graph;
|
@@ -66,7 +67,7 @@ public boolean withTransforms() {
|
66 | 67 | * The filter to skip transformations on system library graphs (from {@code file://resources/etc})
|
67 | 68 | * and on any incoming spin-rdf mapping file.
|
68 | 69 | */
|
69 |
| - public static final GraphTransformers.Filter TRANSFORM_FILTER = g -> { |
| 70 | + public static final GraphFilter TRANSFORM_FILTER = g -> { |
70 | 71 | if (SystemLibraries.graphs().containsKey(Graphs.getURI(g))) return false;
|
71 | 72 | return Graphs.getImports(g).stream().noneMatch(SpinModels::isTopSpinURI);
|
72 | 73 | };
|
@@ -134,8 +135,8 @@ public static OWLMapManager createOWLMapManager(Graph primary, ReadWriteLock loc
|
134 | 135 | res.getOntologyStorers().set(OWLLangRegistry.storerFactories().collect(Collectors.toSet()));
|
135 | 136 | res.getOntologyParsers().set(OWLLangRegistry.parserFactories().collect(Collectors.toSet()));
|
136 | 137 | 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)); |
139 | 140 | return res;
|
140 | 141 | }
|
141 | 142 |
|
|
0 commit comments