Skip to content

Commit e07b2bb

Browse files
committed
Release v1.0.0: Added JavaDoc documentation and configured Maven deployment
1 parent 7dc8c44 commit e07b2bb

File tree

4 files changed

+92
-13
lines changed

4 files changed

+92
-13
lines changed

pom.xml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,37 @@
4242
</dependency>
4343
</dependencies>
4444

45+
<distributionManagement>
46+
<repository>
47+
<id>github</id>
48+
<name>GitHub Packages</name>
49+
<url>https://maven.pkg.github.com/joha1na/my-prose-app</url>
50+
</repository>
51+
</distributionManagement>
52+
4553
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-javadoc-plugin</artifactId>
58+
<version>3.6.3</version>
59+
<executions>
60+
<execution>
61+
<id>attach-javadocs</id>
62+
<goals>
63+
<goal>jar</goal>
64+
</goals>
65+
</execution>
66+
</executions>
67+
<configuration>
68+
<show>private</show>
69+
<nohelp>true</nohelp>
70+
<charset>UTF-8</charset>
71+
<encoding>UTF-8</encoding>
72+
<docencoding>UTF-8</docencoding>
73+
</configuration>
74+
</plugin>
75+
</plugins>
4676
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
4777
<plugins>
4878
<plugin>
@@ -93,12 +123,4 @@
93123
</plugin>
94124
</plugins>
95125
</reporting>
96-
97-
<distributionManagement>
98-
<repository>
99-
<id>github</id>
100-
<name>GitHub Packages</name>
101-
<url>https://maven.pkg.github.com/joha1na/my-prose-app</url>
102-
</repository>
103-
</distributionManagement>
104126
</project>

src/main/java/de/htw_berlin/fb4/examples/App.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,33 @@
44
import de.htw_berlin.fb4.ossd.prose.Sentence;
55
import de.htw_berlin.fb4.ossd.prose.Prose;
66

7-
public class App
8-
{
7+
/**
8+
* Main application class for demonstrating the Prose and Sentence implementations.
9+
* This class shows the usage of the ProseBuilder class and the conversion
10+
* between Prose and Sentence objects.
11+
*
12+
* @author Jana Maire
13+
* @version 1.0.0
14+
* @see de.htw_berlin.fb4.ossd.prose.Sentence
15+
* @see de.htw_berlin.fb4.ossd.prose.Prose
16+
* @see de.htw_berlin.fb4.ossd.prose.ProseBuilder
17+
*/
18+
public class App {
19+
/**
20+
* The main method of the application.
21+
* Creates various Sentence and Prose objects, converts between them,
22+
* and uses the ProseBuilder to compose the texts.
23+
*
24+
* @param args Command line arguments (not used)
25+
*/
926
public static void main( String[] args )
1027
{
1128
Sentence s1 = new SimpleSentence();
1229
Sentence s2 = new SimpleSentence();
1330
Prose prose = new SimpleProse();
1431

15-
// Konvertierung von Prose zu Sentence
32+
// Conversion from Prose to Sentence: This step demonstrates how a Prose object can be transformed into a Sentence object
33+
// to enable further processing / registration in the ProseBuilder for text composition.
1634
Sentence s3 = SimpleSentence.toSentence(prose);
1735

1836
ProseBuilder pb = new ProseBuilder();

src/main/java/de/htw_berlin/fb4/examples/SimpleProse.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,24 @@
33
import de.htw_berlin.fb4.ossd.prose.Prose;
44

55
/**
6-
* Eine einfache Implementierung der Prose-Schnittstelle.
6+
* A simple implementation of the Prose interface.
7+
* This class provides an immutable prose text that can be used as a basic
8+
* text container in the prose composition system. The text content is
9+
* initialized upon creation and remains constant throughout the object's lifecycle.
10+
*
11+
* @author Jana Maire
12+
* @version 1.0.0
13+
* @see de.htw_berlin.fb4.ossd.prose.Prose
714
*/
815
public class SimpleProse implements Prose {
916
private String text = "Dies ist ein einfacher Prose-Text, der die Prose-Schnittstelle implementiert.";
1017

18+
/**
19+
* Returns the text content of this prose object.
20+
* This method implements the {@link Prose#get()} method from the Prose interface.
21+
*
22+
* @return The prose text as a String, which is immutable for this implementation
23+
*/
1124
@Override
1225
public String get() {
1326
return text;

src/main/java/de/htw_berlin/fb4/examples/SimpleSentence.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,43 @@
44
import de.htw_berlin.fb4.ossd.prose.Prose;
55

66
/**
7-
* Eine einfache Implementierung der Sentence-Schnittstelle.
7+
* A simple implementation of the Sentence interface.
8+
* This class represents a single sentence and provides functionality
9+
* to convert Prose objects into Sentence objects. It maintains its text content
10+
* and can be used as a building block in larger text compositions through
11+
* the ProseBuilder system.
12+
*
13+
* @author Jana Maire
14+
* @version 1.0.0
15+
* @see de.htw_berlin.fb4.ossd.prose.Sentence
16+
* @see de.htw_berlin.fb4.ossd.prose.Prose
817
*/
918
public class SimpleSentence implements Sentence {
1019
private String text = "Hallo, das ist ein einfacher Satz.";
1120

21+
/**
22+
* Converts a Prose object into a Sentence object.
23+
* This static factory method creates a new SimpleSentence instance
24+
* containing the text from the provided Prose object.
25+
*
26+
* @param prose The Prose object to convert
27+
* @return A new Sentence object containing the text from the Prose object
28+
* @throws NullPointerException if the provided Prose object is null
29+
* @see de.htw_berlin.fb4.ossd.prose.Prose#get()
30+
*/
1231
public static Sentence toSentence(Prose prose) {
1332
SimpleSentence sentence = new SimpleSentence();
1433
sentence.text = prose.get();
1534
return sentence;
1635
}
1736

37+
/**
38+
* Returns the text content of this sentence.
39+
* This method implements the {@link Sentence#get()} method from the Sentence interface.
40+
* The text content represents a single sentence that can be used in text composition.
41+
*
42+
* @return The sentence text as a String
43+
*/
1844
@Override
1945
public String get() {
2046
return text;

0 commit comments

Comments
 (0)