Skip to content

Commit 8615383

Browse files
committed
ont-api: remove deprecated methods where it is possible (Cache* configs, OntDT, OntologyManager)
1 parent f61becd commit 8615383

File tree

4 files changed

+5
-127
lines changed

4 files changed

+5
-127
lines changed

src/main/java/com/github/owlcs/ontapi/OntologyManager.java

+4-43
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
package com.github.owlcs.ontapi;
1616

17-
import org.apache.jena.graph.Graph;
18-
import org.semanticweb.owlapi.io.*;
19-
import org.semanticweb.owlapi.model.*;
20-
import org.semanticweb.owlapi.model.parameters.OntologyCopy;
2117
import com.github.owlcs.ontapi.config.OntConfig;
2218
import com.github.owlcs.ontapi.config.OntLoaderConfiguration;
2319
import com.github.owlcs.ontapi.config.OntWriterConfiguration;
2420
import com.github.owlcs.ontapi.jena.model.OntGraphModel;
21+
import org.apache.jena.graph.Graph;
22+
import org.semanticweb.owlapi.io.*;
23+
import org.semanticweb.owlapi.model.*;
24+
import org.semanticweb.owlapi.model.parameters.OntologyCopy;
2525

2626
import javax.annotation.Nullable;
2727
import javax.annotation.ParametersAreNonnullByDefault;
@@ -499,45 +499,6 @@ default void clearIRIMappers() {
499499
getIRIMappers().clear();
500500
}
501501

502-
/**
503-
* Returns document-source-mappings as stream.
504-
* New (ONT-API) method.
505-
*
506-
* @return {@code Stream} of {@link DocumentSourceMapping}
507-
* @since 1.0.1
508-
* @deprecated use {@code getDocumentSourceMappers().stream()} instead
509-
*/
510-
@Deprecated
511-
default Stream<DocumentSourceMapping> documentSourceMappers() {
512-
return getDocumentSourceMappers().stream();
513-
}
514-
515-
/**
516-
* Adds Document Source Mapping to the manager.
517-
* New (ONT-API) method.
518-
*
519-
* @param mapper {@link DocumentSourceMapping}
520-
* @since 1.0.1
521-
* @deprecated use {@code getDocumentSourceMappers().add(mapper)} instead
522-
*/
523-
@Deprecated
524-
default void addDocumentSourceMapper(DocumentSourceMapping mapper) {
525-
getDocumentSourceMappers().add(mapper);
526-
}
527-
528-
/**
529-
* Removes Document Source Mapping from the manager.
530-
* New (ONT-API) method.
531-
*
532-
* @param mapper {@link DocumentSourceMapping}
533-
* @since 1.0.1
534-
* @deprecated use {@code getDocumentSourceMappers().remove(mapper)} instead
535-
*/
536-
@Deprecated
537-
default void removeDocumentSourceMapper(DocumentSourceMapping mapper) {
538-
getDocumentSourceMappers().remove(mapper);
539-
}
540-
541502
/**
542503
* Sets the java.util.Set of OWL parsers into the manager.
543504
*

src/main/java/com/github/owlcs/ontapi/config/CacheControl.java

-26
Original file line numberDiff line numberDiff line change
@@ -84,30 +84,4 @@ default R setModelCacheLevel(int constant, boolean b) {
8484
int current = getModelCacheLevel();
8585
return setModelCacheLevel(b ? current | constant : current & ~constant);
8686
}
87-
88-
/**
89-
* Sets the model content cache level to the specified integer value.
90-
*
91-
* @param level non-negative integer
92-
* @return {@link R}
93-
* @deprecated since 1.4.2: use {@link #setModelCacheLevel(int)}
94-
*/
95-
@Deprecated
96-
default R setContentCacheLevel(int level) {
97-
return setModelCacheLevel(level);
98-
}
99-
100-
/**
101-
* Turns on/off the content cache.
102-
*
103-
* @param b boolean
104-
* @return {@link R}
105-
* @see CacheSettings#useContentCache()
106-
* @deprecated since 1.4.2: bad naming, use {@link #setModelCacheLevel(int, boolean)}
107-
*/
108-
@Deprecated
109-
default R setUseContentCache(boolean b) {
110-
return setModelCacheLevel(CACHE_ALL, b);
111-
}
112-
11387
}

src/main/java/com/github/owlcs/ontapi/config/CacheSettings.java

-45
Original file line numberDiff line numberDiff line change
@@ -210,49 +210,4 @@ default boolean useLoadNodesCache() {
210210
default boolean useLoadObjectsCache() {
211211
return getLoadObjectsCacheSize() > 0;
212212
}
213-
214-
/**
215-
* Answers {@code true} iff the content caching is enabled.
216-
*
217-
* @return boolean
218-
* @deprecated since 1.4.2: use {@link #useContentCache()} instead
219-
*/
220-
@Deprecated
221-
default boolean isContentCacheEnabled() {
222-
return useContentCache();
223-
}
224-
225-
/**
226-
* Answers {@code true} iff iterator caching is enabled.
227-
*
228-
* @return boolean
229-
* @deprecated since 1.4.2: use {@link #useIteratorCache()} instead
230-
*/
231-
@Deprecated
232-
default boolean useIteratorContentCache() {
233-
return useIteratorCache();
234-
}
235-
236-
/**
237-
* Not supported anymore.
238-
*
239-
* @return boolean
240-
* @deprecated since 1.4.2 - no such cache anymore
241-
*/
242-
@Deprecated
243-
default boolean useTriplesContentCache() {
244-
throw new UnsupportedOperationException();
245-
}
246-
247-
248-
/**
249-
* Gets the model content cache level.
250-
*
251-
* @return int
252-
* @deprecated since 1.4.2 (bad naming): use {@link #getModelCacheLevel()}
253-
*/
254-
@Deprecated
255-
default int getContentCacheLevel() {
256-
return getModelCacheLevel();
257-
}
258213
}

src/main/java/com/github/owlcs/ontapi/jena/model/OntDT.java

+1-13
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
package com.github.owlcs.ontapi.jena.model;
1616

17+
import com.github.owlcs.ontapi.jena.vocabulary.OWL;
1718
import org.apache.jena.datatypes.RDFDatatype;
1819
import org.apache.jena.datatypes.TypeMapper;
1920
import org.apache.jena.rdf.model.Literal;
2021
import org.apache.jena.rdf.model.RDFNode;
2122
import org.apache.jena.rdf.model.Resource;
22-
import com.github.owlcs.ontapi.jena.vocabulary.OWL;
2323

2424
import java.util.Objects;
2525
import java.util.stream.Stream;
@@ -174,16 +174,4 @@ default OntDT annotate(OntNAP predicate, RDFNode value) {
174174
addAnnotation(predicate, value);
175175
return this;
176176
}
177-
178-
/**
179-
* Lists all equivalent classes.
180-
*
181-
* @return {@code Stream} of equivalent {@link OntDR}s
182-
* @deprecated since 1.4.2: use the method {@link #equivalentClasses()} instead
183-
*/
184-
@Deprecated
185-
default Stream<OntDR> equivalentClass() {
186-
return equivalentClasses();
187-
}
188-
189177
}

0 commit comments

Comments
 (0)