Skip to content

Commit

Permalink
#550 Added static public String getPath() to classes extending SysValue
Browse files Browse the repository at this point in the history
  • Loading branch information
Possommi committed Jun 18, 2024
1 parent 545b780 commit d4f9c29
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ public String getIso6391() {
public String toString() {
return id + ":" + uniqueName;
}

static public String getPath() {
return "cs/sys/values/languageValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
* Path: <code>/api/v1/cs/sys/values/publicationCreatorTypeValue</code>
* */
public class PublicationCreatorTypeValue extends SysValue {

final static public String getPath() {
return "cs/sys/values/publicationCreatorTypeValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Path: <code>/api/v1/cs/sys/values/publicationTypeValue</code>
* */
public class PublicationTypeValue extends SysValue {
public PublicationTypeValue() {

final static public String getPath() {
return "cs/sys/values/publicationTypeValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
* Path: <code>api/v1/cs/sys/values/qualificationThesisValue</code>
* */
public class QualificationThesisValue extends SysValue{

final static public String getPath() {
return "cs/sys/values/qualificationThesisValue";
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package de.uni_jena.thunibib.his.api.v1.cs.sys.values;

/**
* Path: <code>/api/v1/cs/sys/values/researchAreaKdsfValue</code>
* */
public class ResearchAreaKdsfValue extends SysValue{
public class ResearchAreaKdsfValue extends SysValue {

final static public String getPath() {
return "cs/sys/values/researchAreaKdsfValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
* Path: <code>api/v1/cs/sys/values/subjectAreaValue</code>
* */
public class SubjectAreaValue extends SysValue {
final static public String getPath() {
return "cs/sys/values/subjectAreaValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public int getHisKeyId() {
return -1;
}

@Override
public int getId() {
return -1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
* Path: <code>/api/v1/cs/sys/values/visibilityValue</code>
* */
public class VisibilityValue extends SysValue {

final static public String getPath() {
return "cs/sys/values/visibilityValue";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
* Path: <code>fs/res/publication/documentTypes/&lt;book | article&gt;</code>
* */
public class DocumentType extends SysValue {

final static public String getPath() {
return "fs/res/publication/documentTypes";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
* Path: <code>fs/res/publication/globalIdentifierType</code>
* */
public class GlobalIdentifierType extends SysValue {

final static public String getPath() {
return "fs/res/publication/globalIdentifierType";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Path: <code>/api/v1/fs/res/state/publication</code>
* */
public class PublicationState extends SysValue {
public PublicationState() {
final static public String getPath() {
return "fs/res/state/publication";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private SysValue resolveResearchAreaKdsf(String areaCategId) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/researchAreaKdsfValue")) {
Response response = hisClient.get(ResearchAreaKdsfValue.getPath())) {
List<ResearchAreaKdsfValue> availableTypes = response.readEntity(
new GenericType<List<ResearchAreaKdsfValue>>() {
});
Expand All @@ -125,7 +125,7 @@ private SysValue resolveIdentifierType(String identifierType) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("fs/res/publication/globalIdentifierType")) {
Response response = hisClient.get(GlobalIdentifierType.getPath())) {

List<GlobalIdentifierType> availableTypes = response.readEntity(
new GenericType<List<GlobalIdentifierType>>() {
Expand Down Expand Up @@ -153,7 +153,7 @@ private SysValue resolveDocumentType(String ubogenre) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("fs/res/publication/documentTypes/book")) {
Response response = hisClient.get(DocumentType.getPath() + "/book")) {

List<DocumentType> documentTypeValues = response.readEntity(
new GenericType<List<DocumentType>>() {
Expand All @@ -174,7 +174,7 @@ private SysValue resolveThesisType(String ubogenre) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/qualificationThesisValue")) {
Response response = hisClient.get(QualificationThesisValue.getPath())) {

List<QualificationThesisValue> thesisValues = response.readEntity(
new GenericType<List<QualificationThesisValue>>() {
Expand Down Expand Up @@ -213,7 +213,7 @@ private SysValue resolveSubjectArea(String destatisId) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/subjectAreaValue")) {
Response response = hisClient.get(SubjectAreaValue.getPath())) {

List<SubjectAreaValue> subjectAreas = response.readEntity(
new GenericType<List<SubjectAreaValue>>() {
Expand Down Expand Up @@ -261,7 +261,7 @@ protected SysValue resolveVisibility(String value) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/visibilityValue")) {
Response response = hisClient.get(VisibilityValue.getPath())) {

List<VisibilityValue> visState = response.readEntity(
new GenericType<List<VisibilityValue>>() {
Expand Down Expand Up @@ -312,7 +312,7 @@ protected SysValue resolveGenre(String ubogenre) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/publicationTypeValue")) {
Response response = hisClient.get(PublicationTypeValue.getPath())) {

List<PublicationTypeValue> pubTypeValues = response.readEntity(
new GenericType<List<PublicationTypeValue>>() {
Expand Down Expand Up @@ -343,7 +343,7 @@ protected LanguageValue resolveLanguage(String rfc5646) {
}

try (HISInOneClient hisClient = HISinOneClientFactory.create();
Response response = hisClient.get("cs/sys/values/languageValue")) {
Response response = hisClient.get(LanguageValue.getPath())) {

List<LanguageValue> languageValues = response.readEntity(new GenericType<List<LanguageValue>>() {
});
Expand Down
22 changes: 0 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,6 @@

<build>
<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<executions>
<execution>
<id>verify-sort-pom</id>
<goals>
<goal>sort</goal>
</goals>
<phase>validate</phase>
<configuration>
<createBackupFile>false</createBackupFile>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<keepBlankLines>true</keepBlankLines>
<sortDependencies>${sortpom.sortDeps}</sortDependencies>
<sortOrderFile>${sortpom.sortFile}</sortOrderFile>
<sortProperties>true</sortProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down

0 comments on commit d4f9c29

Please sign in to comment.