Skip to content

Commit

Permalink
EA-3236 refractor and remove unnecssary classes
Browse files Browse the repository at this point in the history
  • Loading branch information
SrishtiSingh-eu committed Sep 12, 2023
1 parent b439dac commit b39fa60
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class ProvidedCHO extends ObjectMetadata {
private Aggregation isAggregatedBy;


@Property("agents")
private List<Agent> agents;

public ProvidedCHO() {
}

Expand All @@ -45,45 +42,33 @@ public String getContext() {
return EDM_CONTEXT;
}

public ObjectId getDbId() {
return dbId;
}

public void setDbId(ObjectId dbId) {
this.dbId = dbId;
}

@JsonGetter(ID)
public String getId() {
public String getID()
{
return id;
}

@JsonSetter(ID)
public void setId(String id) {
public void setID(String id)
{
this.id = id;
}

public List<Proxy> getProxies() {
return proxies;
}

public void setProxies(List<Proxy> proxies) {
this.proxies = proxies;
}

public Aggregation getIsAggregatedBy() {
return this.isAggregatedBy;
public List<Proxy> getProxies()
{
return this.proxies;
}

public void setIsAggregatedBy(Aggregation isAggregatedBy) {
this.isAggregatedBy = isAggregatedBy;
public Aggregation getIsAggregatedBy()
{
return isAggregatedBy;
}

public List<? extends ContextualEntity> getAgents() {
return agents;
public void setIsAggregatedBy(Aggregation aggr)
{
isAggregatedBy = aggr;
}

public void setAgents(List<? extends ContextualEntity> agents) {
this.agents = (List<Agent>) agents;
public void addProxy(Proxy proxy) {
this.proxies.add(proxy);
proxy.setProxyFor(this);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package eu.europeana.api.record.model.entity;

import dev.morphia.annotations.Entity;
import eu.europeana.api.record.model.ContextualEntity;

@Entity(value = "ContextualEntity", discriminator = "Agent", discriminatorKey = "type")
public class Agent extends ContextualEntity {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package eu.europeana.api.record.model;
package eu.europeana.api.record.model.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import dev.morphia.annotations.Entity;
import eu.europeana.api.record.model.EDMObject;
import eu.europeana.api.record.model.data.Literal;
import eu.europeana.api.record.model.internal.LanguageMap;

Expand Down Expand Up @@ -34,7 +35,6 @@ public void addPrefLabel(Literal<String> label) {
getPrefLabel().add(label);
}


private LanguageMap getPrefLabel() {
if (this.prefLabel == null) {
this.prefLabel = new LanguageMap();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package eu.europeana.api.record.model.entity;

import dev.morphia.annotations.Entity;
import eu.europeana.api.record.model.ContextualEntity;

@Entity(value = "ContextualEntity", discriminator = "Place", discriminatorKey = "type")
public class Place extends ContextualEntity
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b39fa60

Please sign in to comment.