Skip to content

Commit 1de2924

Browse files
author
ConCode - Coding/Tutorials
committed
Updated Classes for 1.0.0 update
1 parent 662b822 commit 1de2924

File tree

9 files changed

+420
-33
lines changed

9 files changed

+420
-33
lines changed

pom.xml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45

56
<groupId>com.github.connyscode.ctils</groupId>
67
<artifactId>jtrack</artifactId>
7-
<version>1.0.5-SNAPSHOT</version>
8+
<version>1.0.0-SNAPSHOT</version>
89
<name>${project.groupId}:${project.artifactId}</name>
9-
<description>A application used as an example on how to set up pushing
10-
its components to the Central Repository.
10+
<description>yes.
1111
</description>
1212
<url>https://github.com/ConnysCode/jTrack</url>
1313

1414
<developers>
1515
<developer>
16-
<name>Morian Engelhardt</name>
16+
<name>ConCode</name>
1717
<email>[email protected]</email>
1818
<organization>com.github.connyscode</organization>
1919
<organizationUrl>https://github.com/ConnysCode</organizationUrl>
2020
</developer>
2121
</developers>
2222

23-
<distributionManagement>
24-
<snapshotRepository>
25-
<id>ossrh</id>
26-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
27-
</snapshotRepository>
28-
<repository>
29-
<id>ossrh</id>
30-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
31-
</repository>
32-
</distributionManagement>
23+
<scm>
24+
<connection>scm:git:ssh://[email protected]/ConnysCode/jTrack.git</connection>
25+
<developerConnection>scm:git:ssh://[email protected]/ConnysCode/jTrack.git</developerConnection>
26+
<url>https://github.com/connyscode/jtrack</url>
27+
<tag>Test Tag for Test 1.0.4</tag>
28+
</scm>
3329

3430
<build>
3531
<plugins>
@@ -41,7 +37,6 @@
4137
<target>8</target>
4238
</configuration>
4339
</plugin>
44-
4540
<plugin>
4641
<groupId>org.sonatype.plugins</groupId>
4742
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -97,6 +92,7 @@
9792
</executions>
9893
</plugin>
9994
<!--Automatic Jar and Javadoc File Generation-->
95+
10096
<!--The Maven GPG plugin is used to sign the components with the following configuration-->
10197
<plugin>
10298
<groupId>org.apache.maven.plugins</groupId>
@@ -116,13 +112,16 @@
116112
</plugins>
117113
</build>
118114

119-
120-
<scm>
121-
<connection>scm:git:ssh://[email protected]/ConnysCode/jTrack.git</connection>
122-
<developerConnection>scm:git:ssh://[email protected]/ConnysCode/jTrack.git</developerConnection>
123-
<url>https://github.com/connyscode/jtrack</url>
124-
<tag>Test Tag for Test 1.0.4</tag>
125-
</scm>
115+
<distributionManagement>
116+
<snapshotRepository>
117+
<id>ossrh</id>
118+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
119+
</snapshotRepository>
120+
<repository>
121+
<id>ossrh</id>
122+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
123+
</repository>
124+
</distributionManagement>
126125

127126
<licenses>
128127
<license>
@@ -131,4 +130,13 @@
131130
</license>
132131
</licenses>
133132

133+
<dependencies>
134+
<dependency>
135+
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
136+
<groupId>org.jsoup</groupId>
137+
<artifactId>jsoup</artifactId>
138+
<version>1.13.1</version>
139+
</dependency>
140+
</dependencies>
141+
134142
</project>

release.properties

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#release configuration
2+
#Thu Dec 03 14:51:52 CET 2020
3+
projectVersionPolicyId=default
4+
scm.tagNameFormat=@{project.artifactId}-@{project.version}
5+
remoteTagging=true
6+
scm.commentPrefix=[maven-release-plugin]
7+
pushChanges=true
8+
completedPhase=check-poms
9+
scm.url=scm\:git\:ssh\://[email protected]/ConnysCode/jTrack.git
10+
exec.snapshotReleasePluginAllowed=false
11+
preparationGoals=clean verify

src/main/java/com/github/connyscode/jTrack/PlaceholderClass.java

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package com.github.connyscode.jTrack;
2+
3+
import com.github.connyscode.jTrack.backend.types.TrackSearchCluster;
4+
5+
public class Track {
6+
7+
private final String songTitle, songAuthor, songText, songUrl, songService;
8+
9+
/**
10+
* Create a Track
11+
*
12+
* @see Track
13+
*/
14+
Track() {
15+
this.songTitle = "";
16+
this.songAuthor = "";
17+
this.songText = "";
18+
this.songUrl = "";
19+
this.songService = "";
20+
}
21+
22+
/**
23+
* Create a Track
24+
*
25+
* @param songTitle Song Title
26+
* @param songAuthor Song Author
27+
* @param songText Song Text
28+
* @param songUrl Song URL
29+
* @param songService Song Service
30+
* @see Track
31+
*/
32+
Track(String songTitle, String songAuthor, String songText, String songUrl, String songService) {
33+
this.songTitle = songTitle;
34+
this.songAuthor = songAuthor;
35+
this.songText = songText;
36+
this.songUrl = songUrl;
37+
this.songService = songService;
38+
}
39+
40+
public String songTitle() {
41+
return songTitle;
42+
}
43+
public String songArtist() {
44+
return songAuthor;
45+
}
46+
public String songText() {
47+
return songText;
48+
}
49+
public String songUrl() {
50+
return songUrl;
51+
}
52+
public String songService() {
53+
return songService;
54+
}
55+
56+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.github.connyscode.jTrack.backend;
2+
3+
import com.github.connyscode.jTrack.Track;
4+
5+
public class Messaging {
6+
/**
7+
* Print an Error
8+
*/
9+
public static void error(String errorTag, String text) {
10+
System.out.println("[jTRACK] [ERROR-" + errorTag + "] " + text);
11+
}
12+
13+
/**
14+
* Print a Warning
15+
*/
16+
public static void warning(String warningTag, String text) {
17+
System.out.println("[jTRACK] [WARNING-" + warningTag + "] " + text);
18+
}
19+
20+
/**
21+
* Print an Info
22+
*/
23+
public static void info(String text) {
24+
System.out.println("[jTRACK] [INFO] " + text);
25+
}
26+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.github.connyscode.jTrack.backend;
2+
3+
4+
import com.github.connyscode.jTrack.backend.types.TrackSearchCluster;
5+
import org.jsoup.Jsoup;
6+
import org.jsoup.nodes.Document;
7+
8+
import java.io.IOException;
9+
10+
public class jSoupUtils {
11+
12+
/**
13+
* Get a Document from an URL
14+
*
15+
* @param url Destination URL
16+
* @see Document
17+
*/
18+
public static Document getDoc(String url) throws IOException {
19+
return Jsoup.connect(url)
20+
.ignoreContentType(true)
21+
.userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0")
22+
.referrer("http://www.google.com")
23+
.timeout(12000)
24+
.followRedirects(true)
25+
.get();
26+
}
27+
28+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.github.connyscode.jTrack.backend.types;
2+
3+
public class SearchResult {
4+
public String songTitle, songAuthor, songUrl, searchURL;
5+
private boolean wasSuccessful;
6+
7+
/**
8+
* Create a SearchResult
9+
*
10+
* @param songTitle Song Title
11+
* @param songAuthor Song Author
12+
* @param songUrl Song URL
13+
* @see SearchResult
14+
*/
15+
public SearchResult(String songTitle, String songAuthor, String songUrl) {
16+
this.songTitle = songTitle;
17+
this.songAuthor = songAuthor;
18+
this.songUrl = songUrl;
19+
this.wasSuccessful = true;
20+
}
21+
22+
/**
23+
* Create an empty SearchResult with a success statement
24+
*
25+
* @param success Successful?
26+
* @see SearchResult
27+
*/
28+
public SearchResult(boolean success) {
29+
this.songTitle = "";
30+
this.songAuthor = "";
31+
this.songUrl = "";
32+
this.wasSuccessful = success;
33+
}
34+
35+
/**
36+
* Check if the SearchResult was successful
37+
*
38+
* @see SearchResult
39+
* @return Returns is the SearchResult was successful
40+
*/
41+
public boolean wasSuccessful() {
42+
return wasSuccessful;
43+
}
44+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.github.connyscode.jTrack.backend.types;
2+
3+
public final class TrackSearchCluster
4+
{
5+
private String songName, songAuthor, searchPhrase = "";
6+
7+
/**
8+
* Create a TrackSearchCluster
9+
*
10+
* @param searchPhrase A Search Phrase
11+
* @see TrackSearchCluster
12+
*/
13+
public TrackSearchCluster(String searchPhrase) {
14+
this.searchPhrase = searchPhrase;
15+
}
16+
17+
/**
18+
* Create a TrackSearchCluster
19+
*
20+
* @param songName A Songs Name
21+
* @param songAuthor A Songs Author
22+
* @see TrackSearchCluster
23+
*/
24+
public TrackSearchCluster(String songName, String songAuthor) {
25+
this.songName = songName;
26+
this.songAuthor = songAuthor;
27+
}
28+
29+
/**
30+
* Get the Song Name out of a TrackSearchCluster
31+
*
32+
* @see TrackSearchCluster
33+
*/
34+
public String getSongName() {
35+
return songName;
36+
}
37+
38+
/**
39+
* Get the Song Author out of a TrackSearchCluster
40+
*
41+
* @see TrackSearchCluster
42+
*/
43+
public String getSongAuthor() {
44+
return songAuthor;
45+
}
46+
47+
/**
48+
* Get the Search Phrase out of a TrackSearchCluster
49+
*
50+
* @see TrackSearchCluster
51+
*/
52+
public String getSearchPhrase() {
53+
return searchPhrase;
54+
}
55+
}

0 commit comments

Comments
 (0)