Skip to content

Commit

Permalink
Merge branch 'develop' into EA-3956-3948_Galleries_isShownBy
Browse files Browse the repository at this point in the history
  • Loading branch information
SrdjanStevanetic committed Oct 25, 2024
2 parents aee5a71 + 417fa26 commit fec06f8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class WebUserSetFields extends WebUserSetModelFields {
public static final String TEXT_SCORE_SORT = "score";

// JsonLd Constants
public static final String CONTEXT = "http://www.europeana.eu/schemas/context/collection.jsonld";
public static final String CONTEXT = "https://api.europeana.eu/schema/context/set.jsonld";
public static final String CONTEXT_FIELD = "@context";
public static final String IDENTIFIER = "identifier";
public static final String TITLE = "title";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"http://data.europeana.eu/item/08641/1037479000000476467",
"http://data.europeana.eu/item/08641/1037479000000476875"
],
"@context": "http://www.europeana.eu/schemas/context/collection.jsonld",
"@context": "https://api.europeana.eu/schema/context/set.jsonld",
"id":"http://data.europeana.eu/set/1",
"created": "2020-08-28T13:43:07Z",
"modified": "2020-08-28T13:44:48Z",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@context": "http://www.europeana.eu/schemas/context/collection.jsonld",
"@context": "https://api.europeana.eu/schema/context/set.jsonld",
"type": "EntityBestItemsSet",
"title":{
"en": "Sport - best items"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@context":"http://www.europeana.eu/schemas/context/collection.jsonld",
"@context":"https://api.europeana.eu/schema/context/set.jsonld",
"type":"Collection",
"title":{
"en":"SGoaB Test Dataset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.List;
import javax.annotation.Resource;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.core.Authentication;
import org.springframework.test.context.DynamicPropertyRegistry;
Expand Down Expand Up @@ -54,7 +53,10 @@ static void setProperties(DynamicPropertyRegistry registry) {
registry.add("mongodb.set.connectionUrl", () -> "mongodb://127.0.0.1:27017/set_test");
}

@Test
/*
* Generate isShownBy field for all sets in the (local) db
*/
//@Test
public void generateGalleriesWithDepiction() throws Exception {
createTestUserSet(USER_SET_REGULAR, regularUserToken);

Expand Down Expand Up @@ -87,7 +89,6 @@ public void generateGalleriesWithDepiction() throws Exception {

}


private void generateDepictions(List<? extends UserSet> results) {
for (UserSet userSet : results) {
final WebResource isShownBy = generateGalleryDepiction(userSet);
Expand All @@ -100,7 +101,6 @@ private void generateDepictions(List<? extends UserSet> results) {
}
}


private WebResource generateGalleryDepiction(UserSet userSet){
if(userSet.isOpenSet() || userSet.isBookmarksFolder() || userSet.isEntityBestItemsSet()) {
//bookmarks and entity best items sets is redundant, but we keep it for future
Expand All @@ -117,14 +117,9 @@ private WebResource generateGalleryDepiction(UserSet userSet){
return null;
}
}





private boolean hasNext(final int pageSize, ResultSet<? extends UserSet> results) {
return results.getResultSize() < pageSize;
}


}

0 comments on commit fec06f8

Please sign in to comment.