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

Commit b374ac7

Browse files
committed
ont-map: handle ont-api changes with system ont vocabulary (see owlcs/ont-api#4)
1 parent e974558 commit b374ac7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.github.owlcs.ontapi.jena.model.OntClass;
2323
import com.github.owlcs.ontapi.jena.model.OntModel;
2424
import com.github.owlcs.ontapi.jena.model.OntNamedProperty;
25-
import com.github.owlcs.ontapi.jena.utils.BuiltIn;
2625
import org.apache.jena.rdf.model.Literal;
2726
import org.apache.jena.rdf.model.Property;
2827
import org.apache.jena.rdf.model.ResourceFactory;
@@ -387,14 +386,15 @@ interface Builder {
387386
* then it is assumed that it is a plain (string) literal,
388387
* e.g. if you set 'Anything' it would be actually {@code "Anything"^^<http://www.w3.org/2001/XMLSchema#string>}.
389388
* If some value is already associated with the given {@code predicate}, it will be replaced by the new value.
390-
* To list all built-in datatypes the method {@link BuiltIn.Vocabulary#datatypes()} can be used.
389+
* To list all built-in datatypes
390+
* the method {@link com.github.owlcs.ontapi.jena.OntVocabulary#getBuiltinDatatypes()} can be used.
391391
* To list all model datatypes the expression {@link OntModel#datatypes()}
392392
*
393393
* @param predicate iri ({@link Arg#name()}), not {@code null}
394394
* @param value String, value, not {@code null}
395395
* @return this builder
396396
* @throws MapJenaException.IllegalArgument if input is wrong
397-
* @see BuiltIn#get()
397+
* @see com.github.owlcs.ontapi.jena.OntVocabulary.Factory#get()
398398
*/
399399
Builder add(String predicate, String value) throws MapJenaException.IllegalArgument;
400400

src/main/java/com/github/owlcs/map/spin/ValidationHelper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import com.github.owlcs.map.MapJenaException;
2323
import com.github.owlcs.map.spin.vocabulary.AVC;
2424
import com.github.owlcs.map.utils.ModelUtils;
25+
import com.github.owlcs.ontapi.jena.OntVocabulary;
2526
import com.github.owlcs.ontapi.jena.model.*;
26-
import com.github.owlcs.ontapi.jena.utils.BuiltIn;
2727
import com.github.owlcs.ontapi.jena.utils.Iter;
2828
import com.github.owlcs.ontapi.jena.vocabulary.OWL;
2929
import com.github.owlcs.ontapi.jena.vocabulary.RDF;
@@ -255,7 +255,7 @@ void testValue() {
255255
}
256256
if (value.isURIResource()) {
257257
//noinspection SuspiciousMethodCalls
258-
if (BuiltIn.get().reservedProperties().contains(value))
258+
if (OntVocabulary.Factory.get().getSystemProperties().contains(value))
259259
return;
260260
if (value.canAs(OntProperty.class))
261261
return;

src/main/java/com/github/owlcs/map/utils/LocalClassPropertyMapImpl.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
package com.github.owlcs.map.utils;
2020

2121
import com.github.owlcs.map.ClassPropertyMap;
22+
import com.github.owlcs.ontapi.jena.OntVocabulary;
2223
import com.github.owlcs.ontapi.jena.model.OntClass;
2324
import com.github.owlcs.ontapi.jena.model.OntModel;
2425
import com.github.owlcs.ontapi.jena.model.OntObject;
2526
import com.github.owlcs.ontapi.jena.model.OntProperty;
26-
import com.github.owlcs.ontapi.jena.utils.BuiltIn;
2727
import org.apache.jena.rdf.model.Property;
2828
import org.apache.jena.rdf.model.Resource;
2929

@@ -42,8 +42,8 @@
4242
*/
4343
@SuppressWarnings("WeakerAccess")
4444
public class LocalClassPropertyMapImpl extends ClassPropertyMapImpl {
45-
private static final Set<Property> BUILT_IN_PROPERTIES = BuiltIn.get().properties();
46-
private static final Set<Resource> BUILT_IN_CLASSES = BuiltIn.get().classes();
45+
private static final Set<Property> BUILT_IN_PROPERTIES = OntVocabulary.Factory.get().getBuiltinOWLProperties();
46+
private static final Set<Resource> BUILT_IN_CLASSES = OntVocabulary.Factory.get().getBuiltinClasses();
4747

4848
private final OntModel toSearch;
4949
private final OntModel model;

0 commit comments

Comments
 (0)