Package org.ivoa.dm.proposal.management
Class ProposalCycle
java.lang.Object
org.ivoa.dm.proposal.management.ProposalCycle
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposalManagement:ProposalCycle",
role=objectType)
public class ProposalCycle
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Defines collection of resources and proposals for a particular observing season.
objectType: ProposalCycle
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for ProposalCycle, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected List<AllocatedProposal>
the proposals that have been successful and allocated time.protected AvailableResources
.protected String
pointer to more detailed instructions about the cycle.protected Date
the end date of the observing cycle.protected Date
the start date of the observing cycle.protected Observatory
ReferenceObject observatory : .protected List<ObservingMode>
the possible observing modes offered in the cycle.protected List<AllocationGrade>
The possible grades that can be allocated for this cycle.protected Date
the date by which observing proposals must be submitted to be considered for this cycle.protected List<SubmittedProposal>
the proposals that have been submitted in this cycle.protected TAC
The time allocation committee.protected String
a human readable description of the cycle. -
Constructor Summary
ConstructorDescriptionCreates a new ProposalCycleProposalCycle
(Observatory observatory, String title, String instructions, Date submissionDeadline, Date observationSessionStart, Date observationSessionEnd, List<ObservingMode> observingModes, AvailableResources availableResources, List<AllocationGrade> possibleGrades, TAC tac, List<SubmittedProposal> submittedProposals, List<AllocatedProposal> allocatedProposals) full parameter constructor.ProposalCycle
(ProposalCycle other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.management.AllocatedProposal to the composition.void
Add a org.ivoa.dm.proposal.management.ObservingMode to the composition.void
Add a org.ivoa.dm.proposal.management.AllocationGrade to the composition.void
Add a org.ivoa.dm.proposal.management.SubmittedProposal to the composition.static ProposalCycle
create a ProposalCycle in functional builder style.void
Returns allocatedProposals composition as an immutable list.Returns availableResources Attribute.getId()
Returns instructions Attribute.Returns observationSessionEnd Attribute.Returns observationSessionStart Attribute.Returns observatory ReferenceReturns observingModes composition as an immutable list.Returns possibleGrades composition as an immutable list.Returns submissionDeadline Attribute.Returns submittedProposals composition as an immutable list.getTac()
Returns tac Attribute.getTitle()
Returns title Attribute.void
persistRefs
(jakarta.persistence.EntityManager _em) Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.void
Remove a org.ivoa.dm.proposal.management.AllocatedProposal from the composition.void
Remove a org.ivoa.dm.proposal.management.ObservingMode from the composition.void
Remove a org.ivoa.dm.proposal.management.AllocationGrade from the composition.void
Remove a org.ivoa.dm.proposal.management.SubmittedProposal from the composition.void
update a org.ivoa.dm.proposal.management.AllocatedProposal in the composition.void
update a org.ivoa.dm.proposal.management.ObservingMode in the composition.void
update a org.ivoa.dm.proposal.management.AllocationGrade in the composition.void
update a org.ivoa.dm.proposal.management.SubmittedProposal in the composition.void
setAllocatedProposals
(List<AllocatedProposal> pAllocatedProposals) Defines whole allocatedProposals composition.void
setAvailableResources
(AvailableResources pAvailableResources) Set availableResources Attribute.void
setInstructions
(String pInstructions) Set instructions Attribute.void
setObservationSessionEnd
(Date pObservationSessionEnd) Set observationSessionEnd Attribute.void
setObservationSessionStart
(Date pObservationSessionStart) Set observationSessionStart Attribute.void
setObservatory
(Observatory pObservatory) Defines observatory Referencevoid
setObservingModes
(List<ObservingMode> pObservingModes) Defines whole observingModes composition.void
setPossibleGrades
(List<AllocationGrade> pPossibleGrades) Defines whole possibleGrades composition.void
setSubmissionDeadline
(Date pSubmissionDeadline) Set submissionDeadline Attribute.void
setSubmittedProposals
(List<SubmittedProposal> pSubmittedProposals) Defines whole submittedProposals composition.void
Set tac Attribute.void
Set title Attribute.void
updates any cloned references that are contained within the hierarchy.void
updateUsing
(ProposalCycle other) Update this object with the content of the given object.withAvailableResources
(AvailableResources pAvailableResources) fluent setter for availableResources Attribute.withInstructions
(String pInstructions) fluent setter for instructions Attribute.withObservationSessionEnd
(Date pObservationSessionEnd) fluent setter for observationSessionEnd Attribute.withObservationSessionStart
(Date pObservationSessionStart) fluent setter for observationSessionStart Attribute.withSubmissionDeadline
(Date pSubmissionDeadline) fluent setter for submissionDeadline Attribute.fluent setter for tac Attribute.fluent setter for title Attribute.
-
Field Details
-
_id
inserted database key -
title
@VoDml(id="proposalManagement:ProposalCycle.title", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String titlea human readable description of the cycle. : Attribute title : multiplicity 1 -
instructions
@VoDml(id="proposalManagement:ProposalCycle.instructions", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String instructionspointer to more detailed instructions about the cycle. : Attribute instructions : multiplicity 0..1 -
submissionDeadline
@VoDml(id="proposalManagement:ProposalCycle.submissionDeadline", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date submissionDeadlinethe date by which observing proposals must be submitted to be considered for this cycle. : Attribute submissionDeadline : multiplicity 0..1 -
observationSessionStart
@VoDml(id="proposalManagement:ProposalCycle.observationSessionStart", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date observationSessionStartthe start date of the observing cycle. : Attribute observationSessionStart : multiplicity 1 -
observationSessionEnd
@VoDml(id="proposalManagement:ProposalCycle.observationSessionEnd", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date observationSessionEndthe end date of the observing cycle. : Attribute observationSessionEnd : multiplicity 1 -
observingModes
@VoDml(id="proposalManagement:ProposalCycle.observingModes", role=composition, type="proposalManagement:ObservingMode", typeRole=objectType) protected List<ObservingMode> observingModesthe possible observing modes offered in the cycle. composition observingModes : ( Multiplicity : 1..* ) -
availableResources
@VoDml(id="proposalManagement:ProposalCycle.availableResources", role=composition, type="proposalManagement:AvailableResources", typeRole=objectType) protected AvailableResources availableResources. composition availableResources : ( Multiplicity : 1 ) -
possibleGrades
@VoDml(id="proposalManagement:ProposalCycle.possibleGrades", role=composition, type="proposalManagement:AllocationGrade", typeRole=objectType) protected List<AllocationGrade> possibleGradesThe possible grades that can be allocated for this cycle. composition possibleGrades : ( Multiplicity : 1..* ) -
tac
@VoDml(id="proposalManagement:ProposalCycle.tac", role=composition, type="proposalManagement:TAC", typeRole=objectType) protected TAC tacThe time allocation committee. composition tac : ( Multiplicity : 1 ) -
submittedProposals
@VoDml(id="proposalManagement:ProposalCycle.submittedProposals", role=composition, type="proposalManagement:SubmittedProposal", typeRole=objectType) protected List<SubmittedProposal> submittedProposalsthe proposals that have been submitted in this cycle. composition submittedProposals : ( Multiplicity : 0..* ) -
allocatedProposals
@VoDml(id="proposalManagement:ProposalCycle.allocatedProposals", role=composition, type="proposalManagement:AllocatedProposal", typeRole=objectType) protected List<AllocatedProposal> allocatedProposalsthe proposals that have been successful and allocated time. composition allocatedProposals : ( Multiplicity : 0..* ) -
observatory
@VoDml(id="proposalManagement:ProposalCycle.observatory", role=reference, type="proposalManagement:Observatory", typeRole=objectType) protected Observatory observatoryReferenceObject observatory : . ( Multiplicity : 1 )
-
-
Constructor Details
-
ProposalCycle
public ProposalCycle()Creates a new ProposalCycle -
ProposalCycle
public ProposalCycle(Observatory observatory, String title, String instructions, Date submissionDeadline, Date observationSessionStart, Date observationSessionEnd, List<ObservingMode> observingModes, AvailableResources availableResources, List<AllocationGrade> possibleGrades, TAC tac, List<SubmittedProposal> submittedProposals, List<AllocatedProposal> allocatedProposals) full parameter constructor.- Parameters:
observatory
- .title
- a human readable description of the cycle.instructions
- pointer to more detailed instructions about the cycle.submissionDeadline
- the date by which observing proposals must be submitted to be considered for this cycle.observationSessionStart
- the start date of the observing cycle.observationSessionEnd
- the end date of the observing cycle.observingModes
- the possible observing modes offered in the cycle.availableResources
- .possibleGrades
- The possible grades that can be allocated for this cycle.tac
- The time allocation committee.submittedProposals
- the proposals that have been submitted in this cycle.allocatedProposals
- the proposals that have been successful and allocated time.
-
ProposalCycle
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
- Returns:
- the id
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy. -
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
getObservatory
Returns observatory Reference- Returns:
- observatory Reference
-
setObservatory
Defines observatory Reference- Parameters:
pObservatory
- reference to set
-
getTitle
Returns title Attribute.- Returns:
- title Attribute
-
setTitle
Set title Attribute.- Parameters:
pTitle
- value to set
-
withTitle
fluent setter for title Attribute.- Parameters:
pTitle
- value to set- Returns:
- ProposalCycle
-
getInstructions
Returns instructions Attribute.- Returns:
- instructions Attribute
-
setInstructions
Set instructions Attribute.- Parameters:
pInstructions
- value to set
-
withInstructions
fluent setter for instructions Attribute.- Parameters:
pInstructions
- value to set- Returns:
- ProposalCycle
-
getSubmissionDeadline
Returns submissionDeadline Attribute.- Returns:
- submissionDeadline Attribute
-
setSubmissionDeadline
Set submissionDeadline Attribute.- Parameters:
pSubmissionDeadline
- value to set
-
withSubmissionDeadline
fluent setter for submissionDeadline Attribute.- Parameters:
pSubmissionDeadline
- value to set- Returns:
- ProposalCycle
-
getObservationSessionStart
Returns observationSessionStart Attribute.- Returns:
- observationSessionStart Attribute
-
setObservationSessionStart
Set observationSessionStart Attribute.- Parameters:
pObservationSessionStart
- value to set
-
withObservationSessionStart
fluent setter for observationSessionStart Attribute.- Parameters:
pObservationSessionStart
- value to set- Returns:
- ProposalCycle
-
getObservationSessionEnd
Returns observationSessionEnd Attribute.- Returns:
- observationSessionEnd Attribute
-
setObservationSessionEnd
Set observationSessionEnd Attribute.- Parameters:
pObservationSessionEnd
- value to set
-
withObservationSessionEnd
fluent setter for observationSessionEnd Attribute.- Parameters:
pObservationSessionEnd
- value to set- Returns:
- ProposalCycle
-
getObservingModes
Returns observingModes composition as an immutable list.- Returns:
- observingModes composition.
-
setObservingModes
Defines whole observingModes composition.- Parameters:
pObservingModes
- composition to set.
-
addToObservingModes
Add a org.ivoa.dm.proposal.management.ObservingMode to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.ObservingMode to add
-
removeFromObservingModes
Remove a org.ivoa.dm.proposal.management.ObservingMode from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.ObservingMode to remove
-
replaceInObservingModes
update a org.ivoa.dm.proposal.management.ObservingMode in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.management.ObservingMode to update the match is done via the database key
-
getAvailableResources
Returns availableResources Attribute.- Returns:
- availableResources Attribute
-
setAvailableResources
Set availableResources Attribute.- Parameters:
pAvailableResources
- value to set
-
withAvailableResources
fluent setter for availableResources Attribute.- Parameters:
pAvailableResources
- value to set- Returns:
- ProposalCycle
-
getPossibleGrades
Returns possibleGrades composition as an immutable list.- Returns:
- possibleGrades composition.
-
setPossibleGrades
Defines whole possibleGrades composition.- Parameters:
pPossibleGrades
- composition to set.
-
addToPossibleGrades
Add a org.ivoa.dm.proposal.management.AllocationGrade to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.AllocationGrade to add
-
removeFromPossibleGrades
Remove a org.ivoa.dm.proposal.management.AllocationGrade from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.AllocationGrade to remove
-
replaceInPossibleGrades
update a org.ivoa.dm.proposal.management.AllocationGrade in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.management.AllocationGrade to update the match is done via the database key
-
getTac
Returns tac Attribute.- Returns:
- tac Attribute
-
setTac
Set tac Attribute.- Parameters:
pTac
- value to set
-
withTac
fluent setter for tac Attribute.- Parameters:
pTac
- value to set- Returns:
- ProposalCycle
-
getSubmittedProposals
Returns submittedProposals composition as an immutable list.- Returns:
- submittedProposals composition.
-
setSubmittedProposals
Defines whole submittedProposals composition.- Parameters:
pSubmittedProposals
- composition to set.
-
addToSubmittedProposals
Add a org.ivoa.dm.proposal.management.SubmittedProposal to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.SubmittedProposal to add
-
removeFromSubmittedProposals
Remove a org.ivoa.dm.proposal.management.SubmittedProposal from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.SubmittedProposal to remove
-
replaceInSubmittedProposals
update a org.ivoa.dm.proposal.management.SubmittedProposal in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.management.SubmittedProposal to update the match is done via the database key
-
getAllocatedProposals
Returns allocatedProposals composition as an immutable list.- Returns:
- allocatedProposals composition.
-
setAllocatedProposals
Defines whole allocatedProposals composition.- Parameters:
pAllocatedProposals
- composition to set.
-
addToAllocatedProposals
Add a org.ivoa.dm.proposal.management.AllocatedProposal to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.AllocatedProposal to add
-
removeFromAllocatedProposals
Remove a org.ivoa.dm.proposal.management.AllocatedProposal from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.AllocatedProposal to remove
-
replaceInAllocatedProposals
update a org.ivoa.dm.proposal.management.AllocatedProposal in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.management.AllocatedProposal to update the match is done via the database key
-
createProposalCycle
create a ProposalCycle in functional builder style.- Parameters:
f
- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoad
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
persistRefs
Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.- Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-