From d6b950dacded311a1f7152ffd4b020c4b4d216ca Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Mon, 13 Jun 2022 10:15:30 +0200 Subject: [PATCH] added api data model --- pom.xml | 2 +- .../schema/sx/api/model/v1/LinkPublisher.java | 10 ++++++---- .../schema/sx/api/model/v1/ScholixCreator.java | 9 +++++---- .../sx/api/model/v1/ScholixIdentifier.java | 7 ++++--- .../dhp/schema/sx/api/model/v1/ScholixItem.java | 9 +++++---- .../schema/sx/api/model/v1/ScholixProvider.java | 12 +++++++----- .../sx/api/model/v1/ScholixRelationship.java | 10 ++++++---- .../dhp/schema/sx/api/model/v1/ScholixV1.java | 12 +++++++----- .../sx/api/model/v2/LinkProviderType.java | 10 ++++++---- .../schema/sx/api/model/v2/PageResultType.java | 12 +++++++----- .../sx/api/model/v2/RelationshipType.java | 12 +++++++----- .../sx/api/model/v2/ScholixCreatorType.java | 12 +++++++----- .../sx/api/model/v2/ScholixIdentifierType.java | 5 +++-- .../schema/sx/api/model/v2/ScholixItemType.java | 7 ++++--- .../api/model/v2/ScholixLinkProviderType.java | 14 ++++++++------ .../dhp/schema/sx/api/model/v2/ScholixType.java | 12 +++++++----- .../schema/sx/api/model/v3/ScholixItemType.java | 17 ++++++++++------- .../dhp/schema/sx/api/model/v3/ScholixType.java | 12 +++++++----- .../dnetlib/dhp/schema/sx/scholix/Scholix.java | 4 ++-- .../schema/sx/scholix/ScholixCollectedFrom.java | 4 ++-- .../schema/sx/scholix/ScholixComparator.java | 1 + .../dhp/schema/sx/scholix/ScholixEntityId.java | 7 ++++--- .../schema/sx/scholix/ScholixIdentifier.java | 5 +++-- .../schema/sx/scholix/ScholixRelationship.java | 5 +++-- .../dhp/schema/sx/scholix/ScholixResource.java | 4 ++-- .../schema/sx/scholix/ScholixCompareTest.java | 8 +++++--- 26 files changed, 129 insertions(+), 93 deletions(-) diff --git a/pom.xml b/pom.xml index 1b691d5..25f81dc 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.30-SNAPSHOT + 2.10.30-SCHOLEXPLORER-SNAPSHOT diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java index 91c3f97..3582da3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java @@ -1,11 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import java.util.Objects; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; public class LinkPublisher { @NotBlank @@ -94,4 +96,4 @@ public class LinkPublisher { } return o.toString().replace("\n", "\n "); } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java index da53442..d0c9943 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java @@ -1,12 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixCreator { @JsonProperty("name") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java index 752aa82..167230b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java @@ -1,10 +1,11 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixIdentifier { @JsonProperty("identifier") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java index bd84344..a98f780 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java @@ -1,14 +1,15 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixItem { @JsonProperty("identifiers") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java index fd700ef..58c8af9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java @@ -1,15 +1,17 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.Valid; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixProvider { public static ScholixProvider fromScholixEntityId(final ScholixEntityId provider) { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java index 4d357f2..0337253 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java @@ -1,12 +1,14 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import static eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType.relationMapping; -import javax.validation.constraints.NotBlank; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType.relationMapping; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; public class ScholixRelationship { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java index 3cd3e7b..ac28653 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java @@ -1,16 +1,18 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.Scholix; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixV1 implements Serializable { @JsonProperty("linkProvider") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java index 01c9adb..510d53e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java @@ -1,11 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import java.util.Objects; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; /** * The type Link provider type. @@ -120,4 +122,4 @@ public class LinkProviderType { } return o.toString().replace("\n", "\n "); } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java index 8ebbbf5..f804865 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The main class that show the page result from the method * /l2/links diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java index a6f37a5..8dd4545 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotNull; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Relationship type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java index e06f9c2..6e5713a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix creator type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java index e85dcd4..a6f0dec 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; +import javax.validation.constraints.NotBlank; + import com.fasterxml.jackson.annotation.JsonProperty; + import eu.dnetlib.dhp.schema.sx.scholix.ScholixIdentifier; import io.swagger.v3.oas.annotations.media.Schema; -import javax.validation.constraints.NotBlank; - /** * The type Scholix identifier type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java index a053d13..d86da31 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java @@ -1,12 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; - import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + /** * The type Scholix item type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java index 7b7acb6..f2a5afb 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix link provider type. */ @@ -83,4 +85,4 @@ public class ScholixLinkProviderType { } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java index 0306120..ed05a27 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.Scholix; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java index 0fb6a65..11162ef 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java @@ -1,15 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v3; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixCreatorType; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixIdentifierType; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; - import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixCreatorType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixIdentifierType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + /** * The type Scholix item type. */ @@ -184,7 +185,9 @@ public class ScholixItemType { if (input == null) return null; final ScholixItemType instance = new ScholixItemType(); - instance.setType("publication".equalsIgnoreCase(input.getObjectType())?"literature": "dataset"); + instance.setType(input.getObjectType()); + instance.setSubType(input.getObjectSubType()); +// instance.setType("publication".equalsIgnoreCase(input.getObjectType())?"literature": "dataset"); instance.setTitle(input.getTitle()); if (input.getIdentifier()!= null) diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java index aa41988..90722a5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java @@ -1,16 +1,18 @@ package eu.dnetlib.dhp.schema.sx.api.model.v3; +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +import javax.validation.constraints.NotBlank; + import com.fasterxml.jackson.annotation.JsonProperty; + import eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType; import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; import eu.dnetlib.dhp.schema.sx.scholix.Scholix; import io.swagger.v3.oas.annotations.media.Schema; -import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.util.List; -import java.util.stream.Collectors; - /** * The type Scholix type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java index 95338ea..ec8bcc9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java @@ -1,14 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class Scholix implements Serializable, Comparable { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java index cd415de..832617d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java @@ -1,12 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class ScholixCollectedFrom implements Serializable, Comparable { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java index 55c7c0e..f71c9b5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.stream.Stream; import com.google.common.collect.Iterators; + import me.xuender.unidecode.Unidecode; public class ScholixComparator { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java index 266b946..3753e6d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java @@ -1,8 +1,7 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import com.google.common.collect.Iterators; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; import java.io.Serializable; import java.util.List; @@ -10,7 +9,9 @@ import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; +import org.apache.commons.lang3.StringUtils; + +import com.google.common.collect.Iterators; public class ScholixEntityId implements Serializable, Comparable { private String name; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java index f8b0cf1..9e1a0a2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeIdnetifier; + import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeIdnetifier; +import org.apache.commons.lang3.StringUtils; /** * The type Scholix identifier. diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java index deeaab8..f05a16d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; + +import org.apache.commons.lang3.StringUtils; public class ScholixRelationship implements Serializable, Comparable { private String name; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index d7b61ad..55ef84e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -1,14 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class ScholixResource implements Serializable, Comparable { diff --git a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java index 2762873..cf534c9 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java @@ -1,12 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; + +import org.junit.jupiter.api.Test; public class ScholixCompareTest {