|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.proposal.Proposal
public class Proposal
Placeholder for time when we integrate proposal work. A request for time to perform one or more projects on one or more telescopes.
Field Summary |
---|
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Fields inherited from interface edu.nrao.sss.model.UserAccountable |
---|
NULL_USER_ID |
Constructor Summary | |
---|---|
Proposal()
Creates a new instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Proposal()
Method Detail |
---|
public Long getId()
getId
in interface Identifiable
public String getLegacyId()
public void setLegacyId(String id)
getLegacyId()
public String getProposalCode()
public void setProposalCode(String newCode)
public String getTitle()
public void setTitle(String title)
public ProposalType getProposalType()
public void setProposalType(ProposalType proposalType)
public ProposalStatus getStatus()
public void setStatus(ProposalStatus newStatus)
public Set<String> getPreviousCodes()
public void setPreviousCodes(Set<String> newSetOfCodes)
public Set<String> getPreviousProposals()
public void setPreviousProposals(Set<String> prevProposals)
public Set<String> getRelatedProposals()
public void setRelatedProposals(Set<String> rProposals)
public void setCreatedBy(Long userId)
UserAccountable
If userId
is null, this object will be updated
not with null but with UserAccountable.NULL_USER_ID
instead.
setCreatedBy
in interface UserAccountable
userId
- the ID of the user who most recently updated this object.public void setCreatedOn(Date d)
UserAccountable
If d
is null it will be ignored and this method
will do nothing.
setCreatedOn
in interface UserAccountable
d
- the date on which this object was created.public void setLastUpdatedBy(Long userId)
UserAccountable
If userId
is null, this object will be updated
not with null but with UserAccountable.NULL_USER_ID
instead.
setLastUpdatedBy
in interface UserAccountable
userId
- the ID of the user who most recently updated this object.public void setLastUpdatedOn(Date d)
UserAccountable
If d
is null it will be ignored and this method
will do nothing.
setLastUpdatedOn
in interface UserAccountable
d
- the date on which this object was most recently updated.public Long getCreatedBy()
UserAccountable
If this object does not know the identity of the user who created
it, the returned ID will be UserAccountable.NULL_USER_ID
.
getCreatedBy
in interface UserAccountable
public Date getCreatedOn()
UserAccountable
getCreatedOn
in interface UserAccountable
public Long getLastUpdatedBy()
UserAccountable
If this object does not know the identity of the user who lasted
updated it, the returned ID will be UserAccountable.NULL_USER_ID
.
getLastUpdatedBy
in interface UserAccountable
public Date getLastUpdatedOn()
UserAccountable
getLastUpdatedOn
in interface UserAccountable
public Date getSubmittedOn()
public void setSubmittedOn(Date submit)
public Long getEditor()
public void setEditor(Long editorId)
public Long getContactPerson()
public void setContactPerson(Long contactPersonId)
public Long getPrincipalInvestigator()
public void setPrincipalInvestigator(Long principalInvestigatorId)
public List<Author> getAuthors()
public void addAuthor(Author newAuthor)
public void removeAuthor(Author oldAuthor)
public void addTelescope(TelescopeType newTelescope)
public void removeTelescope(TelescopeType oldTelescope)
public Set<TelescopeType> getTelescopes()
public Set<ObservingType> getObservingTypes()
public void setObservingTypes(Set<ObservingType> observingTypes)
public String getObservingTypeOther()
public void setObservingTypeOther(String other)
public ScientificType getScientificCategory()
public void setScientificCategory(ScientificType scienceCategory)
public String getScientificCategoryOther()
public void setScientificCategoryOther(String s)
public String getAbstract()
public void setAbstract(String newAbstract)
public JustificationFileDescriptor getJustificationFile()
public void setJustificationFile(JustificationFileDescriptor newDescriptor)
public Set<Session> getSessions()
public void addSession(Session s)
public void deleteSession(Session s)
public Set<Source> getSources()
public Set<Source> getSourceClones()
public void addSource(Source s)
public void deleteSource(Source s)
public Set<Resource> getResources()
public void addResource(Resource s)
public void deleteResource(Resource s)
public boolean isObserverToBePresent()
public void setObserverToBePresent(boolean toBePresent)
public SupportType getStaffSupport()
public void setStaffSupport(SupportType sSupport)
public StudentSupport getStudentSupport()
public void setStudentSupport(StudentSupport ss)
public Set<Project> createProjects()
One project is returned for each telescope
specified in this proposal. (If no telescopes have been specified,
the returned set will be empty.) Each project in the returned set
will have had this proposal sent to its
setProposal
method.
public String toString()
toString
in class Object
public String toXml()
toXml
in interface XmlSerializable
public String toXML( int indent )
{
StringBuilder sb = new StringBuilder();
sb.append( "\n\n" );
sb.append( " "+getTitle() + " \n" );
if ( previousProposals != null ){
sb.append( " " + previousProposals + " \n" );
}
else {
sb.append( " \n" );
}
sb.append( " " + getRelatedProposals() + " \n" );
sb.append( " " + scientificCategory + " \n" );
if ( scientificCategory != null && ScientificType.OTHER.equals( scientificCategory ) ){
sb.append( " " +scientificCategoryOther + " \n" );
}
if ( abstractStr != null ){
sb.append( " " + abstractStr + " \n" );
}
sb.append( " \n" );
sb.append( " "+proposalType+" />\n" );
sb.append( " \n" );
for ( ObservingType type: observingTypes ){
sb.append( " "+type+" \n");
}
sb.append( " \n");
if ( observingTypeOther != null ){
sb.append( " "+observingTypeOther + " \n");
}
else {
sb.append( " \n" );
}
if ( justificationFileName != null ){
sb.append( " \n" );
}
else {
sb.append( " \n");
}
return sb.toString();
}
public void fromXml(String xml)
fromXml
in interface XmlSerializable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |