Skip to content

Commit f0c1695

Browse files
author
“jklein94”
committed
Added missing javadoc
1 parent f8c59f8 commit f0c1695

File tree

3 files changed

+56
-39
lines changed

3 files changed

+56
-39
lines changed

org-tweetyproject-arg-eaf/src/main/java/org/tweetyproject/arg/eaf/examples/EafTheoryGeneratorExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
import org.tweetyproject.arg.eaf.writer.EafApxWriter;
3131

3232
/**
33-
* Demonstrates the generation and export of {@link EpistemicArgumentationFramework}s (EAFs)
33+
* Demonstrates the generation and export of EAFs
3434
* using various generation strategies.
3535
*
3636
* <p>The generated EAFs are written to `.apx` files using {@link EafApxWriter}.
3737
* Three approaches are shown:
3838
* <ul>
39-
* <li>Random EAF generation using {@link DefaultDungTheoryGenerator}</li>
39+
* <li>Random EAF generation</li>
4040
* <li>Controlled generation with specific structural and semantic properties using {@link KwtDungTheoryGenerator}</li>
4141
* <li>Generation based on a custom, user-defined {@link DungTheory}</li>
4242
* </ul>
@@ -54,7 +54,7 @@ public EafTheoryGeneratorExample() {
5454
*
5555
* <p>Three types of EAF datasets are created:
5656
* <ul>
57-
* <li>20 randomly generated EAFs using {@link DefaultDungTheoryGenerator}</li>
57+
* <li>20 randomly generated EAFs
5858
* <li>20 structured EAFs generated using {@link KwtDungTheoryGenerator}, with controlled semantic properties</li>
5959
* <li>20 EAFs derived from a manually constructed {@link DungTheory}</li>
6060
* </ul>

org-tweetyproject-arg-eaf/src/main/java/org/tweetyproject/arg/eaf/reasoner/SimpleEAFAdmissibleReasoner.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
* This reasoner for epistemic Dung theories performs inference on the admissible extension.
3232
* Extensions are determined by checking for all admissible sets which set combinations satisfy the epistemic constraint.
3333
* Note that this reasoner does not compute epistemic extension sets.
34-
*
34+
*
3535
* @author Sandra Hoffmann
3636
*
3737
*/
3838
public class SimpleEAFAdmissibleReasoner extends AbstractEAFReasoner{
3939

4040
/**
4141
* Computes all admissible extensions that satisfy the epistemic constraint of the EAF.
42-
*
42+
*
4343
* @param bbase the epistemic argumentation framework
4444
* @return A collection of all admissible extensions that satisfy the constraint.
4545
*/
@@ -49,12 +49,12 @@ public Collection<Extension<EpistemicArgumentationFramework>> getModels(Epistemi
4949

5050
/**
5151
* Computes one admissible extension that satisfies the epistemic constraint of the EAF.
52-
*
52+
*
5353
* @param bbase the constrained argumentation framework
5454
* @return An admissible extension that satisfies the constraint.
5555
*/
5656
public Extension<EpistemicArgumentationFramework> getModel(EpistemicArgumentationFramework bbase) {
5757
return super.getModel(bbase, Semantics.ADM);
5858
}
59-
59+
6060
}

org-tweetyproject-arg-eaf/src/main/java/org/tweetyproject/arg/eaf/writer/AbstractEafWriter.java

Lines changed: 49 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,56 @@
2626
import org.tweetyproject.arg.eaf.syntax.EpistemicArgumentationFramework;
2727

2828
/**
29-
* @author Sandra Hoffmann
29+
* Abstract base class for writing EpistemicArgumentationFramework (EAF) instances
30+
* to different file formats.
31+
*
32+
* Subclasses must implement the write method for specific formats.
33+
* This class also provides a static factory method to retrieve a suitable writer
34+
* for a given file format.
35+
*
36+
* Supported formats include:
37+
*
38+
* - TGF - Trivial Graph Format
39+
* - APX - Argumentation Interchange Format (used by ASPARTIX)
40+
* - CNF - Conjunctive Normal Form (logic-based encoding)
41+
*
42+
*
43+
*
44+
* Author: Sandra Hoffmann
3045
*/
3146
public abstract class AbstractEafWriter {
32-
33-
/**
34-
* standard constructor
35-
*/
36-
public AbstractEafWriter() {
37-
super();
38-
}
39-
40-
41-
/**
42-
* Retrieves the writer for the given file format.
43-
* @param f some file format
44-
* @return a writer or null if the format is not supported.
45-
*/
46-
public static AbstractEafWriter getWriter(FileFormat f){
47-
if(f.equals(FileFormat.TGF))
48-
return new EafTgfWriter();
49-
if(f.equals(FileFormat.APX))
50-
return new EafApxWriter();
51-
if(f.equals(FileFormat.CNF))
52-
return new EafCnfWriter();
53-
return null;
54-
}
55-
56-
/**
57-
* Writes the given eaf into a file
58-
* @param eaf an abstract argumentation framework
59-
* @param f the file that will be overwritten.
60-
* @throws IOException for all errors concerning file reading/writing.
61-
*/
62-
public abstract void write(EpistemicArgumentationFramework eaf, File f) throws IOException;
6347

48+
/**
49+
* Standard constructor.
50+
*/
51+
public AbstractEafWriter() {
52+
super();
53+
}
54+
55+
/**
56+
* Returns an AbstractEafWriter instance for the specified file format.
57+
*
58+
* @param f the desired file format
59+
* @return a writer for the format, or null if the format is not supported
60+
*/
61+
public static AbstractEafWriter getWriter(FileFormat f) {
62+
if (f.equals(FileFormat.TGF))
63+
return new EafTgfWriter();
64+
if (f.equals(FileFormat.APX))
65+
return new EafApxWriter();
66+
if (f.equals(FileFormat.CNF))
67+
return new EafCnfWriter();
68+
return null;
69+
}
70+
71+
/**
72+
* Writes the given epistemic argumentation framework to the specified file.
73+
* If the file already exists, it will be overwritten.
74+
*
75+
* @param eaf the epistemic argumentation framework to be written
76+
* @param f the file to write to
77+
* @throws IOException if an error occurs during file writing
78+
*/
79+
public abstract void write(EpistemicArgumentationFramework eaf, File f) throws IOException;
6480
}
81+

0 commit comments

Comments
 (0)