Skip to content

Commit

Permalink
Merge branch 'develop' into EA-3957-insert-multiple-items
Browse files Browse the repository at this point in the history
  • Loading branch information
SrdjanStevanetic committed Oct 31, 2024
2 parents 674b818 + f0b494a commit eace0cc
Show file tree
Hide file tree
Showing 47 changed files with 1,408 additions and 706 deletions.
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.europeana.set</groupId>
<artifactId>set-api</artifactId>
<version>${revision}</version>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>User sets API</name>
<description>User Sets API - API for curating collections by end users</description>
Expand Down Expand Up @@ -38,7 +38,6 @@
</repositories>

<properties>
<revision>1.0</revision>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand All @@ -48,7 +47,7 @@
<java.17.addopens>--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
</java.17.addopens>
<version.commonsApi>0.4</version.commonsApi>
<version.commonsApi>0.4.3-SNAPSHOT</version.commonsApi>
<version.springBoot>2.5.14</version.springBoot>

<!-- overwrite version defined in spring boot parent pom -->
Expand Down
6 changes: 3 additions & 3 deletions set-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>eu.europeana.set</groupId>
<artifactId>set-api</artifactId>
<relativePath>../pom.xml</relativePath>
<version>${revision}</version>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>set-client</artifactId>
<packaging>jar</packaging>
Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>eu.europeana.set</groupId>
<artifactId>set-definitions</artifactId>
<version>${project.version}</version>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>eu.europeana.set</groupId>
<artifactId>set-common</artifactId>
<version>${project.version}</version>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions set-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>set-api</artifactId>
<groupId>eu.europeana.set</groupId>
<relativePath>../pom.xml</relativePath>
<version>${revision}</version>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -33,7 +33,7 @@
<dependency>
<groupId>eu.europeana.set</groupId>
<artifactId>set-definitions</artifactId>
<version>${project.version}</version>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions set-definitions/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand All @@ -7,7 +7,7 @@
<artifactId>set-api</artifactId>
<groupId>eu.europeana.set</groupId>
<relativePath>../pom.xml</relativePath>
<version>${revision}</version>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>set-definitions</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package eu.europeana.set.definitions.model;

import java.util.Objects;

public class BaseWebResource {

public static final String TYPE = "WebResource";
private String source;
private String id;
private String thumbnail;

public BaseWebResource() {
super();
}

public BaseWebResource(BaseWebResource copy) {
this.source = copy.getSource();
this.id = copy.getId();
this.thumbnail = copy.getThumbnail();
}

public BaseWebResource(String id, String source, String thumbnail) {
this.id = id;
this.source = source;
this.thumbnail = thumbnail;
}

public String getId() {
return id;
}

public String getSource() {
return source;
}

public String getThumbnail() {
return thumbnail;
}

public String getType() {
return TYPE;
}

public void setThumbnail(String thumbnailParam) {
thumbnail = thumbnailParam;
}

public void setSource(String sourceParam) {
source = sourceParam;
}

public void setId(String idParam) {
id = idParam;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

BaseWebResource that = (BaseWebResource) o;

return Objects.equals(source, that.getSource())
&& id.equals(that.getId())
&& Objects.equals(thumbnail, that.getThumbnail());
}

public int hashCode() {
int result = (id == null) ? 0 : id.hashCode();
result += (thumbnail == null) ? 0 : thumbnail.hashCode();
result += (source == null) ? 0 : source.hashCode();
return result;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ public interface UserSet extends PageInfo {
Provider getProvider();

boolean hasItem(String itemId);

void setIsShownBy(BaseWebResource isShownBy);

BaseWebResource getIsShownBy();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Date;
import java.util.List;
import java.util.Map;
import eu.europeana.set.definitions.model.BaseWebResource;
import eu.europeana.set.definitions.model.UserSet;
import eu.europeana.set.definitions.model.agent.Agent;
import eu.europeana.set.definitions.model.vocabulary.UserSetTypes;
Expand Down Expand Up @@ -54,6 +55,11 @@ public abstract class BaseUserSet extends BasePageInfo implements UserSet {
* of this set of the Entity user sets
*/
private List<String> contributor;

/**
* depiction, primarily used y Galleries
*/
private BaseWebResource isShownBy;

/**
* Indicates whether the set is generated by a User as opposed to more
Expand Down Expand Up @@ -320,4 +326,14 @@ public Provider getProvider() {
public void setProvider(Provider provider) {
this.provider = provider;
}

@Override
public BaseWebResource getIsShownBy() {
return isShownBy;
}

@Override
public void setIsShownBy(BaseWebResource isShownBy) {
this.isShownBy = isShownBy;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,9 @@ public interface UserSetQuery extends Query{
void setTitleLang(String lang);

String getTitleLang();

void setCollectionType(String collectionType);

String getCollectionType();

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class UserSetQueryImpl extends QueryImpl implements UserSetQuery{
String text;
String provider;
String titleLang;
String collectionType;

@Override
public String getUser() {
Expand Down Expand Up @@ -126,4 +127,14 @@ public void setTitleLang(String lang) {
public String getTitleLang() {
return titleLang;
}

@Override
public String getCollectionType() {
return collectionType;
}

@Override
public void setCollectionType(String collectionType) {
this.collectionType = collectionType;
}
}
Loading

0 comments on commit eace0cc

Please sign in to comment.