-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from orppst/ARE-list-submitted
Are list submitted
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
src/main/java/org/orph2020/pst/common/json/SubmittedProposalSynopsis.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} | ||
|
||
} |