Skip to content

Commit

Permalink
Merge pull request #7 from orppst/ARE-list-submitted
Browse files Browse the repository at this point in the history
Are list submitted
  • Loading branch information
AllanEngland authored Dec 4, 2024
2 parents 3ec22af + bca0ea6 commit 57ad088
Showing 1 changed file with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package org.orph2020.pst.common.json;

/*
Ancillary class to contain more information about submitted proposals than the ObjectIdentifier class
basically the equivalent thing for submitted proposals as ProposalSynopsis is for source proposals.
*/

import org.ivoa.dm.proposal.prop.AbstractProposal;
import org.ivoa.dm.proposal.prop.ProposalKind;

import java.util.Date;


public class SubmittedProposalSynopsis {

//code / db id
public long code;

//title
public String title;

//summary
public String summary;

//kind (of observation - see enum)
public ProposalKind kind;

//source proposal id
public long sourceProposalId;

//cycle id - the observing cycle it's been submitted to.
public long cycleId;

//submission date
public Date submissionDate;

//The current review status
public String reviewStatus;


public SubmittedProposalSynopsis(long code, String title, String summary, ProposalKind kind, long sourceProposalId, long cycleId, Date submissionDate, String reviewStatus)
{
this.code = code;
this.title = title;
this.summary = summary;
this.kind = kind;
this.sourceProposalId = sourceProposalId;
this.cycleId = cycleId;
this.submissionDate = submissionDate;
this.reviewStatus = reviewStatus;
}


public SubmittedProposalSynopsis(AbstractProposal submittedProposal)
{
this.code = submittedProposal.getId();
this.title = submittedProposal.getTitle();
this.summary = submittedProposal.getSummary();
this.kind = submittedProposal.getKind();
if(!submittedProposal.getRelatedProposals().isEmpty())
this.sourceProposalId = submittedProposal.getRelatedProposals().get(0).getId();
//TODO: Populate cycleID and reviewStatus
this.reviewStatus = "UNKNOWN";
}

public SubmittedProposalSynopsis() {}

}

0 comments on commit 57ad088

Please sign in to comment.