diff --git a/src/main/java/com/github/owlcs/ontapi/OntGraphDocumentSource.java b/src/main/java/com/github/owlcs/ontapi/OntGraphDocumentSource.java index 6820383b2..3314131f0 100644 --- a/src/main/java/com/github/owlcs/ontapi/OntGraphDocumentSource.java +++ b/src/main/java/com/github/owlcs/ontapi/OntGraphDocumentSource.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -15,7 +15,6 @@ package com.github.owlcs.ontapi; import com.github.owlcs.ontapi.jena.utils.Graphs; -import com.github.owlcs.ontapi.transforms.TransformationModel; import org.apache.jena.atlas.web.ContentType; import org.apache.jena.graph.Graph; import org.apache.jena.riot.Lang; @@ -65,10 +64,10 @@ public abstract class OntGraphDocumentSource implements OWLOntologyDocumentSourc public abstract Graph getGraph(); /** - * Answers if the graph must be put in order by the transformations mechanism. + * Answers {@code true} iff the graph must be put in order by the transformations mechanism. * - * @return {@code true} if graph transformations is allowed - * @see TransformationModel + * @return boolean, {@code true} if the graph transformations for this source are allowed + * @see com.github.owlcs.ontapi.config.LoadSettings#isPerformTransformation() * @since 1.3.2 */ public boolean withTransforms() { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/OntVocabulary.java b/src/main/java/com/github/owlcs/ontapi/jena/OntVocabulary.java index a9a815d57..be53828f8 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/OntVocabulary.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/OntVocabulary.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -16,7 +16,6 @@ import com.github.owlcs.ontapi.jena.utils.Iter; import com.github.owlcs.ontapi.jena.vocabulary.*; -import com.github.owlcs.ontapi.transforms.GraphTransformers; import org.apache.jena.datatypes.BaseDatatype; import org.apache.jena.datatypes.RDFDatatype; import org.apache.jena.datatypes.TypeMapper; @@ -192,10 +191,12 @@ default Set getBuiltinOWLEntities() { /** * A factory-helper to work with {@link OntVocabulary} instances, that wrap constant-holders - * from the packages {@link com.github.owlcs.ontapi.jena.vocabulary} and {@link org.apache.jena.vocabulary} - * (such as {@link OWL}). - * In ONT-API, a {@link OntVocabulary} is used to build {@link com.github.owlcs.ontapi.jena.impl.conf.OntPersonality} - * and in {@link GraphTransformers} subsystem. + * from the packages {@link com.github.owlcs.ontapi.jena.vocabulary} + * and {@link org.apache.jena.vocabulary} (such as {@link OWL}). + *

+ * In ONT-API, a {@link OntVocabulary} singleton is used + * to build {@link com.github.owlcs.ontapi.jena.impl.conf.OntPersonality} + * and, also, in {@link com.github.owlcs.ontapi.transforms} subsystem. *

* Created by @szuev on 21.12.2016. */ diff --git a/src/main/java/com/github/owlcs/ontapi/jena/RWLockedGraph.java b/src/main/java/com/github/owlcs/ontapi/jena/RWLockedGraph.java index f01543ef3..703bf4348 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/RWLockedGraph.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/RWLockedGraph.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -438,7 +438,6 @@ protected void removeIterator(WIT it) { * A {@code WrappedIterator} with timestamp and possibility to change the base iterator. * * @param anything - * @since 1.4.0 */ public class WIT extends WrappedIterator { protected final Thread thread; @@ -594,8 +593,6 @@ public void forEachRemaining(Consumer action) { /** * A wrapper for {@link PrefixMapping}. - * - * @since 1.4.0 */ protected class WPM implements PrefixMapping { private final PrefixMapping pm; diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/Factories.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/Factories.java index 2b2ea7baa..950f26037 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/Factories.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/Factories.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -14,16 +14,16 @@ package com.github.owlcs.ontapi.jena.impl; +import com.github.owlcs.ontapi.jena.impl.conf.*; +import com.github.owlcs.ontapi.jena.model.OntObject; +import com.github.owlcs.ontapi.jena.utils.Iter; +import com.github.owlcs.ontapi.jena.vocabulary.RDF; import org.apache.jena.graph.FrontsNode; import org.apache.jena.graph.Graph; import org.apache.jena.graph.Node; import org.apache.jena.graph.Triple; import org.apache.jena.rdf.model.Resource; import org.apache.jena.util.iterator.ExtendedIterator; -import com.github.owlcs.ontapi.jena.impl.conf.*; -import com.github.owlcs.ontapi.jena.model.OntObject; -import com.github.owlcs.ontapi.jena.utils.Iter; -import com.github.owlcs.ontapi.jena.vocabulary.RDF; import java.util.Arrays; import java.util.Objects; @@ -34,8 +34,6 @@ * A helper(factory) to produce {@link ObjectFactory object factory} instances or its components. *

* Created by @ssz on 19.01.2019. - * - * @since 1.4.0 */ class Factories { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntAnnotationImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntAnnotationImpl.java index 905c93bb9..5f0c05bfa 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntAnnotationImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntAnnotationImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -222,7 +222,6 @@ private static S removeMin(Set notEmptySet, * * @param annotation {@link OntAnnotation} * @return {@link ExtendedIterator} of {@link OntStatement}s - * @since 1.3.0 */ public static ExtendedIterator listRelatedStatements(OntAnnotation annotation) { OntAnnotationImpl a = (OntAnnotationImpl) annotation; diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntGraphModelImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntGraphModelImpl.java index 483b96eea..b8494a333 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntGraphModelImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntGraphModelImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -33,7 +33,6 @@ import org.apache.jena.reasoner.Reasoner; import org.apache.jena.shared.PrefixMapping; import org.apache.jena.util.iterator.ExtendedIterator; -import org.apache.jena.util.iterator.NullIterator; import org.apache.jena.vocabulary.RDFS; import java.io.OutputStream; @@ -131,7 +130,6 @@ public static Exten * with the {@link RDF#type rdf:type} as predicate, not {@code null} * @param a subtype of {@link OntModel} and {@link PersonalityModel} * @return {@link ExtendedIterator} of {@link OntIndividual}s that are attached to the {@code model} - * @since 1.4.2 */ public static ExtendedIterator listIndividuals(M model, Set system, @@ -187,7 +185,6 @@ public static ExtendedIterator type of iterator's items * @return {@code Stream} of {@link X}s - * @since 1.4.2 */ private static Stream asStream(Graph graph, ExtendedIterator it, @@ -206,7 +203,6 @@ private static Stream asStream(Graph graph, * * @param graph {@link Graph} * @return int - * @since 1.4.2 */ protected static int getSpliteratorCharacteristics(Graph graph) { // a graph cannot return iterator with null-elements @@ -224,7 +220,6 @@ protected static int getSpliteratorCharacteristics(Graph graph) { * @param p {@link Property}, the predicate * @param o {@link RDFNode}, the object * @return boolean - * @since 1.4.2 */ private static boolean isANY(Resource s, Property p, RDFNode o) { if (s != null) return false; @@ -344,7 +339,6 @@ protected void removeImportModel(Graph g, String u) { * * @param personality {@link OntPersonality}, not {@code null} * @return distinct {@code ExtendedIterator} of {@link OntGraphModelImpl}s - * @since 1.4.2 */ @SuppressWarnings("unused") protected final ExtendedIterator listAllModels(OntPersonality personality) { @@ -357,7 +351,6 @@ protected final ExtendedIterator listAllModels(OntPersonality * * @param personality {@link OntPersonality}, not {@code null} * @return non-distinct {@code ExtendedIterator} of {@link OntGraphModelImpl}s - * @since 1.4.2 */ protected final ExtendedIterator listImportModels(OntPersonality personality) { return listImportGraphs().mapWith(u -> new OntGraphModelImpl(u, personality)); @@ -368,7 +361,6 @@ protected final ExtendedIterator listImportModels(OntPersonal * This model graph is not included. * * @return non-distinct {@code ExtendedIterator} of {@link UnionGraph} - * @since 1.4.2 */ protected final ExtendedIterator listImportGraphs() { return getGraph().getUnderlying().listGraphs() @@ -383,7 +375,6 @@ protected final ExtendedIterator listImportGraphs() { * * @return {@link OntGraphModelImpl} * @see #getBaseModel() - * @since 1.3.0 */ public OntGraphModelImpl getTopModel() { if (independent()) { @@ -617,7 +608,6 @@ public StmtIterator listStatements(Resource s, Property p, RDFNode o) { * @param o {@link RDFNode} the object sought, can be {@code null} * @return {@link ExtendedIterator} of {@link OntStatement}s * @see #listStatements(Resource, Property, RDFNode) - * @since 1.3.0 */ public ExtendedIterator listOntStatements(Resource s, Property p, RDFNode o) { return Iter.create(getGraph().find(asNode(s), asNode(p), asNode(o)).mapWith(this::asStatement)); @@ -634,7 +624,6 @@ public ExtendedIterator listOntStatements(Resource s, Property p, * @param o {@link RDFNode} the object sought, can be {@code null} * @return {@link ExtendedIterator} of {@link OntStatement}s, which are local to the base graph * @see #listStatements(Resource, Property, RDFNode) - * @since 1.3.0 */ public ExtendedIterator listLocalStatements(Resource s, Property p, RDFNode o) { return Iter.create(getBaseGraph().find(asNode(s), asNode(p), asNode(o)).mapWith(this::asStatement)); @@ -689,71 +678,6 @@ public OntGraphModelImpl deleteOntList(OntObject subject, Property predicate, On return this; } - /** - * Extracts all members from []-list, that is an object in a local SPO with the specified predicate. - * The returned iterator includes the subject of the []-list root statement, if it is specified. - * - * @param subject {@code Class}-type of subject - * @param predicate {@link Property} - * @param object {@code Class}-type of object - * @param includeSubject if {@code true} then the subject of []-list root statement is also included - * @param subtype of {@link OntObject}, the []-list members type - * @param subtype of {@link OntObject} in the subject position of the SPO, where O is a []-list - * @return {@link ExtendedIterator} of {@link O}s - */ - protected ExtendedIterator fromLocalList(Class subject, - Property predicate, - Class object, - boolean includeSubject) { - return Iter.flatMap(listLocalStatements(null, predicate, null), s -> { - S a = findNodeAs(s.getSubject().asNode(), subject); - if (a == null) return NullIterator.instance(); - if (!s.getObject().canAs(RDFList.class)) return NullIterator.instance(); - OntListImpl list = OntListImpl.asOntList(s.getObject().as(RDFList.class), - this, s.getSubject(), predicate, null, object); - if (!includeSubject) return list.listMembers(); - return Iter.concat(Iter.of(a), list.listMembers()); - }); - } - - /** - * Lists all local objects for the given predicate and types of subject and object. - * - * @param subject {@code Class}-type of subject - * @param predicate {@link Property} - * @param object {@code Class}-type of object - * @param subtype of {@link OntObject} in the object position of the found SPO - * @param subtype of {@link OntObject} in the subject position of the found SPO - * @return {@link ExtendedIterator} of {@link O}s - */ - protected ExtendedIterator listLocalObjects(Class subject, - Property predicate, - Class object) { - return listLocalStatements(null, predicate, null).mapWith(s -> { - S left = findNodeAs(s.getSubject().asNode(), subject); - return left == null ? null : findNodeAs(s.getObject().asNode(), object); - }).filterDrop(Objects::isNull); - } - - /** - * Lists local subjects and objects for the given predicate and the type of subject and object. - * - * @param predicate {@link Property} - * @param type {@code Class}-type of subject and object - * @param subtype of {@link OntObject}, S and P from SPO must be of this type - * @return {@link ExtendedIterator} of {@link R}s - */ - protected ExtendedIterator listLocalSubjectAndObjects(Property predicate, - Class type) { - return Iter.flatMap(listLocalStatements(null, predicate, null), s -> { - R a = findNodeAs(s.getSubject().asNode(), type); - if (a == null) return NullIterator.instance(); - R b = findNodeAs(s.getObject().asNode(), type); - if (b == null) return NullIterator.instance(); - return Iter.of(a, b); - }); - } - @Override public OntDisjoint.Classes createDisjointClasses(Collection classes) { return OntDisjointImpl.createDisjointClasses(this, classes.stream()); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntIndividualImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntIndividualImpl.java index 16fec3990..045f37f5f 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntIndividualImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntIndividualImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -97,7 +97,6 @@ public ExtendedIterator listClasses() { * @param direct if {@code true} returns only direct types, just like {@link #listClasses()} * @return {@link ExtendedIterator} over all {@link OntClass class}-types * @see #listClasses() - * @since 1.4.2 */ @SuppressWarnings("unused") public ExtendedIterator listClasses(boolean direct) { @@ -110,7 +109,6 @@ public ExtendedIterator listClasses(boolean direct) { * * @param direct if {@code true} returns only direct types, just like {@code #listClasses().toSet()} * @return a {@code Set} of all {@link OntClass class}-types - * @since 1.4.2 */ public Set getClasses(boolean direct) { if (direct) { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntObjectImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntObjectImpl.java index 9082dfca4..126181dc6 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntObjectImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntObjectImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -19,7 +19,6 @@ import com.github.owlcs.ontapi.jena.impl.conf.OntFilter; import com.github.owlcs.ontapi.jena.impl.conf.OntFinder; import com.github.owlcs.ontapi.jena.model.OntAnnotationProperty; -import com.github.owlcs.ontapi.jena.model.OntEntity; import com.github.owlcs.ontapi.jena.model.OntObject; import com.github.owlcs.ontapi.jena.model.OntStatement; import com.github.owlcs.ontapi.jena.utils.Iter; @@ -35,7 +34,6 @@ import org.apache.jena.util.iterator.NullIterator; import java.util.*; -import java.util.function.BooleanSupplier; import java.util.function.Function; import java.util.stream.Stream; @@ -126,25 +124,6 @@ public static Resource checkNamed(Resource res) { throw new OntJenaException.IllegalArgument("Not uri resource " + res); } - /** - * Filters the given extended iterator to contain only builtin entities of the specified type. - * - * @param type type of entity - * @param m {@link OntGraphModelImpl} - * @param exit {@code BooleanSupplier} - * @param from {@link ExtendedIterator} of {@link RDFNode}s - * @param subclass of {@link OntEntity} - * @return {@link ExtendedIterator} of {@link E}s - */ - static ExtendedIterator filterBuiltin(Class type, - OntGraphModelImpl m, - BooleanSupplier exit, - ExtendedIterator from) { - return from.filterDrop(x -> exit.getAsBoolean()) - .mapWith(x -> m.findNodeAs(x.asNode(), type)) - .filterKeep(x -> x != null && x.isBuiltIn()); - } - /** * Lists all descendants for the specified object and the predicate. * @@ -155,7 +134,6 @@ static ExtendedIterator filterBuiltin(Class type, * @param direct if {@code true}, only returns the direct (adjacent) values * @param subtype of {@link OntObject} * @return distinct {@code Stream} of {@link X}s - * @since 1.4.2 */ public static Stream hierarchy(X object, Class type, @@ -193,7 +171,6 @@ public static ExtendedIterator listHierarchy(X object, * @param inverse if {@code true}, use the inverse of {@code predicate} rather than {@code predicate} * @param subtype of {@link OntObject} (actually {@link OntObjectImpl}) * @return a {@code Function} that responses a {@code ExtendedIterator} over direct listed {@link X} - * @since 1.4.2 */ private static Function> getListDirect(Class type, Property predicate, @@ -216,7 +193,6 @@ private static Function> getListDir * otherwise only direct descendants are included into the result * @param subtype of {@link Resource} * @return {@code Set} of {@link X} - * @since 1.4.0 */ public static Set getHierarchy(X object, Function> listDirect, @@ -238,7 +214,6 @@ public static Set getHierarchy(X object, * @param listDirect a {@code Function} that returns {@code Iterator} for an object of type {@link X} * @param res {@code Set} to store result * @param any subtype of {@link Resource} - * @since 1.4.0 */ static void collectIndirect(X object, Function> listDirect, @@ -272,7 +247,6 @@ public static Class findActualClass(OntObject o) { * @param any subtype of {@link RDFNode} * @return an instance of the type {@link X} or {@code null} * @see UnionModel#getNodeAs(Node, Class) - * @since 1.4.2 */ public static X getNodeAs(RDFNode node, Class view) { try { @@ -288,7 +262,6 @@ public static X getNodeAs(RDFNode node, Class view) { * @param node {@link Node}, not {@code null} * @param model {@link EnhGraph}, not {@code null} * @return {@link OntObject} - * @since 1.4.2 */ public static OntObject wrapAsOntObject(Node node, EnhGraph model) { return new OntObjectImpl(node, model); @@ -345,7 +318,6 @@ public X getAs(Class type) { * Lists all object's characteristic statements according to its OWL2 specification. * * @return {@code ExtendedIterator} of {@link OntStatement}s - * @since 1.4.0 */ public ExtendedIterator listSpec() { return findRootStatement().map(Iter::of).orElseGet(NullIterator::instance); @@ -368,7 +340,6 @@ public Stream content() { * minus those of them whose predicate is an annotation property to any discard annotations. * * @return distinct {@code ExtendedIterator} of {@link OntStatement}s - * @since 1.4.2 */ @SuppressWarnings("unused") public ExtendedIterator listContent() { @@ -381,7 +352,6 @@ public ExtendedIterator listContent() { * excluding those of them whose predicate is an annotation property. * * @return {@code Set} of {@link OntStatement}s - * @since 1.4.0 */ protected Set getContent() { Set res = listSpec().toSet(); @@ -511,7 +481,6 @@ public StmtIterator listProperties() { * * @return {@link ExtendedIterator} over all the {@link OntStatement}s about this object * @see #listProperties() - * @since 1.3.0 */ public ExtendedIterator listStatements() { return listStatements(null); @@ -538,7 +507,6 @@ public StmtIterator listProperties(Property p) { * @param p {@link Property}, the predicate sought, can be {@code null} * @return {@link ExtendedIterator} over the {@link OntStatement}s * @see #listStatements(Property) - * @since 1.3.0 */ public ExtendedIterator listStatements(Property p) { return Iter.create(getModel().getGraph().find(asNode(), OntGraphModelImpl.asNode(p), Node.ANY) @@ -578,7 +546,6 @@ public Stream annotations() { * * @return {@link ExtendedIterator} of {@link OntStatement}s * @see #annotations() - * @since 1.3.0 */ public ExtendedIterator listAnnotations() { ExtendedIterator res = listAssertions(); @@ -606,7 +573,6 @@ public Stream assertions() { * * @return {@link ExtendedIterator} of {@link OntStatement}s * @see #assertions() - * @since 1.3.0 */ public ExtendedIterator listAssertions() { return listStatements().filterKeep(OntStatement::isAnnotationAssertion); @@ -618,7 +584,6 @@ public ExtendedIterator listAssertions() { * @param predicate {@link OntAnnotationProperty}, not {@code null} * @return {@link ExtendedIterator} of {@link Literal}s * @see #listAnnotations() - * @since 1.3.2 */ public ExtendedIterator listAnnotationLiterals(OntAnnotationProperty predicate) { return listAnnotations() @@ -740,7 +705,6 @@ public Stream objects(Property predicate, Class type) * @return {@link ExtendedIterator} of {@link RDFNode node}s of the type {@link O} * @see #object(Property, Class) * @see #listSubjects(Property, Class) - * @since 1.3.0 */ public ExtendedIterator listObjects(Property predicate, Class type) { OntGraphModelImpl m = getModel(); @@ -757,7 +721,6 @@ public ExtendedIterator listObjects(Property predicate, C * @param subtype of {@link RDFNode rdf-node} * @return {@link ExtendedIterator} of {@link RDFNode node}s of the type {@link S} * @see #listObjects(Property, Class) - * @since 1.4.0 */ public ExtendedIterator listSubjects(Property predicate, Class type) { OntGraphModelImpl m = getModel(); @@ -784,7 +747,6 @@ public Stream objects(Property predicate) { * @param predicate {@link Property} * @return {@link ExtendedIterator} of {@link RDFNode}s * @see #objects(Property) - * @since 1.3.0 */ public ExtendedIterator listObjects(Property predicate) { return listProperties(predicate).mapWith(Statement::getObject); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntStatementImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntStatementImpl.java index 40963f440..4944d7571 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/OntStatementImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/OntStatementImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -120,7 +120,6 @@ public static OntStatementImpl createOntStatementImpl(Resource s, Property p, RD * @param n {@link Node}, not variable, not literal, not {@code null} * @param g {@link EnhGraph}, not {@code null} * @return {@link OntObject} - * @since 1.4.2 */ static OntObject createSubject(Node n, EnhGraph g) { return OntObjectImpl.wrapAsOntObject(n, g); @@ -132,7 +131,6 @@ static OntObject createSubject(Node n, EnhGraph g) { * @param n {@link Node}, an URI, not {@code null} * @param g {@link EnhGraph}, not {@code null} * @return {@link Property} - * @since 1.4.2 */ static Property createProperty(Node n, EnhGraph g) { return new PropertyImpl(n, g); @@ -147,7 +145,6 @@ static Property createProperty(Node n, EnhGraph g) { * @param g {@link EnhGraph}, not {@code null} * @return {@link RDFNode} * @see StatementImpl#createObject(Node, EnhGraph) - * @since 1.4.2 */ public static RDFNode createObject(Node n, EnhGraph g) { return n.isLiteral() ? new LiteralImpl(n, g) : OntObjectImpl.wrapAsOntObject(n, g); @@ -303,7 +300,6 @@ public boolean hasAnnotations() { * * @return {@link ExtendedIterator} of {@link OntStatement}s * @see #annotations() - * @since 1.3.0 */ public ExtendedIterator listAnnotations() { ExtendedIterator res = Iter.flatMap(listAnnotationResources(), diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/PersonalityModel.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/PersonalityModel.java index c274f7831..7b4b120fb 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/PersonalityModel.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/PersonalityModel.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -39,8 +39,6 @@ * the method {@link com.github.owlcs.ontapi.jena.impl.conf.PersonalityBuilder#add(Class, ObjectFactory)}. *

* Created by @ssz on 18.01.2019. - * - * @since 1.4.0 */ public interface PersonalityModel { @@ -95,7 +93,6 @@ public interface PersonalityModel { * * @param type a {@code Class}-type of {@link OntObject}, not {@code null} * @return a {@code Set} of {@link Node}s - * @since 1.4.2 */ Set getSystemResources(Class type); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/UnionModel.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/UnionModel.java index d4293db82..f0cd3c168 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/UnionModel.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/UnionModel.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -14,6 +14,9 @@ package com.github.owlcs.ontapi.jena.impl; +import com.github.owlcs.ontapi.jena.OntJenaException; +import com.github.owlcs.ontapi.jena.UnionGraph; +import com.github.owlcs.ontapi.jena.utils.Graphs; import org.apache.jena.atlas.lib.Cache; import org.apache.jena.enhanced.Personality; import org.apache.jena.graph.Graph; @@ -21,9 +24,6 @@ import org.apache.jena.rdf.model.*; import org.apache.jena.rdf.model.impl.ModelCom; import org.apache.jena.shared.JenaException; -import com.github.owlcs.ontapi.jena.OntJenaException; -import com.github.owlcs.ontapi.jena.UnionGraph; -import com.github.owlcs.ontapi.jena.utils.Graphs; import java.io.OutputStream; import java.io.Writer; @@ -143,7 +143,6 @@ public boolean isLocal(Resource s, Property p, RDFNode o) { * @return {@link RDFNode} or {@code null} * @throws RuntimeException unexpected misconfiguration (RDF recursion, wrong input, personality mismatch, etc) * @see #getNodeAs(Node, Class) - * @since 1.3.0 */ public N findNodeAs(Node node, Class type) { try { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/WrappedFactoryImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/WrappedFactoryImpl.java index c689b3cd5..e2fef55a0 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/WrappedFactoryImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/WrappedFactoryImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -14,14 +14,14 @@ package com.github.owlcs.ontapi.jena.impl; -import org.apache.jena.enhanced.EnhGraph; -import org.apache.jena.enhanced.EnhNode; -import org.apache.jena.graph.Node; -import org.apache.jena.util.iterator.ExtendedIterator; import com.github.owlcs.ontapi.jena.OntJenaException; import com.github.owlcs.ontapi.jena.impl.conf.BaseFactoryImpl; import com.github.owlcs.ontapi.jena.impl.conf.ObjectFactory; import com.github.owlcs.ontapi.jena.model.OntObject; +import org.apache.jena.enhanced.EnhGraph; +import org.apache.jena.enhanced.EnhNode; +import org.apache.jena.graph.Node; +import org.apache.jena.util.iterator.ExtendedIterator; import java.util.Objects; @@ -34,7 +34,6 @@ * Created by @ssz on 18.01.2019. * * @see Factories - * @since 1.4.0 */ @SuppressWarnings("WeakerAccess") public class WrappedFactoryImpl extends BaseFactoryImpl { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntModelConfig.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntModelConfig.java index dfef72ec1..7707f7d6f 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntModelConfig.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntModelConfig.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -342,7 +342,7 @@ private static OntPersonality.Punnings createPunningsVocabulary(OntModelConfig.S toMap(res, OntDataProperty.class, OWL.ObjectProperty); toMap(res, OntObjectProperty.Named.class, OWL.DatatypeProperty); } - OntEntity.entityTypes().forEach(t -> res.computeIfAbsent(t, k -> Collections.emptySet())); + OntEntity.listEntityTypes().forEachRemaining(t -> res.computeIfAbsent(t, k -> Collections.emptySet())); //return type -> fromMap(res, type); return new VocabularyImpl.EntitiesImpl(res); } diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntPersonality.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntPersonality.java index 9dd3692ed..7f28e9d5e 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntPersonality.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/OntPersonality.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -137,7 +137,6 @@ default Stream> types(Class type) { * Each node obtained from this class must be IRI (i.e. {@code node.isURI() = true}). * * @see OntEntity#types() - * @since 1.4.0 */ interface Builtins extends Vocabulary.Entities { /** @@ -170,7 +169,6 @@ default Set getProperties() { * * @see Punnings * @see OntEntity#types() - * @since 1.4.0 */ interface Punnings extends Vocabulary.Entities { } @@ -187,8 +185,6 @@ interface Punnings extends Vocabulary.Entities { * But, of course, all these things are customizable, and vocabularies may contain more or less restrictions. *

* Each node obtained from this class must be IRI (i.e. {@code node.isURI() = true}). - * - * @since 1.4.0 */ interface Reserved extends Vocabulary { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/PersonalityBuilder.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/PersonalityBuilder.java index 2979453e8..ef057cc48 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/PersonalityBuilder.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/PersonalityBuilder.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -33,8 +33,6 @@ * This must be the only place to create various {@code OntPersonality} objects. *

* Created by @szz on 17.01.2019. - * - * @since 1.4.0 */ @SuppressWarnings("WeakerAccess") public class PersonalityBuilder { @@ -146,7 +144,7 @@ public PersonalityBuilder addPersonality(Personality from) { * @return this builder */ public PersonalityBuilder setPunnings(OntPersonality.Punnings punnings) { - this.punnings = hasSpec(punnings, OntEntity.entityTypes().toArray(Class[]::new)); + this.punnings = hasSpec(punnings, getEntityTypes()); return this; } @@ -157,10 +155,14 @@ public PersonalityBuilder setPunnings(OntPersonality.Punnings punnings) { * @return this builder */ public PersonalityBuilder setBuiltins(OntPersonality.Builtins builtins) { - this.builtins = hasSpec(builtins, OntEntity.entityTypes().toArray(Class[]::new)); + this.builtins = hasSpec(builtins, getEntityTypes()); return this; } + private Class[] getEntityTypes() { + return OntEntity.entityTypes().toArray(Class[]::new); + } + /** * Sets a new reserved personality vocabulary. * diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/Vocabulary.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/Vocabulary.java index 96e44ab8b..1be4e63c2 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/Vocabulary.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/Vocabulary.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -15,7 +15,6 @@ package com.github.owlcs.ontapi.jena.impl.conf; import com.github.owlcs.ontapi.jena.OntJenaException; -import com.github.owlcs.ontapi.jena.OntVocabulary; import com.github.owlcs.ontapi.jena.model.*; import org.apache.jena.graph.Node; import org.apache.jena.rdf.model.Resource; @@ -30,8 +29,7 @@ * Created by @ssz on 16.01.2019. * * @param any subtype of {@link Resource} - * @see OntVocabulary - * @since 1.4.0 + * @see com.github.owlcs.ontapi.jena.OntVocabulary */ @FunctionalInterface public interface Vocabulary { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/VocabularyImpl.java b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/VocabularyImpl.java index 83aafd1c6..10f5bb5d0 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/VocabularyImpl.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/impl/conf/VocabularyImpl.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -31,8 +31,6 @@ * since it is important to have a quick access to desired types. *

* Created by @ssz on 18.01.2019. - * - * @since 1.4.0 */ abstract class VocabularyImpl implements Vocabulary { private final Map, Set> map; diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateClasses.java b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateClasses.java index c5f405771..902db054d 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateClasses.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateClasses.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,8 +22,6 @@ /** * A technical interface to generate {@link OntClass Class Expression}s. * Created by @ssz on 13.05.2019. - * - * @since 1.4.0 */ interface CreateClasses { @@ -379,7 +377,6 @@ interface CreateClasses { * @param classes Array of {@link OntClass class expression}s without {@code null}s * @return {@link OntClass.IntersectionOf} * @see #createObjectIntersectionOf(Collection) - * @since 1.4.0 */ default OntClass.IntersectionOf createObjectIntersectionOf(OntClass... classes) { return createObjectIntersectionOf(Arrays.asList(classes)); @@ -391,7 +388,6 @@ default OntClass.IntersectionOf createObjectIntersectionOf(OntClass... classes) * @param classes Array of {@link OntClass class expression}s without {@code null}s * @return {@link OntClass.UnionOf} * @see #createObjectUnionOf(Collection) - * @since 1.4.0 */ default OntClass.UnionOf createObjectUnionOf(OntClass... classes) { return createObjectUnionOf(Arrays.asList(classes)); @@ -403,7 +399,6 @@ default OntClass.UnionOf createObjectUnionOf(OntClass... classes) { * @param individuals Array of {@link OntIndividual individual}s without {@code null}s * @return {@link OntClass.OneOf} * @see #createObjectOneOf(Collection) - * @since 1.4.0 */ default OntClass.OneOf createObjectOneOf(OntIndividual... individuals) { return createObjectOneOf(Arrays.asList(individuals)); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateDisjoint.java b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateDisjoint.java index 42ce0a338..34bf90abe 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateDisjoint.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateDisjoint.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -20,8 +20,6 @@ /** * A technical interface to generate {@link OntDisjoint Disjoint Resource}s. * Created by @szz on 14.05.2019. - * - * @since 1.4.0 */ interface CreateDisjoint { @@ -89,7 +87,6 @@ interface CreateDisjoint { * @param classes Array of {@link OntClass Class Expression}s without {@code null}-elements * @return {@link OntDisjoint.Classes} * @see #createDisjointClasses(Collection) - * @since 1.4.0 */ default OntDisjoint.Classes createDisjointClasses(OntClass... classes) { return createDisjointClasses(Arrays.asList(classes)); @@ -101,7 +98,6 @@ default OntDisjoint.Classes createDisjointClasses(OntClass... classes) { * @param individuals Array of {@link OntIndividual individual}s without {@code null}-elements * @return {@link OntDisjoint.Individuals} * @see #createDifferentIndividuals(Collection) - * @since 1.4.0 */ default OntDisjoint.Individuals createDifferentIndividuals(OntIndividual... individuals) { return createDifferentIndividuals(Arrays.asList(individuals)); @@ -113,7 +109,6 @@ default OntDisjoint.Individuals createDifferentIndividuals(OntIndividual... indi * @param properties Array of {@link OntObjectProperty Object Property Expression}s without {@code null}-elements * @return {@link OntDisjoint.ObjectProperties} * @see #createDisjointObjectProperties(Collection) - * @since 1.4.0 */ default OntDisjoint.ObjectProperties createDisjointObjectProperties(OntObjectProperty... properties) { return createDisjointObjectProperties(Arrays.asList(properties)); @@ -125,7 +120,6 @@ default OntDisjoint.ObjectProperties createDisjointObjectProperties(OntObjectPro * @param properties Array of {@link OntDataProperty Data Properties} without {@code null}-elements * @return {@link OntDisjoint.DataProperties} * @see #createDisjointDataProperties(Collection) - * @since 1.4.0 */ default OntDisjoint.DataProperties createDisjointDataProperties(OntDataProperty... properties) { return createDisjointDataProperties(Arrays.asList(properties)); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateRanges.java b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateRanges.java index 5e45983be..be9bf2f4c 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateRanges.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateRanges.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,8 +22,6 @@ /** * A technical interface to generate {@link OntDataRange Data Range Expression}s. * Created by @szz on 14.05.2019. - * - * @since 1.4.0 */ interface CreateRanges { @@ -108,7 +106,6 @@ interface CreateRanges { * @param values Array of {@link Literal literal}s, without {@code null}-elements * @return {@link OntDataRange.OneOf} * @see #createDataOneOf(Collection) - * @since 1.4.0 */ default OntDataRange.OneOf createDataOneOf(Literal... values) { return createDataOneOf(Arrays.asList(values)); @@ -121,7 +118,6 @@ default OntDataRange.OneOf createDataOneOf(Literal... values) { * @param values Array of {@link OntFacetRestriction facet restriction}s, without {@code null}s * @return {@link OntDataRange.Restriction} * @see #createDataRestriction(OntDataRange.Named, Collection) - * @since 1.4.0 */ default OntDataRange.Restriction createDataRestriction(OntDataRange.Named other, OntFacetRestriction... values) { return createDataRestriction(other, Arrays.asList(values)); @@ -133,7 +129,6 @@ default OntDataRange.Restriction createDataRestriction(OntDataRange.Named other, * @param values {@code Collection} of {@link OntDataRange data range}s, without {@code null}-elements * @return {@link OntDataRange.UnionOf} * @see #createDataUnionOf(Collection) - * @since 1.4.0 */ default OntDataRange.UnionOf createDataUnionOf(OntDataRange... values) { return createDataUnionOf(Arrays.asList(values)); @@ -145,7 +140,6 @@ default OntDataRange.UnionOf createDataUnionOf(OntDataRange... values) { * @param values Array of {@link OntDataRange data range}s, without {@code null}-elements * @return {@link OntDataRange.IntersectionOf} * @see #createDataIntersectionOf(Collection) - * @since 1.4.0 */ default OntDataRange.IntersectionOf createDataIntersectionOf(OntDataRange... values) { return createDataIntersectionOf(Arrays.asList(values)); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateSWRL.java b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateSWRL.java index 7e2a41c21..9c34ac3e5 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/CreateSWRL.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/CreateSWRL.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,8 +22,6 @@ * A technical interface to generate SWRL Objects (Variable, Atoms, Imp). *

* Created by @szz on 14.05.2019. - * - * @since 1.4.0 */ interface CreateSWRL { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/HasCardinality.java b/src/main/java/com/github/owlcs/ontapi/jena/model/HasCardinality.java index 041fd29ac..0463f456c 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/HasCardinality.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/HasCardinality.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -19,7 +19,6 @@ * Created by @ssz on 09.05.2019. * * @see SetCardinality - * @since 1.4.0 */ interface HasCardinality { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperties.java b/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperties.java index 330253333..c78157139 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperties.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperties.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,9 +22,9 @@ *

* Created by @ssz on 09.05.2019. * - * @param

- any subtype of {@link OntRealProperty} in general case, but in the current model it can only be {@link OntDataProperty} + * @param

- any subtype of {@link OntRealProperty} in general case, + * but in the current model it can only be {@link OntDataProperty} * @see SetProperties - * @since 1.4.0 */ interface HasProperties

extends HasRDFNodeList

, HasProperty

{ diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperty.java index 6f91e3ad0..5aaa3fbc4 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/HasProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,7 +22,6 @@ * * @param

- {@link OntRealProperty Data or Object} property expression * @see SetProperty - * @since 1.4.0 */ interface HasProperty

{ /** diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/HasRDFNodeList.java b/src/main/java/com/github/owlcs/ontapi/jena/model/HasRDFNodeList.java index 835336385..0eee5e0ba 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/HasRDFNodeList.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/HasRDFNodeList.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -23,7 +23,6 @@ * @param any {@link RDFNode} - a type for list's item * @see WithOntList * @see SetComponents - * @since 1.4.0 */ interface HasRDFNodeList { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/HasValue.java b/src/main/java/com/github/owlcs/ontapi/jena/model/HasValue.java index 052ca2018..4a94ca79d 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/HasValue.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/HasValue.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -26,7 +26,6 @@ * @param a subtype of {@link RDFNode}: {@link OntClass}, {@link OntDataRange}, {@link OntIndividual} * or {@link org.apache.jena.rdf.model.Literal} * @see SetValue - * @since 1.4.0 */ interface HasValue { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotation.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotation.java index 082d19f69..f2c1154eb 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotation.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotation.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -59,7 +59,7 @@ public interface OntAnnotation extends OntObject { * The example above contains two such statements: * {@code _:x rdfs:comment "some comment 1"} and {@code _:x rdfs:comment "some comment 2"@fr}. * - * @return Stream of annotation statements {@link OntStatement}s + * @return {@code Stream} of annotation statements {@link OntStatement}s * @see OntObject#annotations() */ Stream assertions(); @@ -69,15 +69,14 @@ public interface OntAnnotation extends OntObject { * The resulting resources must have {@link com.github.owlcs.ontapi.jena.vocabulary.OWL#Annotation owl:Annotation} type * and this object on predicate {@link com.github.owlcs.ontapi.jena.vocabulary.OWL#annotatedSource owl:annotatedSource}. * - * @return Stream of {@link OntAnnotation}s - * @since 1.3.0 + * @return {@code Stream} of {@link OntAnnotation}s */ Stream descendants(); /** * Just a synonym for {@link #assertions()}. * - * @return Stream of annotation statements {@link OntStatement}s + * @return {@code Stream} of annotation statements {@link OntStatement}s */ @Override Stream annotations(); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotationProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotationProperty.java index 4b316a17e..e859100b2 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotationProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntAnnotationProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -36,7 +36,6 @@ public interface OntAnnotationProperty extends OntProperty, OntNamedPropertydistinct {@code Stream} of annotation properties - * @since 1.4.0 */ Stream superProperties(boolean direct); @@ -44,7 +43,6 @@ public interface OntAnnotationProperty extends OntProperty, OntNamedPropertydistinct {@code Stream} of annotation properties - * @since 1.4.0 */ Stream subProperties(boolean direct); @@ -52,7 +50,6 @@ public interface OntAnnotationProperty extends OntProperty, OntNamedProperty domains(); @@ -61,7 +58,6 @@ public interface OntAnnotationProperty extends OntProperty, OntNamedProperty ranges(); @@ -77,7 +73,6 @@ public interface OntAnnotationProperty extends OntProperty, OntNamedPropertythis instance to allow cascading calls * @see #removeSuperProperty(Resource) - * @since 1.4.0 */ default OntAnnotationProperty addSuperProperty(OntAnnotationProperty property) { addSubPropertyOfStatement(property); @@ -179,7 +172,6 @@ default OntAnnotationProperty removeSuperProperty(Resource property) { * * @param property {@link OntAnnotationProperty}, not {@code null} * @return {@link OntStatement} to allow subsequent annotations adding - * @since 1.4.0 */ default OntStatement addSubPropertyOfStatement(OntAnnotationProperty property) { return addStatement(RDFS.subPropertyOf, property); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntClass.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntClass.java index 8b9d6167f..746154fc6 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntClass.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntClass.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -62,7 +62,6 @@ public interface OntClass extends OntObject { * @return distinct {@code Stream} of super {@link OntClass class expression}s * @see #superClasses() * @see #subClasses(boolean) - * @since 1.4.0 */ Stream superClasses(boolean direct); @@ -84,7 +83,6 @@ public interface OntClass extends OntObject { * otherwise answers all sub-classes found in the {@code Graph} recursively * @return distinct {@code Stream} of sub {@link OntClass class expression}s * @see #superClasses(boolean) - * @since 1.4.0 */ Stream subClasses(boolean direct); @@ -93,7 +91,6 @@ public interface OntClass extends OntObject { * that are attached to this class expression on predicate {@link OWL#hasKey owl:hasKey}. * * @return {@code Stream} of {@link OntList}s with parameter-type {@code OntDOP} - * @since 1.4.0 */ Stream> hasKeys(); @@ -130,7 +127,6 @@ public interface OntClass extends OntObject { * @param dataProperties {@link Collection} (preferably {@link Set})of {@link OntDataProperty data property expression}s * @return {@link OntList} of {@link OntRealProperty}s * @see #addHasKey(Collection, Collection) - * @since 1.3.0 */ OntList createHasKey(Collection objectProperties, Collection dataProperties); @@ -147,7 +143,6 @@ public interface OntClass extends OntObject { * @see #addHasKey(OntRealProperty...) * @see #removeHasKey(Resource) * @see #clearHasKeys() - * @since 1.4.0 */ OntStatement addHasKeyStatement(OntRealProperty... properties); @@ -157,7 +152,6 @@ public interface OntClass extends OntObject { * @param list {@link Resource} can be {@link OntList} or {@link RDFList} * @return this instance to allow cascading calls * @throws OntJenaException if the list is not found - * @since 1.3.0 */ OntClass removeHasKey(Resource list); @@ -197,7 +191,6 @@ default Stream properties() { * * @return {@code Stream} of {@link OntClass}s * @see #superClasses(boolean) - * @since 1.4.0 */ default Stream superClasses() { return objects(RDFS.subClassOf, OntClass.class); @@ -220,7 +213,6 @@ default Stream disjointClasses() { * * @return {@code Stream} of {@link OntClass}s * @see OntDataRange.Named#equivalentClasses() - * @since 1.4.0 */ default Stream equivalentClasses() { return objects(OWL.equivalentClass, OntClass.class); @@ -234,7 +226,6 @@ default Stream equivalentClasses() { * @return {@link OntStatement} to allow the subsequent annotations addition * @see #addSuperClass(OntClass) * @see #removeSuperClass(Resource) - * @since 1.4.0 */ default OntStatement addSubClassOfStatement(OntClass other) { return addStatement(RDFS.subClassOf, other); @@ -263,7 +254,6 @@ default OntStatement addDisjointWithStatement(OntClass other) { * @see #addEquivalentClass(OntClass) * @see #removeEquivalentClass(Resource) * @see OntDataRange.Named#addEquivalentClassStatement(OntDataRange) - * @since 1.4.0 */ default OntStatement addEquivalentClassStatement(OntClass other) { return addStatement(OWL.equivalentClass, other); @@ -278,7 +268,6 @@ default OntStatement addEquivalentClassStatement(OntClass other) { * @see #addHasKeyStatement(OntRealProperty...) * @see #addHasKey(OntRealProperty...) * @see 2.3.1 Axioms that Generate a Main Triple - * @since 1.4.0 */ default OntStatement addHasKeyStatement(Collection objectProperties, Collection dataProperties) { return createHasKey(objectProperties, dataProperties).getMainStatement(); @@ -292,7 +281,6 @@ default OntStatement addHasKeyStatement(Collection objectProp * @return this instance to allow cascading calls * @see #addSubClassOfStatement(OntClass) * @see #removeSuperClass(Resource) - * @since 1.4.0 */ default OntClass addSuperClass(OntClass other) { addSubClassOfStatement(other); @@ -307,7 +295,6 @@ default OntClass addSuperClass(OntClass other) { * @return this instance to allow cascading calls * @see #addDisjointWithStatement(OntClass) * @see #removeDisjointClass(Resource) - * @since 1.4.0 */ default OntClass addDisjointClass(OntClass other) { addDisjointWithStatement(other); @@ -350,7 +337,6 @@ default OntClass addHasKey(Collection objectProperties, Colle * @see #addHasKey(Collection, Collection) * @see #removeHasKey(Resource) * @see #clearHasKeys() - * @since 1.3.0 */ default OntClass addHasKey(OntRealProperty... properties) { addHasKeyStatement(properties); @@ -367,7 +353,6 @@ default OntClass addHasKey(OntRealProperty... properties) { * @return this instance to allow cascading calls * @see #addSubClassOfStatement(OntClass) * @see #addSuperClass(OntClass) - * @since 1.4.0 */ default OntClass removeSuperClass(Resource other) { remove(RDFS.subClassOf, other); @@ -385,7 +370,6 @@ default OntClass removeSuperClass(Resource other) { * @see #addDisjointWithStatement(OntClass) * @see #addDisjointClass(OntClass) * @see OntDisjoint.Classes - * @since 1.4.0 */ default OntClass removeDisjointClass(Resource other) { remove(OWL.disjointWith, other); @@ -415,7 +399,6 @@ default OntClass removeEquivalentClass(Resource other) { * * @return this instance to allow cascading calls * @throws OntJenaException if the list is not found - * @since 1.3.0 */ default OntClass clearHasKeys() { hasKeys().collect(Collectors.toList()).forEach(this::removeHasKey); @@ -428,7 +411,6 @@ default OntClass clearHasKeys() { * * @param list {@link RDFNode} * @return {@code Optional} around {@link OntList} of {@link OntRealProperty data and object property expression}s - * @since 1.3.0 */ default Optional> findHasKey(RDFNode list) { try (Stream> res = hasKeys().filter(r -> Objects.equals(r, list))) { @@ -447,7 +429,6 @@ default Optional> findHasKey(RDFNode list) { * * @return distinct {@code Stream} of {@link OntObjectProperty object} and {@link OntDataProperty data} properties * @see #hasKeys() - * @since 1.4.0 */ default Stream fromHasKey() { return hasKeys().flatMap(OntList::members).distinct(); @@ -599,70 +580,6 @@ interface NaryDataSomeValuesFrom extends NaryRestrictionCE, SetProperties { } - /* - * =========================== - * Abstract class expressions: - * =========================== - */ - - /** - * An abstraction for Boolean Connectives (with exclude of {@link ComplementOf}) and Enumeration of Individuals. - * - * @param a component type - */ - interface ComponentsCE extends OntClass, HasRDFNodeList { - } - - /** - * An abstraction for Cardinality Restrictions. - * - * @param a value type - * @param

any subtype of {@link OntRealProperty} - */ - interface CardinalityRestrictionCE - extends HasCardinality, ComponentRestrictionCE { - } - - /** - * An abstract class expression (Restriction) that has component (i.e. 'filler' in OWL-API terms): - * all Cardinality Restrictions, Existential/Universal Restrictions, Individual/Literal Value Restrictions. - * - * @param a value type - * @param

any subtype of {@link OntRealProperty} - */ - interface ComponentRestrictionCE - extends UnaryRestrictionCE

, HasValue { - } - - /** - * An abstraction that unites all {@link RestrictionCE Restriction}s - * with the predicate {@link OWL#onProperties owl:onProperties}. - * - * @param a value type - * @param

any subtype of {@link OntRealProperty} - */ - interface NaryRestrictionCE - extends RestrictionCE

, HasProperties

, HasValue { - } - - /** - * An abstract class expression that unites all {@link RestrictionCE Restriction}s - * with the predicate {@link OWL#onProperty owl:onProperty}. - * - * @param

any subtype of {@link OntRealProperty} - * @since 1.4.0 - */ - interface UnaryRestrictionCE

extends RestrictionCE

{ - } - - /** - * An abstract class expression that unites all class expressions with the type {@link OWL#Restriction}. - * - * @param

any subtype of {@link OntRealProperty} - */ - interface RestrictionCE

extends OntClass, HasProperty

{ - } - /** * An OWL Class {@link OntEntity Entity}, a named class expression. * This is an analogue of {@link org.apache.jena.ontology.OntClass}, but for OWL2. @@ -678,7 +595,6 @@ interface Named extends OntEntity, OntClass { * on predicate {@link OWL#disjointUnionOf owl:disjointUnionOf}. * * @return {@code Stream} of {@link OntList}s with parameter-type {@code OntCE} - * @since 1.4.0 */ Stream> disjointUnions(); @@ -695,7 +611,6 @@ interface Named extends OntEntity, OntClass { * @return {@link OntList} of {@link OntClass}s * @see #addDisjointUnionOfStatement(OntClass...) * @see #removeDisjointUnion(Resource) - * @since 1.3.0 */ OntList createDisjointUnion(Collection classes); @@ -704,8 +619,7 @@ interface Named extends OntEntity, OntClass { * attached to this class by the specified rdf-node in the form of {@link OntList}. * * @param list {@link RDFNode} - * @return Optional around {@link OntList} of {@link OntClass class expression}s - * @since 1.3.0 + * @return {@code Optional} around {@link OntList} of {@link OntClass class expression}s */ default Optional> findDisjointUnion(RDFNode list) { try (Stream> res = disjointUnions().filter(r -> Objects.equals(r, list))) { @@ -727,7 +641,6 @@ default Optional> findDisjointUnion(RDFNode list) { * @see #addDisjointUnion(OntClass...) * @see #addDisjointUnionOfStatement(OntClass...) * @see #removeDisjointUnion(Resource) - * @since 1.4.0 */ default OntStatement addDisjointUnionOfStatement(OntClass... classes) { return addDisjointUnionOfStatement(Arrays.stream(classes).collect(Collectors.toCollection(LinkedHashSet::new))); @@ -745,7 +658,6 @@ default OntStatement addDisjointUnionOfStatement(OntClass... classes) { * @see #addDisjointUnion(Collection) * @see #addDisjointUnionOfStatement(Collection) * @see #removeDisjointUnion(Resource) - * @since 1.4.0 */ default OntStatement addDisjointUnionOfStatement(Collection classes) { return createDisjointUnion(classes).getMainStatement(); @@ -799,7 +711,6 @@ default Named addHasKey(OntRealProperty... properties) { /** * @param classes a collection of {@link OntClass class expression}s without {@code null}s * @return this instance to allow cascading calls - * @since 1.4.0 */ default Named addDisjointUnion(Collection classes) { addDisjointUnionOfStatement(classes); @@ -810,7 +721,6 @@ default Named addDisjointUnion(Collection classes) { * @param classes Array of {@link OntClass class expressions} without {@code null}s, * duplicates will be discarded and order will be saved * @return this instance to allow cascading calls - * @since 1.4.0 */ default Named addDisjointUnion(OntClass... classes) { addDisjointUnionOfStatement(classes); @@ -827,7 +737,6 @@ default Named addDisjointUnion(OntClass... classes) { * @see #createDisjointUnion(Collection) * @see #addDisjointUnionOfStatement(OntClass...) * @see #createDisjointUnion(Collection) - * @since 1.3.0 */ Named removeDisjointUnion(Resource list); @@ -870,7 +779,6 @@ default Named clearHasKeys() { * * @return this instance to allow cascading calls * @see #removeDisjointUnion(Resource) - * @since 1.3.0 */ default Named clearDisjointUnions() { disjointUnions().collect(Collectors.toSet()).forEach(this::removeDisjointUnion); @@ -886,7 +794,6 @@ default Named clearDisjointUnions() { * * @return distinct stream of {@link OntClass class expressions}s * @see #disjointUnions() - * @since 1.4.0 */ default Stream fromDisjointUnionOf() { return disjointUnions().flatMap(OntList::members).distinct(); @@ -941,4 +848,67 @@ default Named annotate(OntAnnotationProperty predicate, RDFNode value) { return this; } } + + /* + * =========================== + * Abstract class expressions: + * =========================== + */ + + /** + * An abstraction for Boolean Connectives (with exclude of {@link ComplementOf}) and Enumeration of Individuals. + * + * @param a component type + */ + interface ComponentsCE extends OntClass, HasRDFNodeList { + } + + /** + * An abstraction for Cardinality Restrictions. + * + * @param a value type + * @param

any subtype of {@link OntRealProperty} + */ + interface CardinalityRestrictionCE + extends HasCardinality, ComponentRestrictionCE { + } + + /** + * An abstract class expression (Restriction) that has component (i.e. 'filler' in OWL-API terms): + * all Cardinality Restrictions, Existential/Universal Restrictions, Individual/Literal Value Restrictions. + * + * @param a value type + * @param

any subtype of {@link OntRealProperty} + */ + interface ComponentRestrictionCE + extends UnaryRestrictionCE

, HasValue { + } + + /** + * An abstraction that unites all {@link RestrictionCE Restriction}s + * with the predicate {@link OWL#onProperties owl:onProperties}. + * + * @param a value type + * @param

any subtype of {@link OntRealProperty} + */ + interface NaryRestrictionCE + extends RestrictionCE

, HasProperties

, HasValue { + } + + /** + * An abstract class expression that unites all {@link RestrictionCE Restriction}s + * with the predicate {@link OWL#onProperty owl:onProperty}. + * + * @param

any subtype of {@link OntRealProperty} + */ + interface UnaryRestrictionCE

extends RestrictionCE

{ + } + + /** + * An abstract class expression that unites all class expressions with the type {@link OWL#Restriction}. + * + * @param

any subtype of {@link OntRealProperty} + */ + interface RestrictionCE

extends OntClass, HasProperty

{ + } } \ No newline at end of file diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataProperty.java index b426d5968..46466f4b6 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -90,7 +90,6 @@ default Stream negativeAssertions(OntIndi * Returns all property ranges (the statement pattern: {@code R rdfs:range D}). * * @return {@code Stream} of {@link OntDataRange}s - * @since 1.4.0 */ @Override default Stream ranges() { @@ -106,7 +105,6 @@ default Stream ranges() { * @see #addSuperProperty(OntDataProperty) * @see OntProperty#removeSuperProperty(Resource) * @see #addSubPropertyOfStatement(OntDataProperty) - * @since 1.4.0 */ @Override default Stream superProperties() { @@ -114,12 +112,13 @@ default Stream superProperties() { } /** - * Returns disjoint properties (statement: {@code R1 owl:propertyDisjointWith R2}, where {@code Ri} - this property). + * Returns disjoint properties. + * The statement pattern is: {@code Ri owl:propertyDisjointWith Rj}, where {@code Ri} - this property, + * and {@code Rj} - the data property to return. * * @return {@code Stream} of {@link OntDataProperty}s * @see OntObjectProperty#disjointProperties() * @see OntDisjoint.DataProperties - * @since 1.4.0 */ @Override default Stream disjointProperties() { @@ -129,11 +128,10 @@ default Stream disjointProperties() { /** * Returns all equivalent data properties * The statement pattern is {@code Ri owl:equivalentProperty Rj}, - * where {@code Ri} - this property, {@code Rj} - the property of the same type to return. + * where {@code Ri} - this property, {@code Rj} - the data property to return. * * @return {@code Stream} of {@link OntDataProperty}s * @see OntObjectProperty#equivalentProperties() - * @since 1.4.0 */ @Override default Stream equivalentProperties() { @@ -147,7 +145,6 @@ default Stream equivalentProperties() { * @param range {@link OntDataRange}, not {@code null} * @return {@link OntStatement} to allow subsequent annotations adding * @see #addRange(OntDataRange) - * @since 1.4.0 */ default OntStatement addRangeStatement(OntDataRange range) { return addStatement(RDFS.range, range); @@ -159,7 +156,6 @@ default OntStatement addRangeStatement(OntDataRange range) { * * @param property {@link OntDataProperty}, not {@code null} * @return {@link OntStatement} to allow subsequent annotations adding - * @since 1.4.0 */ default OntStatement addSubPropertyOfStatement(OntDataProperty property) { return addStatement(RDFS.subPropertyOf, property); @@ -174,7 +170,6 @@ default OntStatement addSubPropertyOfStatement(OntDataProperty property) { * @see #addEquivalentProperty(OntDataProperty) * @see #removeEquivalentProperty(Resource) * @see OntObjectProperty#addEquivalentPropertyStatement(OntObjectProperty) - * @since 1.4.0 */ default OntStatement addEquivalentPropertyStatement(OntDataProperty other) { return addStatement(OWL.equivalentProperty, other); @@ -189,7 +184,6 @@ default OntStatement addEquivalentPropertyStatement(OntDataProperty other) { * @see #removeDisjointProperty(Resource) * @see OntObjectProperty#addPropertyDisjointWithStatement(OntObjectProperty) * @see OntDisjoint.ObjectProperties - * @since 1.4.0 */ default OntStatement addPropertyDisjointWithStatement(OntDataProperty other) { return addStatement(OWL.propertyDisjointWith, other); @@ -201,7 +195,6 @@ default OntStatement addPropertyDisjointWithStatement(OntDataProperty other) { * @param property {@link OntDataProperty}, not {@code null} * @return this instance to allow cascading calls * @see #removeSuperProperty(Resource) - * @since 1.4.0 */ default OntDataProperty addSuperProperty(OntDataProperty property) { addSubPropertyOfStatement(property); @@ -214,7 +207,6 @@ default OntDataProperty addSuperProperty(OntDataProperty property) { * @param range {@link Resource}, that represents a {@link OntDataRange data range}, not {@code null} * @return this instance to allow cascading calls * @throws org.apache.jena.enhanced.UnsupportedPolymorphismException in case wrong resource is specified - * @since 1.4.1 */ default OntDataProperty addRange(Resource range) { return addRange(range.inModel(getModel()).as(OntDataRange.class)); @@ -266,7 +258,6 @@ default OntDataProperty addEquivalentProperty(OntDataProperty other) { * @see OntObjectProperty#addDisjointProperty(OntObjectProperty) * @see OntRealProperty#removeDisjointProperty(Resource) * @see OntDisjoint.DataProperties - * @since 1.4.0 */ default OntDataProperty addDisjointProperty(OntDataProperty other) { addPropertyDisjointWithStatement(other); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataRange.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataRange.java index c9bb22db0..b0d88ff28 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataRange.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDataRange.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -43,7 +43,6 @@ public interface OntDataRange extends OntObject { * So n-ary data ranges are not supported and, therefore, the method always returns {@code 1}. * * @return int, positive number - * @since 1.4.0 */ default int arity() { return 1; @@ -101,7 +100,6 @@ interface Restriction extends ComponentsDR, * @param type subclass of {@link OntFacetRestriction}, not {@code null} * @param literal value, not {@code null} * @return this instance to allow cascading calls - * @since 1.4.0 */ default Restriction addFacet(Class type, Literal literal) { getList().add(getModel().createFacetRestriction(type, literal)); @@ -134,7 +132,6 @@ interface Named extends OntEntity, OntDataRange { * * @return {@code Stream} of {@link OntDataRange}s * @see OntClass#equivalentClasses() - * @since 1.4.2 */ default Stream equivalentClasses() { return objects(OWL.equivalentClass, OntDataRange.class); @@ -148,7 +145,6 @@ default Stream equivalentClasses() { * @see #addEquivalentClass(OntDataRange) * @see #removeEquivalentClass(Resource) * @see OntClass#addEquivalentClassStatement(OntClass) - * @since 1.4.0 */ default OntStatement addEquivalentClassStatement(OntDataRange other) { return addStatement(OWL.equivalentClass, other); @@ -202,7 +198,6 @@ default RDFDatatype toRDFDatatype() { * * @param obj anything, not {@code null} * @return {@link Literal} - * @since 1.4.1 */ default Literal createLiteral(Object obj) { return createLiteral(String.valueOf(Objects.requireNonNull(obj))); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDisjoint.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDisjoint.java index 2ecaa88c9..332281cf5 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntDisjoint.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntDisjoint.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -64,7 +64,6 @@ interface Individuals extends OntDisjoint, SetComponents getList(); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntEntity.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntEntity.java index 3f72a25c3..349c212da 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntEntity.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntEntity.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -14,7 +14,6 @@ package com.github.owlcs.ontapi.jena.model; -import com.github.owlcs.ontapi.jena.OntVocabulary; import com.github.owlcs.ontapi.jena.utils.Iter; import org.apache.jena.util.iterator.ExtendedIterator; @@ -38,7 +37,7 @@ public interface OntEntity extends OntObject { /** * Returns all entity types as stream. * - * @return Stream of OWL-entity types + * @return a {@code Stream} of OWL-entity types */ static Stream> entityTypes() { return Iter.asStream(listEntityTypes()); @@ -47,8 +46,7 @@ static Stream> entityTypes() { /** * Lists all OWL entity types. * - * @return {@link ExtendedIterator} of OWL entity Class-types - * @since 1.3.0 + * @return an {@link ExtendedIterator} of OWL entity {@code Class}-types */ static ExtendedIterator> listEntityTypes() { return Iter.of(OntClass.Named.class, @@ -92,8 +90,8 @@ static ExtendedIterator> listEntityTypes() { * * @return {@code true} if it is a built-in entity * @see com.github.owlcs.ontapi.jena.vocabulary.OWL - * @see com.github.owlcs.ontapi.jena.impl.conf.OntPersonality#getBuiltins() - * @see OntVocabulary.Factory#get() + * @see com.github.owlcs.ontapi.jena.impl.conf.OntPersonality.Builtins + * @see com.github.owlcs.ontapi.jena.OntVocabulary */ boolean isBuiltIn(); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntID.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntID.java index ed474d9d1..409ba4969 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntID.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntID.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -85,7 +85,6 @@ public interface OntID extends OntObject { * * @param other {@link OntID} * @return {@code true} in case the IDs are the same, otherwise {@code false} - * @since 1.3.0 */ default boolean sameAs(OntID other) { return equals(other) && Objects.equals(getVersionIRI(), other.getVersionIRI()); @@ -98,7 +97,6 @@ default boolean sameAs(OntID other) { * * @return String or {@code null} * @see 3.2 Ontology Documents - * @since 1.3.2 */ default String getImportsIRI() { String res = getVersionIRI(); @@ -127,7 +125,6 @@ default OntID addComment(String txt, String lang) { * * @param txt String, the literal lexical form, not {@code null} * @return this ID-object to allow cascading calls - * @since 1.4.2 */ default OntID addVersionInfo(String txt) { return addVersionInfo(txt, null); @@ -140,7 +137,6 @@ default OntID addVersionInfo(String txt) { * @param txt String, the literal lexical form, not {@code null} * @param lang String, the language tag, nullable * @return this ID-object to allow cascading calls - * @since 1.4.2 */ default OntID addVersionInfo(String txt, String lang) { return annotate(getModel().getAnnotationProperty(OWL.versionInfo), txt, lang); @@ -151,7 +147,6 @@ default OntID addVersionInfo(String txt, String lang) { * If there is more than one such resource, an arbitrary selection is made. * * @return a {@code owl:versionInfo} string or {@code null} if nothing is found - * @since 1.4.2 */ default String getVersionInfo() { return getVersionInfo(null); @@ -166,7 +161,6 @@ default String getVersionInfo() { * to get no-lang literal string an empty string can be used * @return a {@code owl:versionInfo} string matching the given language, * or {@code null} if there is no version info - * @since 1.4.2 */ default String getVersionInfo(String lang) { try (Stream res = annotationValues(getModel().getAnnotationProperty(OWL.versionInfo), lang)) { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntIndividual.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntIndividual.java index 2931ff5e0..1bb7f8592 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntIndividual.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntIndividual.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -63,7 +63,6 @@ public interface OntIndividual extends OntObject { * @return distinct {@code Stream} of {@link OntClass class expressions} * @see #classes() * @see OntClass#superClasses(boolean) - * @since 1.4.0 */ Stream classes(boolean direct); @@ -80,7 +79,6 @@ public interface OntIndividual extends OntObject { * Returns all direct class types. * * @return {@code Stream} of {@link OntClass}s - * @since 1.4.0 */ default Stream classes() { return objects(RDF.type, OntClass.class); @@ -91,7 +89,6 @@ default Stream classes() { * The pattern to search for is {@code ai owl:sameAs aj}, where {@code ai} is this individual. * * @return {@code Stream} of {@link OntIndividual}s - * @since 1.4.0 */ default Stream sameIndividuals() { return objects(OWL.sameAs, OntIndividual.class); @@ -104,7 +101,6 @@ default Stream sameIndividuals() { * * @return {@code Stream} of {@link OntIndividual}s * @see OntDisjoint.Individuals - * @since 1.4.0 */ default Stream differentIndividuals() { return objects(OWL.differentFrom, OntIndividual.class); @@ -124,7 +120,6 @@ default Stream positiveAssertions() { * * @param predicate {@link OntNamedProperty} or {@code null} * @return {@code Stream} of {@link OntStatement}s - * @since 1.4.0 */ default Stream positiveAssertions(OntNamedProperty predicate) { return statements(predicate); @@ -146,7 +141,6 @@ default Stream negativeAssertions() { * * @param property {@link OntNamedProperty} or {@code null} * @return {@code Stream} of {@link OntNegativeAssertion negative property assertion}s - * @since 1.4.0 */ default Stream negativeAssertions(OntNamedProperty property) { return negativeAssertions().filter(x -> property == null || x.getProperty().equals(property)); @@ -159,7 +153,6 @@ default Stream negativeAssertions(OntNamedProperty propert * @return {@link OntStatement} to allow subsequent annotations adding * @see #attachClass(OntClass) * @see #detachClass(Resource) - * @since 1.4.0 */ default OntStatement addClassAssertion(OntClass clazz) { return addStatement(RDF.type, clazz); @@ -173,7 +166,6 @@ default OntStatement addClassAssertion(OntClass clazz) { * @see #addDifferentIndividual(OntIndividual) * @see #removeDifferentIndividual(Resource) * @see OntDisjoint.Individuals - * @since 1.4.0 */ default OntStatement addDifferentFromStatement(OntIndividual other) { return addStatement(OWL.differentFrom, other); @@ -187,7 +179,6 @@ default OntStatement addDifferentFromStatement(OntIndividual other) { * @see #addSameIndividual(OntIndividual) * @see #removeSameIndividual(Resource) * @see 9.6.1 Individual Equality - * @since 1.4.0 */ default OntStatement addSameAsStatement(OntIndividual other) { return addStatement(OWL.sameAs, other); @@ -216,7 +207,6 @@ default OntIndividual attachClass(OntClass clazz) { * @see #removeDifferentIndividual(Resource) * @see OntDisjoint.Individuals * @see 9.6.2 Individual Inequality - * @since 1.4.0 */ default OntIndividual addDifferentIndividual(OntIndividual other) { addDifferentFromStatement(other); @@ -231,7 +221,6 @@ default OntIndividual addDifferentIndividual(OntIndividual other) { * @return this instance to allow cascading calls * @see #addSameAsStatement(OntIndividual) * @see #removeSameIndividual(Resource) - * @since 1.4.0 */ default OntIndividual addSameIndividual(OntIndividual other) { addSameAsStatement(other); @@ -288,7 +277,6 @@ default OntIndividual addAssertion(OntObjectProperty.Named property, OntIndividu * @return this instance to allow cascading calls * @see Resource#addProperty(Property, RDFNode) * @see #removeAssertion(OntNamedProperty, RDFNode) - * @since 1.4.0 */ default OntIndividual addProperty(OntNamedProperty property, RDFNode value) { addStatement(property, value); @@ -348,7 +336,6 @@ default OntIndividual addNegativeAssertion(OntDataProperty property, Literal val * @return this instance to allow cascading calls * @see OntObject#remove(Property, RDFNode) * @see #addProperty(OntNamedProperty, RDFNode) - * @since 1.4.0 */ default OntIndividual removeAssertion(OntNamedProperty property, RDFNode value) { statements(property) @@ -365,7 +352,6 @@ default OntIndividual removeAssertion(OntNamedProperty property, RDFNode value) * @param value {@link RDFNode} (either {@link OntIndividual} or {@link Literal}), * can be {@code null} to remove all assertions for the predicate {@code property} * @return this instance to allow cascading calls - * @since 1.4.0 */ default OntIndividual removeNegativeAssertion(OntNamedProperty property, RDFNode value) { negativeAssertions(property) @@ -386,7 +372,6 @@ default OntIndividual removeNegativeAssertion(OntNamedProperty property, RDFNode * @see #addDifferentFromStatement(OntIndividual) * @see #addDifferentIndividual(OntIndividual) * @see OntDisjoint.Individuals - * @since 1.4.0 */ default OntIndividual removeDifferentIndividual(Resource other) { remove(OWL.differentFrom, other); @@ -403,7 +388,6 @@ default OntIndividual removeDifferentIndividual(Resource other) { * @return this instance to allow cascading calls * @see #addSameAsStatement(OntIndividual) * @see #addSameIndividual(OntIndividual) - * @since 1.4.0 */ default OntIndividual removeSameIndividual(Resource other) { remove(OWL.sameAs, other); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntList.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntList.java index 6ab5e8576..c7cec32b8 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntList.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntList.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -56,7 +56,6 @@ * * @param the type of {@link RDFNode rdf-node}s in this list * @see RDFNodeList - * @since 1.3.0 */ public interface OntList extends RDFNodeList, OntResource { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntModel.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntModel.java index f5925702f..181611e85 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntModel.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntModel.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -179,7 +179,6 @@ public interface OntModel extends Model, CreateClasses, CreateRanges, CreateDisj * * @param other {@link OntModel} to test, not {@code null} * @return {@code true} if the model is in imports - * @since 1.4.0 */ boolean hasImport(OntModel other); @@ -189,7 +188,6 @@ public interface OntModel extends Model, CreateClasses, CreateRanges, CreateDisj * @param uri String, not {@code null} * @return boolean * @see OntID#getImportsIRI() - * @since 1.4.0 */ boolean hasImport(String uri); @@ -238,7 +236,6 @@ public interface OntModel extends Model, CreateClasses, CreateRanges, CreateDisj * * @return {@code Stream} of {@link OntIndividual}s * @see OntModel#namedIndividuals() - * @since 1.4.1 */ Stream individuals(); @@ -288,7 +285,6 @@ public interface OntModel extends Model, CreateClasses, CreateRanges, CreateDisj * @return {@code Stream} of {@link OntStatement} * @see OntModel#statements(Resource, Property, RDFNode) * @see OntStatement#isLocal() - * @since 1.3.0 */ Stream localStatements(Resource s, Property p, RDFNode o); @@ -546,7 +542,6 @@ default E fetchOntEntity(Class type, String uri) { * Lists all named class expressions (OWL classes). * * @return {@code Stream} of {@link OntClass.Named Ontology Class}es - * @since 1.4.0 */ default Stream classes() { return ontEntities(OntClass.Named.class); @@ -556,7 +551,6 @@ default Stream classes() { * Lists all annotation properties. * * @return {@code Stream} of {@link OntAnnotationProperty Annotation Property}s - * @since 1.4.0 */ default Stream annotationProperties() { return ontEntities(OntAnnotationProperty.class); @@ -566,7 +560,6 @@ default Stream annotationProperties() { * Lists all data properties. * * @return {@code Stream} of {@link OntDataProperty Data Property}s - * @since 1.4.0 */ default Stream dataProperties() { return ontEntities(OntDataProperty.class); @@ -576,7 +569,6 @@ default Stream dataProperties() { * Lists all named object property expressions (object properties in short). * * @return {@code Stream} of {@link OntObjectProperty.Named Named Object Property}s - * @since 1.4.0 */ default Stream objectProperties() { return ontEntities(OntObjectProperty.Named.class); @@ -586,7 +578,6 @@ default Stream objectProperties() { * Lists all datatypes (named data range expressions). * * @return {@code Stream} of {@link OntDataRange.Named Ontology Datatype}s - * @since 1.4.0 */ default Stream datatypes() { return ontEntities(OntDataRange.Named.class); @@ -599,7 +590,6 @@ default Stream datatypes() { * @return {@code Stream} of {@link OntIndividual.Named Named Individual}s * @see #individuals() * @see OntClass#individuals() - * @since 1.4.0 */ default Stream namedIndividuals() { return ontEntities(OntIndividual.Named.class); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntNamedProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntNamedProperty.java index d53988797..81a980455 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntNamedProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntNamedProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -23,7 +23,6 @@ * Created by @ssz on 20.01.2019. * * @param

subtype of {@link OntNamedProperty} - * @since 1.4.0 */ public interface OntNamedProperty

> extends OntEntity, Property { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntObject.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntObject.java index 8b7a675dc..015b36cc3 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntObject.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntObject.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -159,7 +159,6 @@ public interface OntObject extends OntResource { * * @param predicate {@link Property} predicate, can be {@code null} for wildcard searching * @return {@code Stream} of {@link RDFNode RDF Node}s - * @since 1.4.2 */ Stream objects(Property predicate); @@ -202,7 +201,6 @@ public interface OntObject extends OntResource { * or {@code null} to select all literals * @return {@code Stream} of String's, i.e. literal lexical forms * @see #annotationValues(OntAnnotationProperty) - * @since 1.3.2 */ Stream annotationValues(OntAnnotationProperty predicate, String lang); @@ -261,7 +259,6 @@ default Stream types() { * @param predicate {@link OntAnnotationProperty}, not {@code null} * @return {@code Stream} of {@link RDFNode}s * @see #annotations() - * @since 1.3.2 */ default Stream annotationValues(OntAnnotationProperty predicate) { return annotations() @@ -299,7 +296,6 @@ default OntStatement addAnnotation(OntAnnotationProperty predicate, String txt, * @param value {@link RDFNode} - the value: uri-resource, literal or anonymous individual, not {@code null} * @return this object to allow cascading calls * @see OntObject#addAnnotation(OntAnnotationProperty, RDFNode) - * @since 1.4.2 */ default OntObject annotate(OntAnnotationProperty predicate, RDFNode value) { addAnnotation(predicate, value); @@ -313,7 +309,6 @@ default OntObject annotate(OntAnnotationProperty predicate, RDFNode value) { * @param txt String, the literal lexical form, cannot be {@code null} * @param lang String, the language tag, can be {@code null} * @return this object to allow cascading calls - * @since 1.4.2 */ default OntObject annotate(OntAnnotationProperty predicate, String txt, String lang) { return annotate(predicate, getModel().createLiteral(txt, lang)); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntObjectProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntObjectProperty.java index 8d986e2ae..4639885cf 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntObjectProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntObjectProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -43,7 +43,6 @@ public interface OntObjectProperty extends OntRealProperty { * * @return distinct {@code Stream} of object property expressions * @see #propertyChains() - * @since 1.4.0 */ @Override Stream superProperties(boolean direct); @@ -56,7 +55,6 @@ public interface OntObjectProperty extends OntRealProperty { * * @return distinct {@code Stream} of object property expressions * @see #propertyChains() - * @since 1.4.0 */ @Override Stream subProperties(boolean direct); @@ -67,7 +65,6 @@ public interface OntObjectProperty extends OntRealProperty { * on the predicate {@link OWL#propertyChainAxiom owl:propertyChainAxiom}. * * @return {@code Stream} of {@link OntList}s with generic-parameter {@code OntOPE} - * @since 1.3.0 */ Stream> propertyChains(); @@ -97,7 +94,6 @@ public interface OntObjectProperty extends OntRealProperty { * @see #addPropertyChain(Collection) * @see #propertyChains() * @see #findPropertyChain(RDFNode) - * @since 1.3.0 */ OntList createPropertyChain(Collection properties); @@ -109,7 +105,6 @@ public interface OntObjectProperty extends OntRealProperty { * @throws OntJenaException if in the whole graph there is no property chain with the specified []-list * @see #clearPropertyChains() * @see #createPropertyChain(Collection) - * @since 1.3.0 */ OntObjectProperty removePropertyChain(Resource list) throws OntJenaException; @@ -119,7 +114,6 @@ public interface OntObjectProperty extends OntRealProperty { * and {@code C} is one of the return class expressions. * * @return {@code Stream} of {@link OntClass}s - * @since 1.4.0 */ @Override default Stream ranges() { @@ -134,7 +128,6 @@ default Stream ranges() { * @see OntProperty#removeSuperProperty(Resource) * @see OntProperty#superProperties(boolean) * @see #propertyChains() - * @since 1.4.0 */ @Override default Stream superProperties() { @@ -147,7 +140,6 @@ default Stream superProperties() { * @return {@code Stream} of {@link OntObjectProperty}s * @see OntDataProperty#disjointProperties() * @see OntDisjoint.ObjectProperties - * @since 1.4.0 */ @Override default Stream disjointProperties() { @@ -160,7 +152,6 @@ default Stream disjointProperties() { * * @return {@code Stream} of {@link OntObjectProperty}s. * @see OntDataProperty#equivalentProperties() - * @since 1.4.0 */ @Override default Stream equivalentProperties() { @@ -173,7 +164,6 @@ default Stream equivalentProperties() { * * @return {@code Stream} of {@link OntObjectProperty}s (either {@link Inverse} or {@link Named}) * @see Named#createInverse() - * @since 1.4.0 */ default Stream inverseProperties() { return objects(OWL.inverseOf, OntObjectProperty.class); @@ -210,7 +200,6 @@ default Stream negativeAssertions(OntIn * @param list {@link RDFNode} * @return {@code Optional} around the {@link OntList ontology []-list} * with {@link OntObjectProperty object property expression}s as items - * @since 1.3.0 */ default Optional> findPropertyChain(RDFNode list) { try (Stream> res = propertyChains().filter(r -> Objects.equals(r, list))) { @@ -224,7 +213,6 @@ default Optional> findPropertyChain(RDFNode list) { * @return this instance to allow cascading calls * @see #removePropertyChain(Resource) * @see #createPropertyChain(Collection) - * @since 1.3.0 */ default OntObjectProperty clearPropertyChains() { propertyChains().collect(Collectors.toList()).forEach(this::removePropertyChain); @@ -241,7 +229,6 @@ default OntObjectProperty clearPropertyChains() { * @return distinct {@code Stream} of all sub-{@link OntObjectProperty object properties}, * possible empty in case of nil-list or if there is no property-chains at all * @see #propertyChains() - * @since 1.4.0 */ default Stream fromPropertyChain() { return propertyChains().flatMap(OntList::members).distinct(); @@ -257,7 +244,6 @@ default Stream fromPropertyChain() { * @return {@link OntStatement} to provide the ability to add annotations subsequently * @see #createPropertyChain(Collection) * @see #addPropertyChainAxiomStatement(Collection) - * @since 1.4.0 */ default OntStatement addPropertyChainAxiomStatement(OntObjectProperty... properties) { return addPropertyChainAxiomStatement(Arrays.asList(properties)); @@ -272,7 +258,6 @@ default OntStatement addPropertyChainAxiomStatement(OntObjectProperty... propert * @see #createPropertyChain(Collection) * @see #addPropertyChainAxiomStatement(OntObjectProperty...) * @see 2.3.1 Axioms that Generate a Main Triple - * @since 1.4.0 */ default OntStatement addPropertyChainAxiomStatement(Collection properties) { return createPropertyChain(properties).getMainStatement(); @@ -284,7 +269,6 @@ default OntStatement addPropertyChainAxiomStatement(Collectionthis instance to allow cascading calls * @see OntProperty#removeSuperProperty(Resource) - * @since 1.4.0 */ default OntObjectProperty addSuperProperty(OntObjectProperty property) { addSubPropertyOfStatement(property); @@ -479,7 +454,6 @@ default OntObjectProperty addEquivalentProperty(OntObjectProperty other) { * @see OntDataProperty#addDisjointProperty(OntDataProperty) * @see OntRealProperty#removeDisjointProperty(Resource) * @see OntDisjoint.ObjectProperties - * @since 1.4.0 */ default OntObjectProperty addDisjointProperty(OntObjectProperty other) { addPropertyDisjointWithStatement(other); @@ -493,7 +467,6 @@ default OntObjectProperty addDisjointProperty(OntObjectProperty other) { * @return this instance to allow cascading calls * @see #addInverseOfStatement(OntObjectProperty) * @see #removeInverseProperty(Resource) - * @since 1.4.0 */ default OntObjectProperty addInverseProperty(OntObjectProperty other) { addInverseOfStatement(other); @@ -508,7 +481,6 @@ default OntObjectProperty addInverseProperty(OntObjectProperty other) { * @return this instance to allow cascading calls * @see #addPropertyChainAxiomStatement(Collection) * @see #addPropertyChain(Collection) - * @since 1.4.0 */ default OntObjectProperty addPropertyChain(OntObjectProperty... properties) { return addPropertyChain(Arrays.asList(properties)); @@ -522,7 +494,6 @@ default OntObjectProperty addPropertyChain(OntObjectProperty... properties) { * @return this instance to allow cascading calls * @see #addPropertyChainAxiomStatement(Collection) * @see #addPropertyChain(OntObjectProperty...) - * @since 1.4.0 */ default OntObjectProperty addPropertyChain(Collection properties) { createPropertyChain(properties); @@ -583,7 +554,6 @@ default OntObjectProperty removeRange(Resource range) { * @param other {@link OntObjectProperty} or {@code null} to remove all {@code owl:inverseOf} statements * @return this instance to allow cascading calls * @see #addInverseProperty(OntObjectProperty) - * @since 1.4.0 */ default OntObjectProperty removeInverseProperty(Resource other) { remove(OWL.inverseOf, other); @@ -722,7 +692,6 @@ default OntObjectProperty setIrreflexive(boolean irreflexive) { * @return {@code Optional} of {@link OntObjectProperty} * @see #inverseProperties() * @see Inverse#getDirect() - * @since 1.4.0 */ default Optional findInverseProperty() { try (Stream res = inverseProperties()) { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntProperty.java index 45cc7c55f..e54b12df7 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -57,7 +57,6 @@ public interface OntProperty extends OntObject { * @return distinct {@code Stream} of properties with the same type as this property * @see #superProperties() * @see #subProperties(boolean) - * @since 1.4.0 */ Stream superProperties(boolean direct); @@ -83,7 +82,6 @@ public interface OntProperty extends OntObject { * to reach that child under the super-property relation * @return distinct {@code Stream} of properties with the same type as this property * @see #superProperties(boolean) - * @since 1.4.0 */ Stream subProperties(boolean direct); @@ -95,7 +93,6 @@ public interface OntProperty extends OntObject { * @return {@code Stream} of {@link Resource jena resource}s * @see OntAnnotationProperty#superProperties() * @see OntRealProperty#superProperties() - * @since 1.4.0 */ Stream superProperties(); @@ -106,7 +103,6 @@ public interface OntProperty extends OntObject { * @see OntAnnotationProperty#domains() * @see OntObjectProperty#domains() * @see OntDataProperty#domains() - * @since 1.4.0 */ Stream domains(); @@ -116,7 +112,6 @@ public interface OntProperty extends OntObject { * @return {@code Stream} of {@link Resource}s * @see OntAnnotationProperty#ranges() * @see OntRealProperty#ranges() - * @since 1.4.0 */ Stream ranges(); @@ -157,7 +152,6 @@ public interface OntProperty extends OntObject { * * @param property {@link Resource} or {@code null} to remove all direct super properties * @return this instance to allow cascading calls - * @since 1.4.0 */ OntProperty removeSuperProperty(Resource property); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntRealProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntRealProperty.java index be8d03551..201a4d839 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntRealProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntRealProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -26,8 +26,6 @@ * In OWL2 terms it is any {@link OntProperty Property Expression} minus {@link OntAnnotationProperty Annotation Property}. *

* Created by @szuev on 21.07.2018. - * - * @since 1.3.0 */ public interface OntRealProperty extends OntProperty { @@ -50,7 +48,6 @@ public interface OntRealProperty extends OntProperty { * i.e. all objects from statements with this property as subject and {@code rdfs:range} as predicate. * * @return {@code Stream} of {@link OntObject ontology object}s - * @since 1.4.0 */ Stream ranges(); @@ -60,7 +57,6 @@ public interface OntRealProperty extends OntProperty { * where {@code P} is this property. * * @return {@code Stream} of {@link OntRealProperty}s - object or data properties - * @since 1.4.0 */ Stream superProperties(); @@ -71,7 +67,6 @@ public interface OntRealProperty extends OntProperty { * * @return {@code Stream} of {@link OntRealProperty}s - object or data properties * @see OntDisjoint.Properties - * @since 1.4.0 */ Stream disjointProperties(); @@ -81,7 +76,6 @@ public interface OntRealProperty extends OntProperty { * where {@code P} is this property and {@code R} is a returned property of the same type. * * @return {@code Stream} of {@link OntRealProperty}s - object or data properties - * @since 1.4.0 */ Stream equivalentProperties(); @@ -145,7 +139,6 @@ public interface OntRealProperty extends OntProperty { * * @param property {@link Resource} or {@code null} to remove all equivalent properties * @return this instance to allow cascading calls - * @since 1.4.0 */ OntRealProperty removeEquivalentProperty(Resource property); @@ -160,7 +153,6 @@ public interface OntRealProperty extends OntProperty { * @param property {@link Resource} or {@code null} to remove all disjoint properties * @return this instance to allow cascading calls * @see OntDisjoint.Properties - * @since 1.4.0 */ OntRealProperty removeDisjointProperty(Resource property); @@ -170,7 +162,6 @@ public interface OntRealProperty extends OntProperty { * where {@code P} is this property expression. * * @return {@code Stream} of {@link OntClass class expression}s - * @since 1.4.0 */ @Override default Stream domains() { @@ -183,7 +174,6 @@ default Stream domains() { * * @return {@link OntStatement} to allow the subsequent addition of annotations * @see #setFunctional(boolean) - * @since 1.4.0 */ default OntStatement addFunctionalDeclaration() { return addStatement(RDF.type, OWL.FunctionalProperty); @@ -196,7 +186,6 @@ default OntStatement addFunctionalDeclaration() { * @param ce {@link OntClass class expression}, not null * @return {@link OntStatement} to allow the subsequent addition of annotations * @see #addDomain(OntClass) - * @since 1.4.0 */ default OntStatement addDomainStatement(OntClass ce) { return addStatement(RDFS.domain, ce); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntResource.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntResource.java index 35c029e4f..ba62adc90 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntResource.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntResource.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -26,8 +26,6 @@ * but for {@link OntModel OWL2 Ontology RDF Graph Model}. *

* Created by @szuev on 24.07.2018. - * - * @since 1.3.0 */ interface OntResource extends Resource { @@ -92,7 +90,6 @@ interface OntResource extends Resource { * @return an instance of the type {@link X} or {@code null} * @see RDFNode#as(Class) * @see RDFNode#canAs(Class) - * @since 1.4.2 */ default X getAs(Class type) { return canAs(type) ? as(type) : null; diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntSWRL.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntSWRL.java index 7679ee326..c945738a2 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntSWRL.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntSWRL.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -42,7 +42,6 @@ interface Imp extends OntSWRL { * each of its items has the type {@link com.github.owlcs.ontapi.jena.vocabulary.SWRL#AtomList swrl:AtomList}. * * @return {@link OntList} of {@link Atom} - * @since 1.3.0 */ OntList getHeadList(); @@ -52,7 +51,6 @@ interface Imp extends OntSWRL { * each of its items has the type {@link com.github.owlcs.ontapi.jena.vocabulary.SWRL#AtomList swrl:AtomList}. * * @return {@link OntList} of {@link Atom} - * @since 1.3.0 */ OntList getBodyList(); @@ -68,8 +66,6 @@ default Stream body() { /** * Represents {@link com.github.owlcs.ontapi.jena.vocabulary.SWRL#Builtin} entity. * Must be an URI {@link Resource}. - * - * @since 1.4.0 */ interface Builtin extends OntSWRL { } @@ -135,7 +131,6 @@ interface WithBuiltin extends Atom { * or {@code _:x rdf:type swrl:AtomList} statements for each its items. * * @return {@link OntList} of {@link DArg}s - * @since 1.3.0 */ OntList getArgList(); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/OntStatement.java b/src/main/java/com/github/owlcs/ontapi/jena/model/OntStatement.java index 6b0c5b076..f06acad2c 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/OntStatement.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/OntStatement.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -144,7 +144,6 @@ default boolean isLocal() { * * @return {@link List} of {@link OntAnnotation Ontology Annotation}s * @see #annotationResources() - * @since 1.3.0 */ default List getAnnotationList() { return annotationResources().sorted(Models.RDF_NODE_COMPARATOR).collect(Collectors.toList()); @@ -288,7 +287,6 @@ default OntStatement addAnnotation(OntAnnotationProperty predicate, String text, * @see OntStatement#addAnnotation(OntAnnotationProperty, String) * @see OntModel#getRDFSComment() * @see OntModel#getRDFSLabel() - * @since 1.4.0 */ default OntStatement annotate(OntAnnotationProperty property, String text) { return annotate(property, text, null); @@ -304,7 +302,6 @@ default OntStatement annotate(OntAnnotationProperty property, String text) { * @see OntStatement#addAnnotation(OntAnnotationProperty, String, String) * @see OntModel#getRDFSComment() * @see OntModel#getRDFSLabel() - * @since 1.4.0 */ default OntStatement annotate(OntAnnotationProperty property, String text, String lang) { return annotate(property, getModel().createLiteral(text, lang)); @@ -320,7 +317,6 @@ default OntStatement annotate(OntAnnotationProperty property, String text, Strin * @see OntStatement#addAnnotation(OntAnnotationProperty, RDFNode) * @see OntModel#getRDFSComment() * @see OntModel#getRDFSLabel() - * @since 1.4.0 */ default OntStatement annotate(OntAnnotationProperty property, RDFNode value) { addAnnotation(property, value); @@ -336,7 +332,6 @@ default OntStatement annotate(OntAnnotationProperty property, RDFNode value) { * @throws org.apache.jena.enhanced.UnsupportedPolymorphismException if the subject node * and the given type are incompatible * @see #getSubject() - * @since 1.3.0 */ default S getSubject(Class type) { return getSubject().as(type); @@ -351,7 +346,6 @@ default S getSubject(Class type) { * @throws org.apache.jena.enhanced.UnsupportedPolymorphismException if the object node * and the given type are incompatible * @see #getObject() - * @since 1.4.0 */ default O getObject(Class type) { return getObject().as(type); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/RDFNodeList.java b/src/main/java/com/github/owlcs/ontapi/jena/model/RDFNodeList.java index cf5ebc2db..6b711d4f7 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/RDFNodeList.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/RDFNodeList.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -28,7 +28,6 @@ * * @param the type of element-nodes in this []-list * @see RDFList - * @since 1.4.0 */ public interface RDFNodeList extends Resource { @@ -83,7 +82,6 @@ default long size() { * * @return boolean * @see #isEmpty() - * @since 1.4.0 */ default boolean isNil() { return as(RDFList.class).isEmpty(); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/SetCardinality.java b/src/main/java/com/github/owlcs/ontapi/jena/model/SetCardinality.java index 44a203ad7..89c899b34 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/SetCardinality.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/SetCardinality.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -21,7 +21,6 @@ * * @param - return type, a subtype of {@link OntClass.CardinalityRestrictionCE} * @see HasCardinality - * @since 1.4.0 */ interface SetCardinality> { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/SetComponents.java b/src/main/java/com/github/owlcs/ontapi/jena/model/SetComponents.java index 51493d93b..abeefe666 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/SetComponents.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/SetComponents.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -14,8 +14,8 @@ package com.github.owlcs.ontapi.jena.model; -import org.apache.jena.rdf.model.RDFNode; import com.github.owlcs.ontapi.jena.OntJenaException; +import org.apache.jena.rdf.model.RDFNode; import java.util.Arrays; import java.util.Collection; @@ -29,7 +29,6 @@ * @param - {@link OntObject}, a return type * @see WithOntList * @see HasRDFNodeList - * @since 1.4.0 */ interface SetComponents extends WithOntList { @@ -38,7 +37,6 @@ interface SetComponents extends WithOntL * * @param values an {@code Array} of the type {@link V} * @return this instance to allow cascading calls - * @since 1.4.0 */ @SuppressWarnings("unchecked") default R setComponents(V... values) { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperties.java b/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperties.java index c30cbd947..b2a663836 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperties.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperties.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -24,7 +24,6 @@ * @param

- any subtype of {@link OntRealProperty} in general case, but in the current model it can only be {@link OntDataProperty} * @param - return type, a subtype of {@link OntClass.NaryRestrictionCE} * @see HasProperties - * @since 1.4.0 */ interface SetProperties

> extends SetComponents, SetProperty { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperty.java b/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperty.java index 5e8044044..d026fb4cd 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperty.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/SetProperty.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -23,7 +23,6 @@ * @param

{@link OntRealProperty data or object} property expression * @param - return type, a subtype of {@link OntClass.RestrictionCE} * @see HasProperty - * @since 1.4.0 */ interface SetProperty

> { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/SetValue.java b/src/main/java/com/github/owlcs/ontapi/jena/model/SetValue.java index c1edcc531..09d7d0f06 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/SetValue.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/SetValue.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -29,7 +29,6 @@ * or {@link org.apache.jena.rdf.model.Literal}). * @param - return type, a subtype of {@link OntClass} or {@link OntDataRange} * @see HasValue - * @since 1.4.0 */ interface SetValue { /** diff --git a/src/main/java/com/github/owlcs/ontapi/jena/model/WithOntList.java b/src/main/java/com/github/owlcs/ontapi/jena/model/WithOntList.java index a186173e5..b38581263 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/model/WithOntList.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/model/WithOntList.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -24,7 +24,6 @@ * @param any {@link RDFNode} - a type for list's item * @see HasRDFNodeList * @see SetComponents - * @since 1.4.0 */ interface WithOntList extends HasRDFNodeList { /** diff --git a/src/main/java/com/github/owlcs/ontapi/jena/utils/Graphs.java b/src/main/java/com/github/owlcs/ontapi/jena/utils/Graphs.java index ee2575a91..7a14624d4 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/utils/Graphs.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/utils/Graphs.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -132,7 +132,6 @@ public static Graph getBase(Graph graph) { * and has a recursion in its hierarchy * @see UnionGraph#listBaseGraphs() * @see OntModels#importsClosure(OntModel) - * @since 1.4.2 */ public static Stream baseGraphs(Graph graph) { if (graph == null) return Stream.empty(); @@ -162,7 +161,6 @@ public static boolean isSameBase(Graph left, Graph right) { * @return boolean if {@code graph} is distinct * @see Spliterator#DISTINCT * @see UnionGraph#isDistinct() - * @since 1.4.2 */ public static boolean isDistinct(Graph graph) { if (graph instanceof GraphMem) { @@ -185,7 +183,6 @@ public static boolean isDistinct(Graph graph) { * @return boolean if {@code graph} is sized * @see Spliterator#SIZED * @see Graphs#size(Graph) - * @since 1.4.2 */ public static boolean isSized(Graph graph) { if (graph instanceof GraphMem) { @@ -204,7 +201,6 @@ public static boolean isSized(Graph graph) { * @param graph {@link Graph}, not {@code null} * @return long * @see Graphs#isSized(Graph) - * @since 1.4.2 */ public static long size(Graph graph) { if (graph instanceof GraphMem) { @@ -230,7 +226,6 @@ public static long size(Graph graph) { * @param g {@link Graph} * @return {@link UnionGraph} * @throws StackOverflowError in case there is a loop in imports (i.e. a recursion in the hierarchy) - * @since 1.0.1 */ public static UnionGraph toUnion(Graph g) { if (g instanceof UnionGraph) return (UnionGraph) g; @@ -242,19 +237,18 @@ public static UnionGraph toUnion(Graph g) { * Builds an union-graph using the specified components. * Note: this is a recursive method. * - * @param graph {@link Graph} the base graph (root) - * @param dependent a {@code Collection} of dependent {@link Graph graph}x to search in + * @param graph {@link Graph} the base graph (root) + * @param repository a {@code Collection} of {@link Graph graph}s to search in for missed dependencies * @return {@link UnionGraph} - * @since 1.0.1 */ - public static UnionGraph toUnion(Graph graph, Collection dependent) { + public static UnionGraph toUnion(Graph graph, Collection repository) { Graph base = getBase(graph); Set imports = getImports(base); UnionGraph res = new UnionGraph(base); - dependent.stream() + repository.stream() .filter(x -> !isSameBase(base, x)) .filter(g -> imports.contains(getURI(g))) - .forEach(g -> res.addGraph(toUnion(g, dependent))); + .forEach(g -> res.addGraph(toUnion(g, repository))); return res; } @@ -265,7 +259,6 @@ public static UnionGraph toUnion(Graph graph, Collection dependent) { * @param base {@link Graph} new base, not {@code null} * @param union {@link UnionGraph} to inherit settings and hierarchy, not {@code null} * @return {@link UnionGraph} - * @since 1.4.0 */ public static UnionGraph withBase(Graph base, UnionGraph union) { return new UnionGraph(base, union.getUnderlying(), union.getEventManager(), union.isDistinct()); @@ -358,7 +351,6 @@ public static Set getImports(Graph graph) { * @param graph {@link Graph}, not {@code null} * @return {@link ExtendedIterator} of {@code String}-URIs * @see Graphs#getURI(Graph) - * @since 1.4.2 */ public static ExtendedIterator listImports(Graph graph) { return graph.find(Node.ANY, OWL.imports.asNode(), Node.ANY).mapWith(t -> { @@ -509,7 +501,6 @@ public static Graph asNonConcurrent(Graph graph) { * @param left {@link Graph} * @param right {@link Graph} * @return {@code true} if the left argument graph is dependent on the right - * @since 1.4.0 */ public static boolean dependsOn(Graph left, Graph right) { return left == right || (left != null && left.dependsOn(right)); @@ -534,7 +525,6 @@ public static Node createNode(String iri) { * @throws OutOfMemoryError while iterating in case the graph is too large * so that all its subjects can be placed in memory as a {@code Set} * @see GraphUtil#listSubjects(Graph, Node, Node) - * @since 1.4.2 */ public static ExtendedIterator listSubjects(Graph g) { return Iter.create(() -> Collections.unmodifiableSet(g.find().mapWith(Triple::getSubject).toSet()).iterator()); @@ -549,7 +539,6 @@ public static ExtendedIterator listSubjects(Graph g) { * @throws OutOfMemoryError while iterating in case the graph is too large * so that all its subjects and objects can be placed in memory as a {@code Set} * @see GraphUtils#allNodes(Graph) - * @since 1.4.2 */ public static ExtendedIterator listSubjectsAndObjects(Graph g) { return Iter.create(() -> Collections.unmodifiableSet(Iter.flatMap(g.find(), @@ -563,7 +552,6 @@ public static ExtendedIterator listSubjectsAndObjects(Graph g) { * @param g {@link Graph}, not {@code null} * @return an {@link ExtendedIterator ExtendedIterator} (distinct) of all nodes in the graph * @throws OutOfMemoryError while iterating in case the graph is too large to be placed in memory as a {@code Set} - * @since 1.4.2 */ public static ExtendedIterator listAllNodes(Graph g) { return Iter.create(() -> Collections.unmodifiableSet(Iter.flatMap(g.find(), diff --git a/src/main/java/com/github/owlcs/ontapi/jena/utils/Iter.java b/src/main/java/com/github/owlcs/ontapi/jena/utils/Iter.java index 7581a1ca7..55fdd9149 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/utils/Iter.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/utils/Iter.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -76,7 +76,6 @@ public static Stream asStream(Iterator iterator) { * @param characteristics {@code int}, characteristics of the {@code Spliterator}'s source * @param the type of iterator-items * @return a non-parallel {@code Stream}, that wraps the {@code iterator} with the given characteristics - * @since 1.4.2 */ public static Stream asStream(Iterator iterator, int characteristics) { return asStream(iterator, -1, characteristics); @@ -94,7 +93,6 @@ public static Stream asStream(Iterator iterator, int charact * @param characteristics {@code int}, characteristics of the {@code Spliterator}'s source * @param the type of iterator-items * @return a non-parallel {@code Stream}, that wraps the {@code iterator} with the given parameters - * @since 1.4.2 */ public static Stream asStream(Iterator iterator, long size, int characteristics) { Stream res = StreamSupport.stream(asSpliterator(iterator, size, characteristics), false); @@ -112,7 +110,6 @@ public static Stream asStream(Iterator iterator, long size, * @param the type of iterator-items * @return {@link Spliterator} * @throws NullPointerException if the given iterator is {@code null} - * @since 1.4.2 */ @SuppressWarnings("WeakerAccess") public static Spliterator asSpliterator(Iterator iterator, long size, int characteristics) { @@ -130,7 +127,6 @@ public static Spliterator asSpliterator(Iterator iterator, l * @param the type of items * @return distinct sequential {@code Stream} * @see Iter#create(Supplier) - * @since 1.4.2 */ public static Stream fromSet(Supplier> getAsSet) { int chs = Spliterator.NONNULL | Spliterator.DISTINCT | Spliterator.IMMUTABLE; @@ -229,7 +225,6 @@ public static ExtendedIterator concat(ExtendedIterator a, Ex * @param the type of iterator elements * @return all input elements as a single {@link ExtendedIterator} of type {@link X} * @see Iter#concat(ExtendedIterator, ExtendedIterator) - * @since 1.4.0 */ @SafeVarargs public static ExtendedIterator concat(ExtendedIterator... iterators) { @@ -321,7 +316,6 @@ public static boolean anyMatch(Iterator iterator, Predicate pr * or the iterator is empty, otherwise {@code false} * @see Iter#anyMatch(Iterator, Predicate) * @see Iter#noneMatch(Iterator, Predicate) - * @since 1.4.2 */ public static boolean allMatch(Iterator iterator, Predicate predicate) { if (iterator instanceof NullIterator) return true; @@ -346,7 +340,6 @@ public static boolean allMatch(Iterator iterator, Predicate pr * or the iterator is empty, otherwise {@code false} * @see Iter#anyMatch(Iterator, Predicate) * @see Iter#allMatch(Iterator, Predicate) - * @since 1.4.2 */ public static boolean noneMatch(Iterator iterator, Predicate predicate) { return allMatch(iterator, predicate.negate()); @@ -379,7 +372,6 @@ public static Optional findFirst(Iterator iterator) { * * @param iterator {@link Iterator}, not {@code null} * @return long, the count of elements in the given {@code iterator} - * @since 1.4.2 */ public static long count(Iterator iterator) { long res = 0; @@ -400,7 +392,6 @@ public static long count(Iterator iterator) { * @param iterator the {@code Iterator} with elements of type {@link X} * @param collection the collection of type {@link C} * @return {@link C}, the same instance as specified - * @since 2.0.0 */ public static > C addAll(Iterator iterator, C collection) { iterator.forEachRemaining(collection::add); @@ -427,7 +418,6 @@ public static > C addAll(Iterator iterat * and whose values are the result of applying a value mapping function to all input elements * equal to the key and combining them using the merge function * @see Collectors#toMap(Function, Function, BinaryOperator, Supplier) - * @since 1.4.0 */ public static > M toMap(Iterator iterator, Function keyMapper, @@ -448,7 +438,6 @@ public static > M toMap(Iterator iterator, * Closes iterator if it is {@link ClosableIterator CloseableIterator}. * * @param iterator {@link Iterator} - * @since 1.4.2 */ public static void close(Iterator iterator) { if (iterator instanceof ClosableIterator) { @@ -473,7 +462,6 @@ public static ExtendedIterator of(X... members) { * * @param the element type of the new iterator * @return a fresh {@link ExtendedIterator} instance - * @since 2.0.0 */ public static ExtendedIterator of() { return NullIterator.instance(); @@ -485,7 +473,6 @@ public static ExtendedIterator of() { * @param item - an object of type {@link X} * @param the element type of the new iterator * @return a fresh {@link ExtendedIterator} instance - * @since 2.0.0 */ public static ExtendedIterator of(X item) { return new SingletonIterator<>(item); @@ -510,7 +497,6 @@ public static ExtendedIterator create(Collection members) { * @param iterator {@link Iterator}, not {@code null} * @param the element type of the iterator * @return {@link ExtendedIterator} instance - * @since 1.4.2 */ @SuppressWarnings("unchecked") public static ExtendedIterator create(Iterator iterator) { @@ -537,7 +523,6 @@ public static ExtendedIterator create(Iterator iterator) { * @param provider {@link Supplier} deriving nonnull {@link Iterator}, cannot be {@code null} * @param the element type of the new iterator * @return a fresh {@link ExtendedIterator} instance wrapping a feature iterator - * @since 1.4.2 */ public static ExtendedIterator create(Supplier> provider) { Objects.requireNonNull(provider); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/utils/Models.java b/src/main/java/com/github/owlcs/ontapi/jena/utils/Models.java index bb038a39a..5779905a9 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/utils/Models.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/utils/Models.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -97,11 +97,10 @@ public static boolean isInList(Model model, Resource candidate) { } /** - * Answers {@code true} if the given statement belongs to some []-list. + * Answers {@code true} iff the given statement belongs to some []-list. * - * @param s {@link Statement}, not null + * @param s {@link Statement}, not {@code null} * @return boolean - * @since 1.3.0 */ public static boolean isInList(Statement s) { return RDF.first.equals(s.getPredicate()) || RDF.rest.equals(s.getPredicate()) || RDF.nil.equals(s.getObject()); @@ -111,8 +110,7 @@ public static boolean isInList(Statement s) { * Answers a set of all of the RDF statements whose subject is one of the cells of the given list. * * @param list []-list, not {@code null} - * @return Set of {@link Statement}s - * @since 1.4.0 + * @return a {@code Set} of {@link Statement}s */ public static Set getListStatements(RDFList list) { return ((RDFListImpl) list).collectStatements(); @@ -123,7 +121,7 @@ public static Set getListStatements(RDFList list) { * * @param mapping {@link PrefixMapping Prefix Mapping} to modify * @param prefixes java Map of new prefixes to set - * @return java Map of previously associated prefixes + * @return a {@code Map} of previously associated prefixes */ public static Map setNsPrefixes(PrefixMapping mapping, Map prefixes) { Map init = mapping.getNsPrefixMap(); @@ -140,7 +138,6 @@ public static Map setNsPrefixes(PrefixMapping mapping, Map langValues(Resource subject, Property predicate, String lang) { return Iter.asStream(subject.listProperties(predicate) @@ -162,7 +159,6 @@ public static Stream langValues(Resource subject, Property predicate, St * @param literal {@link Literal}, not {@code null} * @param tag String, possible {@code null} * @return {@code true} if the given literal has the given tag - * @since 1.4.1 */ public static boolean filterByLangTag(Literal literal, String tag) { String other = literal.getLanguage(); @@ -175,7 +171,6 @@ public static boolean filterByLangTag(Literal literal, String tag) { * Recursively deletes all resource children. * * @param inModel Resource from a model - * @since 1.3.0 */ public static void deleteAll(Resource inModel) { deleteAll(inModel, new HashSet<>()); @@ -313,10 +308,9 @@ public static Stream subjects(RDFNode object) { /** * Returns a string representation of the given Jena statement taking into account PrefixMapping. * - * @param st {@link Statement}, not null - * @param pm {@link PrefixMapping}, not null - * @return String - * @since 1.3.0 + * @param st {@link Statement}, not {@code null} + * @param pm {@link PrefixMapping}, not {@code null} + * @return {@code String} */ public static String toString(Statement st, PrefixMapping pm) { return String.format("[%s, %s, %s]", @@ -328,9 +322,8 @@ public static String toString(Statement st, PrefixMapping pm) { /** * Returns a string representation of the given Jena statement. * - * @param inModel {@link Statement}, not null + * @param inModel {@link Statement}, not {@code null} * @return {@code String} - * @since 1.3.0 */ public static String toString(Statement inModel) { return toString(inModel, inModel.getModel()); diff --git a/src/main/java/com/github/owlcs/ontapi/jena/utils/OntModels.java b/src/main/java/com/github/owlcs/ontapi/jena/utils/OntModels.java index aa9c24a00..03a5e3137 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/utils/OntModels.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/utils/OntModels.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -38,8 +38,6 @@ * {@link OntStatement Ontology Statement}. *

* Created by @szz on 11.06.2019. - * - * @since 1.4.2 */ public class OntModels { diff --git a/src/main/java/com/github/owlcs/ontapi/jena/vocabulary/SWRLB.java b/src/main/java/com/github/owlcs/ontapi/jena/vocabulary/SWRLB.java index df7be600d..206512675 100644 --- a/src/main/java/com/github/owlcs/ontapi/jena/vocabulary/SWRLB.java +++ b/src/main/java/com/github/owlcs/ontapi/jena/vocabulary/SWRLB.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -24,7 +24,6 @@ * @see 8. Built-Ins * @see org.semanticweb.owlapi.vocab.SWRLBuiltInsVocabulary * @see SWRL - * @since 1.4.0 */ public class SWRLB { public final static String URI = "http://www.w3.org/2003/11/swrlb"; diff --git a/src/test/java/com/github/owlcs/ontapi/tests/jena/PersonalityTest.java b/src/test/java/com/github/owlcs/ontapi/tests/jena/PersonalityTest.java index a17dac8f8..7311e1565 100644 --- a/src/test/java/com/github/owlcs/ontapi/tests/jena/PersonalityTest.java +++ b/src/test/java/com/github/owlcs/ontapi/tests/jena/PersonalityTest.java @@ -1,7 +1,7 @@ /* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. - * Copyright (c) 2019, The University of Manchester, owl.cs group. + * Copyright (c) 2020, The University of Manchester, owl.cs group. * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -141,7 +141,7 @@ private Set expand(Class type, Resource... additional } }; OntPersonality p2 = PersonalityBuilder.from(OntModelConfig.ONT_PERSONALITY_STRICT).setPunnings(punnings).build(); - OntEntity.entityTypes().forEach(t -> Assert.assertEquals(2, p2.getPunnings().get(t).size())); + OntEntity.listEntityTypes().forEachRemaining(t -> Assert.assertEquals(2, p2.getPunnings().get(t).size())); OntModel m2 = OntModelFactory.createModel(m1.getGraph(), p2); Assert.assertEquals(1, m2.individuals().peek(x -> LOGGER.debug("2)Individuals: {}", x)).count());