Skip to content

Commit

Permalink
code format with spotless automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
automated changes authored and ahmadshadab committed Sep 29, 2023
1 parent daa5821 commit c9251ba
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ public List<UniProtDatabaseDetail> getDBTypesByCategory(UniProtDatabaseCategory
.collect(Collectors.toList());
}

public List<UniProtDatabaseDetail> getInternalDatabaseDetails(){
public List<UniProtDatabaseDetail> getInternalDatabaseDetails() {
return UniProtDatabaseTypes.INSTANCE.getAllDbTypes().stream()
.filter(dbDetail -> "internal".equals(dbDetail.getType())).collect(Collectors.toList());
.filter(dbDetail -> "internal".equals(dbDetail.getType()))
.collect(Collectors.toList());
}

private void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void testFailedValidation() {
opType.getAttributes(),
false,
null,
null, null);
null,
null);

// validate, the category should mismatch
List<Pair<String, String>> mismatches = CrossReferenceValidator.validate(actualOpType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import static org.uniprot.core.cv.xdb.UniProtDatabaseCategory.*;

import java.util.List;
import java.util.stream.Collectors;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -333,8 +332,9 @@ void testDatabaseFieldSize() {
}

@Test
void testInternalCrossRefs(){
List<UniProtDatabaseDetail> internalCrossRefs = UniProtDatabaseTypes.INSTANCE.getInternalDatabaseDetails();
void testInternalCrossRefs() {
List<UniProtDatabaseDetail> internalCrossRefs =
UniProtDatabaseTypes.INSTANCE.getInternalDatabaseDetails();

assertEquals(7, internalCrossRefs.size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ public UniProtDatabaseDetail(
boolean implicit,
String linkedReason,
String idMappingName) {
this(name, displayName, category, uriLink, attributes, implicit, linkedReason, idMappingName, null);
this(
name,
displayName,
category,
uriLink,
attributes,
implicit,
linkedReason,
idMappingName,
null);
}

public UniProtDatabaseDetail(
String name,
String displayName,
Expand Down Expand Up @@ -95,7 +105,7 @@ public String getIdMappingName() {
return idMappingName;
}

public String getType(){
public String getType() {
return this.type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ private UniProtDatabaseDetail createUniProtDatabaseDetail(boolean passAttribute)
this.category,
this.uriLink,
this.attributes,
null, null);
null,
null);
} else {
return createUniProtDatabaseDetail(
this.name,
Expand All @@ -132,7 +133,8 @@ static UniProtDatabaseDetail createUniProtDatabaseDetail(
UniProtDatabaseCategory category,
String uriLink,
List<UniProtDatabaseAttribute> attributes,
String idMappingName, String type) {
String idMappingName,
String type) {
return new UniProtDatabaseDetail(
name, displayName, category, uriLink, attributes, false, null, idMappingName, type);
}
Expand Down

0 comments on commit c9251ba

Please sign in to comment.