Skip to content

Commit

Permalink
Merge pull request #264 from europeana/EA-3956-3948_Galleries_isShownBy
Browse files Browse the repository at this point in the history
search galleries, generate depiction, fix creation of indices #EA-3956 #EA-3948
  • Loading branch information
gsergiu authored Oct 28, 2024
2 parents 43e5914 + fec06f8 commit e112fe0
Show file tree
Hide file tree
Showing 32 changed files with 1,317 additions and 670 deletions.
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 e112fe0

Please sign in to comment.