diff --git a/elk-ore-parent/elk-ore/src/main/java/org/semanticweb/elk/ore/OreTaxonomyPrinter.java b/elk-ore-parent/elk-ore/src/main/java/org/semanticweb/elk/ore/OreTaxonomyPrinter.java index 3aa4c1eed..40772944e 100644 --- a/elk-ore-parent/elk-ore/src/main/java/org/semanticweb/elk/ore/OreTaxonomyPrinter.java +++ b/elk-ore-parent/elk-ore/src/main/java/org/semanticweb/elk/ore/OreTaxonomyPrinter.java @@ -158,9 +158,13 @@ protected static void processTaxomomy(Taxonomy classTaxonomy, * Prints class declarations * * @param classTaxonomy + * the class taxonomy from which to take the printed classes * @param objectFactory + * {@link ElkObject.Factory} to create the declaration axioms * @param writer + * the writer to print to * @throws IOException + * if an I/O error occurs */ protected static void printDeclarations(Taxonomy classTaxonomy, ElkObject.Factory objectFactory, Appendable writer) diff --git a/elk-owl-parent/elk-owl-model/src/main/java/org/semanticweb/elk/owl/iris/ElkAbbreviatedIri.java b/elk-owl-parent/elk-owl-model/src/main/java/org/semanticweb/elk/owl/iris/ElkAbbreviatedIri.java index af3aecd30..8b01d58ff 100644 --- a/elk-owl-parent/elk-owl-model/src/main/java/org/semanticweb/elk/owl/iris/ElkAbbreviatedIri.java +++ b/elk-owl-parent/elk-owl-model/src/main/java/org/semanticweb/elk/owl/iris/ElkAbbreviatedIri.java @@ -67,7 +67,11 @@ public int compareTo(ElkIri arg) { } /** - * Returns (a+b).hashCode() without actually concatenating the strings. + * @param a + * fist string to be concatenated + * @param b + * second string to be concatenated + * @return (a+b).hashCode() without actually concatenating the strings. */ protected static int concatHashCode(String a, String b) { int hash = a.hashCode(); diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/Reasoner.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/Reasoner.java index 39756481e..4964f6cb1 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/Reasoner.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/Reasoner.java @@ -104,6 +104,16 @@ public class Reasoner extends AbstractReasonerState { /** * Constructor. In most cases, Reasoners should be created by the * {@link ReasonerFactory}. + * + * @param elkFactory + * the factory used to create new {@link ElkObject}s + * @param interrupter + * the object that notifies and propagates the information about + * interruption + * @param stageExecutor + * the executor for various stages of the reasoner + * @param config + * the reasoner configuration */ protected Reasoner(ElkObject.Factory elkFactory, final ReasonerInterrupter interrupter, @@ -252,6 +262,8 @@ public synchronized boolean shutdown() throws InterruptedException { * an {@link ElkClass} for which to find a {@link TaxonomyNode} * @return the {@link TaxonomyNode} for the given {@link ElkClass} * + * @throws ElkException + * if the result cannot be computed */ protected IncompleteResult> getTaxonomyNode( ElkClass elkClass) throws ElkException { @@ -273,6 +285,8 @@ protected IncompleteResult> getTaxonomyNode( * Helper method to get an {@link InstanceNode} from the taxonomy. * * @param elkNamedIndividual + * a {@link ElkNamedIndividual} for which to find an + * {@link InstanceNode} * @return the {@link InstanceNode} for the given {@link ElkNamedIndividual} * @throws ElkException * if the result cannot be computed @@ -297,6 +311,7 @@ protected IncompleteResult> * Helper method to get a {@link TypeNode} from the taxonomy. * * @param elkClass + * an {@link ElkClass} for which to find a {@link TypeNode} * @return the {@link TypeNode} for the given {@link ElkClass} * @throws ElkException * if the result cannot be computed @@ -325,6 +340,8 @@ protected IncompleteResult> get * {@link TaxonomyNode} * @return the {@link TaxonomyNode} for the given {@link ElkObjectProperty} * + * @throws ElkException + * if the result cannot be computed */ protected IncompleteResult> getObjectPropertyTaxonomyNode( final ElkObjectProperty elkProperty) throws ElkException { diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/entailments/DefaultEntailmentInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/entailments/DefaultEntailmentInferenceVisitor.java index 238187e73..f66f8b093 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/entailments/DefaultEntailmentInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/entailments/DefaultEntailmentInferenceVisitor.java @@ -45,7 +45,10 @@ public class DefaultEntailmentInferenceVisitor /** * NO-OP default visitor - * @param entailmentInference + * + * @param entailmentInference + * the visited {@link EntailmentInference} + * @return the visitor output ({@code null} by default) */ protected O defaultVisit(final EntailmentInference entailmentInference) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/query/ElkQueryAxiomIndexingVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/query/ElkQueryAxiomIndexingVisitor.java index ebca12928..cdd873dfd 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/query/ElkQueryAxiomIndexingVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/query/ElkQueryAxiomIndexingVisitor.java @@ -78,7 +78,9 @@ public class ElkQueryAxiomIndexingVisitor implements ElkAxiomVisitor { /** - * @param axiom + * @param axiom + * the visited {@link ElkAxiom} + * @return the output of the visitor ({@code null} by default) */ protected O defaultVisit(ElkAxiom axiom) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DerivedClassConclusionDummyVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DerivedClassConclusionDummyVisitor.java index 5d8b4bceb..4608ac3d3 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DerivedClassConclusionDummyVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DerivedClassConclusionDummyVisitor.java @@ -44,6 +44,7 @@ public class DerivedClassConclusionDummyVisitor * The default visitor method for conclusions explaining a subsumption * * @param conclusion + * the visited {@link ClassConclusion} * @return {@code true} if other conclusions should be visited and * {@code false} otherwise * diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyClassConclusionVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyClassConclusionVisitor.java index 2c3d5dfc7..d7e71f4a5 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyClassConclusionVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyClassConclusionVisitor.java @@ -51,7 +51,8 @@ public class DummyClassConclusionVisitor * The default implementation of all methods * * @param conclusion - * @return + * the visited {@link ClassConclusion} + * @return the output of the visitor */ protected O defaultVisit(ClassConclusion conclusion) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyObjectPropertyConclusionVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyObjectPropertyConclusionVisitor.java index 0349f0ed3..4a54c56bb 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyObjectPropertyConclusionVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummyObjectPropertyConclusionVisitor.java @@ -48,7 +48,8 @@ public class DummyObjectPropertyConclusionVisitor * The default implementation of all methods * * @param conclusion - * @return + * the visited {@link ObjectPropertyConclusion} + * @return the output of the visitor */ protected O defaultVisit(ObjectPropertyConclusion conclusion) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummySubClassConclusionVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummySubClassConclusionVisitor.java index fab9692c5..b4596b9d4 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummySubClassConclusionVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/conclusions/classes/DummySubClassConclusionVisitor.java @@ -45,7 +45,9 @@ public class DummySubClassConclusionVisitor * The default implementation of all methods * * @param subConclusion - * @return + * the visited {@link SubClassConclusion} + * + * @return the output of the visitor */ protected O defaultVisit(SubClassConclusion subConclusion) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java index ab11a5d14..28ffb8601 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java @@ -45,7 +45,8 @@ public class DummyClassInferenceVisitor /** * @param inference - * @return {@code null} by default; should be overridden in sub-classes + * the visited {@link ClassInference} + * @return the output of the visitor ({@code null} by default) */ protected O defaultVisit(ClassInference inference) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/properties/inferences/DummyObjectPropertyInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/properties/inferences/DummyObjectPropertyInferenceVisitor.java index eccda4c65..4e8ff18d9 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/properties/inferences/DummyObjectPropertyInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/properties/inferences/DummyObjectPropertyInferenceVisitor.java @@ -45,7 +45,8 @@ public class DummyObjectPropertyInferenceVisitor * The default implementation of all methods * * @param inference - * @return + * the visited {@link ObjectPropertyInference} + * @return the output of the visitor */ protected O defaultTracedVisit(ObjectPropertyInference inference) { return null; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java index 90f3ecad4..12ecc1538 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java @@ -88,11 +88,18 @@ public class DummyRuleVisitor implements RuleVisitor { /** * The default implementation of all methods * + * @param

+ * the type of premises to which the rule can be applied * @param rule + * the {@link Rule} to be applied * @param premise + * the main premise to which the rule is applied * @param premises + * other premises to which the rule is applied * @param producer - * @return + * the {@link ClassInferenceProducer} using which the inferences + * produced by this rule application are handled + * @return the output of the visitor */ protected

O defaultVisit(Rule

rule, P premise, ContextPremises premises, ClassInferenceProducer producer) { @@ -150,8 +157,9 @@ public O visit(ContradictionOverBackwardLinkRule rule, BackwardLink premise, } @Override - public O visit(ContradictionPropagationRule rule, ClassInconsistency premise, - ContextPremises premises, ClassInferenceProducer producer) { + public O visit(ContradictionPropagationRule rule, + ClassInconsistency premise, ContextPremises premises, + ClassInferenceProducer producer) { return defaultVisit(rule, premise, premises, producer); } @@ -178,8 +186,9 @@ public O visit(EquivalentClassSecondFromFirstRule rule, } @Override - public O visit(IndexedClassDecompositionRule rule, IndexedDefinedClass premise, - ContextPremises premises, ClassInferenceProducer producer) { + public O visit(IndexedClassDecompositionRule rule, + IndexedDefinedClass premise, ContextPremises premises, + ClassInferenceProducer producer) { return defaultVisit(rule, premise, premises, producer); } @@ -247,8 +256,9 @@ public O visit(ObjectUnionFromDisjunctRule rule, } @Override - public O visit(OwlNothingDecompositionRule rule, IndexedPredefinedClass premise, - ContextPremises premises, ClassInferenceProducer producer) { + public O visit(OwlNothingDecompositionRule rule, + IndexedPredefinedClass premise, ContextPremises premises, + ClassInferenceProducer producer) { return defaultVisit(rule, premise, premises, producer); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/factories/AbstractRuleApplicationFactory.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/factories/AbstractRuleApplicationFactory.java index 379a30892..b7dd52e38 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/factories/AbstractRuleApplicationFactory.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/factories/AbstractRuleApplicationFactory.java @@ -80,9 +80,17 @@ public AbstractRuleApplicationFactory(final InterruptMonitor interrupter, /** * @param activeContext + * a reference to the {@link Context} that is being processed * @param inferenceProcessor + * specifies how the produced {@link ClassInference}s should be + * processed * @param saturationStateWriter + * an object through which the {@link SaturationState} can be + * updated + * @param localTodo + * the queue of {@link ClassInference} produced by the worker * @param localStatistics + * the {@link SaturationStatistics} for the current worker * @return an {@link InputProcessor} that processes {@link ClassInference}s * in {@link Context}s within an individual worker thread for the * input root {@link IndexedClassExpression} using the supplied @@ -106,7 +114,11 @@ protected InputProcessor getEngine( * further extended and optimized. * * @param creationListener + * the {@link ContextCreationListener} that gets notified when + * this {@link SaturationStateWriter} creates new contexts * @param modificationListener + * the {@link ContextModificationListener} that gets notified + * when this {@link SaturationStateWriter} modifies contexts * @return a new writer for the main {@link SaturationState} to be used by * engine. */ @@ -137,10 +149,17 @@ SaturationStateWriter getFinalWriter( * {@link ClassInference}s within {@link Context} by an individual worker. * * @param activeContext + * a reference to the {@link Context} that is being processed * @param ruleVisitor + * specifies how the produced {@link ClassInference}s should be + * processed * @param writer + * an object through which the {@link SaturationState} can be * @param localStatistics - * @return + * the {@link SaturationStatistics} for the current worker + * @return a {@link ClassInference.Visitor} that processes + * {@link ClassInference}s within {@link Context} by an individual + * worker. */ protected abstract ClassInference.Visitor getInferenceProcessor( Reference activeContext, RuleVisitor ruleVisitor, @@ -148,10 +167,13 @@ protected abstract ClassInference.Visitor getInferenceProcessor( SaturationStatistics localStatistics); /** - * Creates a {@link RuleVisitor} that specifies how the rules are applied + * Creates a {@link RuleVisitor} that specifies how the rules are applied * * @param statistics - * @return the {@link RuleVisitor} used by this + * the {@link SaturationStatistics} that updates information + * about the visited rules + * @return the {@link RuleVisitor} that updates the given + * {@link SaturationStatistics} */ @SuppressWarnings("static-method") protected RuleVisitor getRuleVisitor(RuleStatistics statistics) { diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/taxonomy/TaxonomyPrinter.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/taxonomy/TaxonomyPrinter.java index dc01d636a..d6fb3c272 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/taxonomy/TaxonomyPrinter.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/taxonomy/TaxonomyPrinter.java @@ -200,6 +200,9 @@ public static String getInstanceHashString( * @param writer * the {@link Writer} used for printing * @throws IOException + * If an I/O error occurs + * @param + * the type of objects stored in the {@link Taxonomy} */ protected static void processTaxomomy( final Taxonomy taxonomy, final Appendable writer) @@ -258,7 +261,7 @@ protected static void processTaxomomy( } } - protected static void printDeclarations( + private static void printDeclarations( final Iterable members, final ElkObject.Factory factory, final Appendable writer) throws IOException { for (final T member : members) { @@ -273,8 +276,9 @@ protected static void printDeclarations( * relevant related members are given in two ordered collections of * equivalent members and super-members, respectively. The method serializes * the axioms to the Writer. + * */ - protected static void printMemberAxioms( + private static void printMemberAxioms( final I member, final List equivalentMembers, final SortedSet directSuperMembers, final Taxonomy taxonomy, final ElkObject.Factory factory, final Appendable writer) diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/AbstractTracingInference.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/AbstractTracingInference.java index cccb16e62..8737b2273 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/AbstractTracingInference.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/AbstractTracingInference.java @@ -44,13 +44,6 @@ public abstract class AbstractTracingInference implements TracingInference { public abstract Conclusion getPremise(int index, Conclusion.Factory factory); - /** - * @param factory - * the factory for creating conclusions - * - * @return the conclusion produced by this inference - */ - protected static T failGetPremise(int index) { throw new IndexOutOfBoundsException("No premise with index: " + index); } diff --git a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CapacityBalancingEvictor.java b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CapacityBalancingEvictor.java index 661cced64..b27cbe23e 100644 --- a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CapacityBalancingEvictor.java +++ b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CapacityBalancingEvictor.java @@ -147,6 +147,7 @@ protected static abstract class ProtectedBuilder> * If not supplied, defaults to {@link #DEFAULT_BALANCE}. * * @param balance + * the proportion of elements that should be not evicted * @return This builder. * @throws IllegalArgumentException * When the argument is not between 0 and 1 inclusive. @@ -168,6 +169,8 @@ public B balance(final double balance) throws IllegalArgumentException { * {@link #DEFAULT_BALANCE_AFTER_N_REPEATED_QUERIES}. * * @param balanceAfterNRepeatedQueries + * the number of repeated queries after which to balance the + * capacity * @return This builder. * @throws IllegalArgumentException * If the value is not positive. diff --git a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CountingEvictor.java b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CountingEvictor.java index 9eb962a82..b21245dec 100644 --- a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CountingEvictor.java +++ b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/CountingEvictor.java @@ -99,6 +99,8 @@ protected static abstract class ProtectedBuilder> * If not provided, defaults to {@link #DEFAULT_EVICT_BEFORE_ADD_COUNT}. * * @param evictBeforeAddCount + * The number of times an element must be added so that it is + * not evicted immediately. * @return This builder. * @throws IllegalArgumentException * When the argument is negative. diff --git a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/NQEvictor.java b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/NQEvictor.java index 39df30166..a65912e9d 100644 --- a/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/NQEvictor.java +++ b/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/NQEvictor.java @@ -176,7 +176,9 @@ protected static abstract class ProtectedBuilder> * {@link RecencyEvictor}. * * @param capacity + * the capacity of the added level * @param loadFactor + * the load factor of the added level * @return This builder. * @throws IllegalArgumentException * When capacity is negative or load factor is not between 0 @@ -203,6 +205,7 @@ public B addLevel(final int capacity, final double loadFactor) * if the level was a {@link RecencyEvictor}. * * @param capacity + * the capacity of the added level * @return This builder. * @throws IllegalArgumentException * When capacity is negative. @@ -217,6 +220,7 @@ public B addLevel(final int capacity) throws IllegalArgumentException { * the level was a {@link RecencyEvictor}. * * @param loadFactor + * the load factor of the added level * @return This builder. * @throws IllegalArgumentException * When load factor is not between 0 and 1 inclusive. @@ -242,6 +246,9 @@ public B addLevel() { * added, builds {@link NQEvictor} with one level with default capacity * and load factor. * + * @param + * The type of the elements maintained by the evictor. + * * @return The built {@link NQEvictor} */ public NQEvictor build() {