Skip to content

Commit 55ca9fe

Browse files
fixed some javadoc errors
1 parent 36afeac commit 55ca9fe

File tree

14 files changed

+152
-156
lines changed

14 files changed

+152
-156
lines changed

vlog4j-client/src/main/java/org/semanticweb/vlog4j/client/picocli/ClientUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ public static void printOutQueryAnswers(final PositiveLiteral queryAtom, final R
9696
*
9797
* @param queryAtom query to be answered
9898
* @param reasoner reasoner to query on
99+
*
100+
* @return number of answers to the given query
99101
*/
100102
public static int getQueryAnswerCount(final PositiveLiteral queryAtom, final Reasoner reasoner) {
101103
try (final QueryResultIterator answers = reasoner.answerQuery(queryAtom, true)) {

vlog4j-client/src/main/java/org/semanticweb/vlog4j/client/picocli/PrintQueryResults.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public PrintQueryResults(final boolean sizeOnly, final boolean complete) {
5959
}
6060

6161
/**
62-
* Check correct configuration of the class. @code{--print-query-result-size}
63-
* and @code{--print-query-result} are mutually exclusive.
62+
* Check correct configuration of the class. {@code --print-query-result-size}
63+
* and {@code --print-query-result} are mutually exclusive.
6464
*
65-
* @return @code{true} if configuration is valid.
65+
* @return {@code true} if configuration is valid.
6666
*/
6767
public boolean isValid() {
6868
return !this.sizeOnly || !this.complete;

vlog4j-client/src/main/java/org/semanticweb/vlog4j/client/picocli/SaveModel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public SaveModel(final boolean saveModel, final String outputDir) {
6363
}
6464

6565
/**
66-
* Check correct configuration of the class. If @code{--save-model} is true,
67-
* then a non-empty @code{--output-model-directory} is required.
66+
* Check correct configuration of the class. If {@code --save-model} is true,
67+
* then a non-empty {@code --output-model-directory} is required.
6868
*
69-
* @return @code{true} if configuration is valid.
69+
* @return {@code true} if configuration is valid.
7070
*/
7171
public boolean isConfigurationValid() {
7272
return !this.saveModel || ((this.outputModelDirectory != null) && !this.outputModelDirectory.isEmpty());
@@ -75,7 +75,7 @@ public boolean isConfigurationValid() {
7575
/**
7676
* Check that the path to store the model is either non-existing or a directory.
7777
*
78-
* @return @code{true} if conditions are satisfied.
78+
* @return {@code true} if conditions are satisfied.
7979
*/
8080
public boolean isDirectoryValid() {
8181
final File file = new File(this.outputModelDirectory);

vlog4j-client/src/main/java/org/semanticweb/vlog4j/client/picocli/SaveQueryResults.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ public SaveQueryResults(final boolean saveResults, final String outputDir) {
6464
}
6565

6666
/**
67-
* Check correct configuration of the class. If @code{--save-query-results} is
68-
* true, then a non-empty @code{--output-query-result-directory} is required.
67+
* Check correct configuration of the class. If {@code --save-query-results} is
68+
* true, then a non-empty {@code --output-query-result-directory} is required.
6969
*
70-
* @return @code{true} if configuration is valid.
70+
* @return {@code true} if configuration is valid.
7171
*/
7272
public boolean isConfigurationValid() {
7373
return !this.saveResults
@@ -78,7 +78,7 @@ public boolean isConfigurationValid() {
7878
* Check that the path to store the query results is either non-existing or a
7979
* directory.
8080
*
81-
* @return @code{true} if conditions are satisfied.
81+
* @return {@code true} if conditions are satisfied.
8282
*/
8383
public boolean isDirectoryValid() {
8484
final File file = new File(this.outputQueryResultDirectory);

vlog4j-core/src/main/java/org/semanticweb/vlog4j/core/model/api/Variable.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
*/
2222

2323
/**
24-
* Interface for variables, i.e., terms of type {@link TermType#VARIABLE}.
25-
* Variables are terms that can be quantified to create formulas that refer to
26-
* some or all values of the domain.
24+
* Interface for variables, i.e., terms of type
25+
* {@link TermType#UNIVERSAL_VARIABLE} and
26+
* {@link TermType#EXISTENTIAL_VARIABLE}. Variables are terms that can be
27+
* quantified to create formulas that refer to some or all values of the domain.
2728
*
2829
2930
* @author Markus Krötzsch

vlog4j-core/src/main/java/org/semanticweb/vlog4j/core/model/implementation/FactImpl.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,30 @@
2828
import org.semanticweb.vlog4j.core.model.api.Term;
2929

3030
/**
31-
* Standard implementation of the {@Fact} interface.
31+
* Standard implementation of the {@link Fact} interface.
3232
*
3333
* @author Markus Kroetzsch
3434
*
3535
*/
3636
public class FactImpl extends PositiveLiteralImpl implements Fact {
3737

38-
public FactImpl(Predicate predicate, List<Term> terms) {
38+
public FactImpl(final Predicate predicate, final List<Term> terms) {
3939
super(predicate, terms);
40-
for (Term t : terms) {
41-
if (t.isVariable())
40+
for (final Term t : terms) {
41+
if (t.isVariable()) {
4242
throw new IllegalArgumentException("Facts cannot contain variables.");
43+
}
4344
}
4445
}
4546

4647
@Override
47-
public <T> T accept(StatementVisitor<T> statementVisitor) {
48+
public <T> T accept(final StatementVisitor<T> statementVisitor) {
4849
return statementVisitor.visit(this);
4950
}
5051

5152
@Override
5253
public String toString() {
53-
return getSyntacticRepresentation();
54+
return this.getSyntacticRepresentation();
5455
}
5556

5657
}

vlog4j-core/src/main/java/org/semanticweb/vlog4j/core/model/implementation/Serializer.java

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private Serializer() {
8888
/**
8989
* Creates a String representation of a given {@link Rule}.
9090
*
91-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
91+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
9292
* @param rule a {@link Rule}.
9393
* @return String representation corresponding to a given {@link Rule}.
9494
*
@@ -100,7 +100,7 @@ public static String getString(final Rule rule) {
100100
/**
101101
* Creates a String representation of a given {@link Conjunction}.
102102
*
103-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
103+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
104104
* @param conjunction a {@link Conjunction}
105105
* @return String representation corresponding to a given {@link Conjunction}.
106106
*/
@@ -121,7 +121,7 @@ public static String getString(final Conjunction<? extends Literal> conjunction)
121121
/**
122122
* Creates a String representation of a given {@link Literal}.
123123
*
124-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
124+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
125125
* @param literal a {@link Literal}
126126
* @return String representation corresponding to a given {@link Literal}.
127127
*/
@@ -148,7 +148,7 @@ public static String getString(final Literal literal) {
148148
/**
149149
* Creates a String representation of a given {@link Fact}.
150150
*
151-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
151+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
152152
* @param fact a {@link Fact}
153153
* @return String representation corresponding to a given {@link Fact}.
154154
*/
@@ -159,7 +159,7 @@ public static String getFactString(final Fact fact) {
159159
/**
160160
* Creates a String representation of a given {@link Constant}.
161161
*
162-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
162+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
163163
* @param constant a {@link Constant}
164164
* @return String representation corresponding to a given {@link Constant}.
165165
*/
@@ -171,7 +171,7 @@ public static String getString(final AbstractConstant constant) {
171171
* Creates a String representation corresponding to the name of a given
172172
* {@link LanguageStringConstant}.
173173
*
174-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
174+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
175175
* @param languageStringConstant a {@link LanguageStringConstant}
176176
* @return String representation corresponding to the name of a given
177177
* {@link LanguageStringConstant}.
@@ -184,7 +184,7 @@ public static String getConstantName(final LanguageStringConstant languageString
184184
* Creates a String representation corresponding to the name of a given
185185
* {@link DatatypeConstant} without an IRI.
186186
*
187-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
187+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
188188
* @param datatypeConstant a {@link DatatypeConstant}
189189
* @return String representation corresponding to a given
190190
* {@link DatatypeConstant}.
@@ -207,7 +207,7 @@ public static String getString(final DatatypeConstant datatypeConstant) {
207207
* Creates a String representation corresponding to the name of a given
208208
* {@link DatatypeConstant} including an IRI.
209209
*
210-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
210+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
211211
* @param datatypeConstant a {@link DatatypeConstant}
212212
* @return String representation corresponding to a given
213213
* {@link DatatypeConstant}.
@@ -220,7 +220,7 @@ public static String getConstantName(final DatatypeConstant datatypeConstant) {
220220
/**
221221
* Creates a String representation of a given {@link ExistentialVariable}.
222222
*
223-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
223+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
224224
* @param existentialVariable a {@link ExistentialVariable}
225225
* @return String representation corresponding to a given
226226
* {@link ExistentialVariable}.
@@ -232,7 +232,7 @@ public static String getString(final ExistentialVariable existentialVariable) {
232232
/**
233233
* Creates a String representation of a given {@link UniversalVariable}.
234234
*
235-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
235+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
236236
* @param universalVariable a {@link UniversalVariable}
237237
* @return String representation corresponding to a given
238238
* {@link UniversalVariable}.
@@ -244,7 +244,7 @@ public static String getString(final UniversalVariable universalVariable) {
244244
/**
245245
* Creates a String representation of a given {@link NamedNull}.
246246
*
247-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
247+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
248248
* @param namedNull a {@link NamedNull}
249249
* @return String representation corresponding to a given {@link NamedNull}.
250250
*/
@@ -255,7 +255,7 @@ public static String getString(final NamedNull namedNull) {
255255
/**
256256
* Creates a String representation of a given {@link Predicate}.
257257
*
258-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
258+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
259259
* @param predicate a {@link Predicate}
260260
* @return String representation corresponding to a given {@link Predicate}.
261261
*/
@@ -266,7 +266,7 @@ public static String getString(final Predicate predicate) {
266266
/**
267267
* Creates a String representation of a given {@link DataSourceDeclaration}.
268268
*
269-
* @see <"https://github.com/knowsys/vlog4j/wiki"> for wiki.
269+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
270270
* @param dataSourceDeclaration a {@link DataSourceDeclaration}
271271
* @return String representation corresponding to a given
272272
* {@link DataSourceDeclaration}.
@@ -279,7 +279,7 @@ public static String getString(final DataSourceDeclaration dataSourceDeclaration
279279
/**
280280
* Creates a String representation of a given {@link CsvFileDataSource}.
281281
*
282-
* @see <"https://github.com/knowsys/vlog4j/wiki">.
282+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> ..
283283
*
284284
* @param csvFileDataSource
285285
* @return String representation corresponding to a given
@@ -292,7 +292,7 @@ public static String getString(final CsvFileDataSource csvFileDataSource) {
292292
/**
293293
* Creates a String representation of a given {@link RdfFileDataSource}.
294294
*
295-
* @see <"https://github.com/knowsys/vlog4j/wiki">.
295+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> ..
296296
*
297297
*
298298
* @param rdfFileDataSource
@@ -307,7 +307,7 @@ public static String getString(final RdfFileDataSource rdfFileDataSource) {
307307
* Creates a String representation of a given
308308
* {@link SparqlQueryResultDataSource}.
309309
*
310-
* @see <"https://github.com/knowsys/vlog4j/wiki">.
310+
* @see <a href="https://github.com/knowsys/vlog4j/wiki">Rule syntax</a> .
311311
*
312312
*
313313
* @param dataSource
@@ -335,14 +335,8 @@ private static String getIRIString(final String string) {
335335
}
336336

337337
private static String escape(final String string) {
338-
return string
339-
.replace("\\", "\\\\")
340-
.replace("\"", "\\\"")
341-
.replace("\t", "\\t")
342-
.replace("\b", "\\b")
343-
.replace("\n", "\\n")
344-
.replace("\r", "\\r")
345-
.replace("\f", "\\f");
338+
return string.replace("\\", "\\\\").replace("\"", "\\\"").replace("\t", "\\t").replace("\b", "\\b")
339+
.replace("\n", "\\n").replace("\r", "\\r").replace("\f", "\\f");
346340
// don't touch single quotes here since we only construct double-quoted strings
347341
}
348342

0 commit comments

Comments
 (0)