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
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • title

      @VoDml(id="proposalManagement:ProposalCycle.title", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String title
      a 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 instructions
      pointer 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 submissionDeadline
      the 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 observationSessionStart
      the 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 observationSessionEnd
      the 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> observingModes
      the 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> possibleGrades
      The 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 tac
      The time allocation committee. composition tac : ( Multiplicity : 1 )
    • submittedProposals

      @VoDml(id="proposalManagement:ProposalCycle.submittedProposals", role=composition, type="proposalManagement:SubmittedProposal", typeRole=objectType) protected List<SubmittedProposal> submittedProposals
      the 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> allocatedProposals
      the 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 observatory
      ReferenceObject 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

      public ProposalCycle(ProposalCycle other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(ProposalCycle other)
      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

      public Observatory getObservatory()
      Returns observatory Reference
      Returns:
      observatory Reference
    • setObservatory

      public void setObservatory(Observatory pObservatory)
      Defines observatory Reference
      Parameters:
      pObservatory - reference to set
    • getTitle

      public String getTitle()
      Returns title Attribute.
      Returns:
      title Attribute
    • setTitle

      public void setTitle(String pTitle)
      Set title Attribute.
      Parameters:
      pTitle - value to set
    • withTitle

      public ProposalCycle withTitle(String pTitle)
      fluent setter for title Attribute.
      Parameters:
      pTitle - value to set
      Returns:
      ProposalCycle
    • getInstructions

      public String getInstructions()
      Returns instructions Attribute.
      Returns:
      instructions Attribute
    • setInstructions

      public void setInstructions(String pInstructions)
      Set instructions Attribute.
      Parameters:
      pInstructions - value to set
    • withInstructions

      public ProposalCycle withInstructions(String pInstructions)
      fluent setter for instructions Attribute.
      Parameters:
      pInstructions - value to set
      Returns:
      ProposalCycle
    • getSubmissionDeadline

      public Date getSubmissionDeadline()
      Returns submissionDeadline Attribute.
      Returns:
      submissionDeadline Attribute
    • setSubmissionDeadline

      public void setSubmissionDeadline(Date pSubmissionDeadline)
      Set submissionDeadline Attribute.
      Parameters:
      pSubmissionDeadline - value to set
    • withSubmissionDeadline

      public ProposalCycle withSubmissionDeadline(Date pSubmissionDeadline)
      fluent setter for submissionDeadline Attribute.
      Parameters:
      pSubmissionDeadline - value to set
      Returns:
      ProposalCycle
    • getObservationSessionStart

      public Date getObservationSessionStart()
      Returns observationSessionStart Attribute.
      Returns:
      observationSessionStart Attribute
    • setObservationSessionStart

      public void setObservationSessionStart(Date pObservationSessionStart)
      Set observationSessionStart Attribute.
      Parameters:
      pObservationSessionStart - value to set
    • withObservationSessionStart

      public ProposalCycle withObservationSessionStart(Date pObservationSessionStart)
      fluent setter for observationSessionStart Attribute.
      Parameters:
      pObservationSessionStart - value to set
      Returns:
      ProposalCycle
    • getObservationSessionEnd

      public Date getObservationSessionEnd()
      Returns observationSessionEnd Attribute.
      Returns:
      observationSessionEnd Attribute
    • setObservationSessionEnd

      public void setObservationSessionEnd(Date pObservationSessionEnd)
      Set observationSessionEnd Attribute.
      Parameters:
      pObservationSessionEnd - value to set
    • withObservationSessionEnd

      public ProposalCycle withObservationSessionEnd(Date pObservationSessionEnd)
      fluent setter for observationSessionEnd Attribute.
      Parameters:
      pObservationSessionEnd - value to set
      Returns:
      ProposalCycle
    • getObservingModes

      public List<ObservingMode> getObservingModes()
      Returns observingModes composition as an immutable list.
      Returns:
      observingModes composition.
    • setObservingModes

      public void setObservingModes(List<ObservingMode> pObservingModes)
      Defines whole observingModes composition.
      Parameters:
      pObservingModes - composition to set.
    • addToObservingModes

      public void addToObservingModes(ObservingMode p)
      Add a org.ivoa.dm.proposal.management.ObservingMode to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ObservingMode to add
    • removeFromObservingModes

      public void removeFromObservingModes(ObservingMode p)
      Remove a org.ivoa.dm.proposal.management.ObservingMode from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ObservingMode to remove
    • replaceInObservingModes

      public void replaceInObservingModes(ObservingMode _p)
      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

      public AvailableResources getAvailableResources()
      Returns availableResources Attribute.
      Returns:
      availableResources Attribute
    • setAvailableResources

      public void setAvailableResources(AvailableResources pAvailableResources)
      Set availableResources Attribute.
      Parameters:
      pAvailableResources - value to set
    • withAvailableResources

      public ProposalCycle withAvailableResources(AvailableResources pAvailableResources)
      fluent setter for availableResources Attribute.
      Parameters:
      pAvailableResources - value to set
      Returns:
      ProposalCycle
    • getPossibleGrades

      public List<AllocationGrade> getPossibleGrades()
      Returns possibleGrades composition as an immutable list.
      Returns:
      possibleGrades composition.
    • setPossibleGrades

      public void setPossibleGrades(List<AllocationGrade> pPossibleGrades)
      Defines whole possibleGrades composition.
      Parameters:
      pPossibleGrades - composition to set.
    • addToPossibleGrades

      public void addToPossibleGrades(AllocationGrade p)
      Add a org.ivoa.dm.proposal.management.AllocationGrade to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocationGrade to add
    • removeFromPossibleGrades

      public void removeFromPossibleGrades(AllocationGrade p)
      Remove a org.ivoa.dm.proposal.management.AllocationGrade from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocationGrade to remove
    • replaceInPossibleGrades

      public void replaceInPossibleGrades(AllocationGrade _p)
      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

      public TAC getTac()
      Returns tac Attribute.
      Returns:
      tac Attribute
    • setTac

      public void setTac(TAC pTac)
      Set tac Attribute.
      Parameters:
      pTac - value to set
    • withTac

      public ProposalCycle withTac(TAC pTac)
      fluent setter for tac Attribute.
      Parameters:
      pTac - value to set
      Returns:
      ProposalCycle
    • getSubmittedProposals

      public List<SubmittedProposal> getSubmittedProposals()
      Returns submittedProposals composition as an immutable list.
      Returns:
      submittedProposals composition.
    • setSubmittedProposals

      public void setSubmittedProposals(List<SubmittedProposal> pSubmittedProposals)
      Defines whole submittedProposals composition.
      Parameters:
      pSubmittedProposals - composition to set.
    • addToSubmittedProposals

      public void addToSubmittedProposals(SubmittedProposal p)
      Add a org.ivoa.dm.proposal.management.SubmittedProposal to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.SubmittedProposal to add
    • removeFromSubmittedProposals

      public void removeFromSubmittedProposals(SubmittedProposal p)
      Remove a org.ivoa.dm.proposal.management.SubmittedProposal from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.SubmittedProposal to remove
    • replaceInSubmittedProposals

      public void replaceInSubmittedProposals(SubmittedProposal _p)
      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

      public List<AllocatedProposal> getAllocatedProposals()
      Returns allocatedProposals composition as an immutable list.
      Returns:
      allocatedProposals composition.
    • setAllocatedProposals

      public void setAllocatedProposals(List<AllocatedProposal> pAllocatedProposals)
      Defines whole allocatedProposals composition.
      Parameters:
      pAllocatedProposals - composition to set.
    • addToAllocatedProposals

      public void addToAllocatedProposals(AllocatedProposal p)
      Add a org.ivoa.dm.proposal.management.AllocatedProposal to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocatedProposal to add
    • removeFromAllocatedProposals

      public void removeFromAllocatedProposals(AllocatedProposal p)
      Remove a org.ivoa.dm.proposal.management.AllocatedProposal from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocatedProposal to remove
    • replaceInAllocatedProposals

      public void replaceInAllocatedProposals(AllocatedProposal _p)
      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

      public static ProposalCycle createProposalCycle(Consumer<ProposalCycle.ProposalCycleBuilder> f)
      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 interface org.ivoa.vodml.jpa.JPAManipulations
    • persistRefs

      @Deprecated public 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.
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations