new_model_for_communities #15

Merged
michele.artini merged 81 commits from new_model_for_communities into master 2023-10-24 08:12:26 +02:00
4 changed files with 42 additions and 2 deletions
Showing only changes of commit eeef1df437 - Show all commits

View File

@ -159,6 +159,8 @@ public class CommunityDetails extends CommunitySummary {
.append(zenodoCommunity)
.append(",\n\tsuggestedAcknowledgements = ")
.append(suggestedAcknowledgements)
.append(",\n\tplan = ")
.append(plan)
.append("\n]");
return builder.toString();
}

View File

@ -48,6 +48,9 @@ public class CommunitySummary {
@Schema(description = "Zenodo community associated to this community")
protected String zenodoCommunity;
@Schema(description = "community plan")
protected String plan;
public CommunitySummary() {}
public CommunitySummary(
@ -61,7 +64,8 @@ public class CommunitySummary {
final String description,
final String logoUrl,
final CommunityStatus status,
final String zenodoCommunity) {
final String zenodoCommunity,
final String plan) {
this.id = id;
this.queryId = queryId;
this.type = type;
@ -73,6 +77,7 @@ public class CommunitySummary {
this.logoUrl = logoUrl;
this.status = status;
this.zenodoCommunity = zenodoCommunity;
this.plan = plan;
}
public CommunitySummary(final CommunitySummary summary) {
@ -86,7 +91,8 @@ public class CommunitySummary {
summary.getDescription(),
summary.getLogoUrl(),
summary.getStatus(),
summary.getZenodoCommunity());
summary.getZenodoCommunity(),
summary.getPlan());
}
public String getId() {
@ -193,4 +199,12 @@ public class CommunitySummary {
this.zenodoCommunity = zenodoCommunity;
}
public String getPlan() {
return plan;
}
public void setPlan(final String plan) {
this.plan = plan;
}
}

View File

@ -55,6 +55,9 @@ public class CommunityWritableProperties {
@Schema(description = "type of supported claim")
private CommunityClaimType claim;
@Schema(description = "community plan")
private String plan;
public List<String> getFos() {
return fos;
}
@ -174,4 +177,12 @@ public class CommunityWritableProperties {
public void setOtherZenodoCommunities(final List<String> otherZenodoCommunities) {
this.otherZenodoCommunities = otherZenodoCommunities;
}
public String getPlan() {
return plan;
}
public void setPlan(final String plan) {
this.plan = plan;
}
}

View File

@ -32,6 +32,9 @@ public class SubCommunity {
@Schema(description = "it supports the claims", required = true)
private boolean claim = false;
@Schema(description = "it is browsable", required = true)
private boolean browsable = false;
public String getSubCommunityId() {
return subCommunityId;
}
@ -88,6 +91,14 @@ public class SubCommunity {
this.claim = claim;
}
public boolean isBrowsable() {
return browsable;
}
public void setBrowsable(final boolean browsable) {
this.browsable = browsable;
}
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
@ -105,6 +116,8 @@ public class SubCommunity {
.append(params)
.append(",\n\tclaim = ")
.append(claim)
.append(",\n\tbrowsable = ")
.append(browsable)
.append("\n]");
return builder.toString();
}