org.mars_sim.msp.core.science
Class ScientificStudy

java.lang.Object
  extended by org.mars_sim.msp.core.science.ScientificStudy
All Implemented Interfaces:
Serializable, Comparable<ScientificStudy>

public class ScientificStudy
extends Object
implements Serializable, Comparable<ScientificStudy>

A class representing a scientific study.

See Also:
Serialized Form

Field Summary
static String CANCELED
           
static String FAILED_COMPLETION
           
static String INVITATION_PHASE
           
static int MAX_NUM_COLLABORATORS
           
static String PAPER_PHASE
           
static String PEER_REVIEW_PHASE
           
static String PROPOSAL_PHASE
           
static String RESEARCH_PHASE
           
static String SUCCESSFUL_COMPLETION
           
 
Method Summary
 void addCollaborativePaperWorkTime(Person researcher, double workTime)
          Adds work time for collaborative researcher writing paper.
 void addCollaborativeResearcher(Person researcher, Science science)
          Adds a collaborative researcher to the study.
 void addCollaborativeResearchWorkTime(Person researcher, double workTime)
          Adds work time for collaborative research.
 void addInvitedResearcher(Person researcher)
          Adds a researcher to the list of researchers invited to collaborate on this study.
 void addPrimaryPaperWorkTime(double workTime)
          Adds work time for primary researcher writing paper.
 void addPrimaryResearchWorkTime(double workTime)
          Adds work time for primary research.
 void addProposalWorkTime(double workTime)
          Adds work time to the proposal phase.
 void addScientificStudyListener(ScientificStudyListener newListener)
          Adds a listener
 int compareTo(ScientificStudy o)
          Compares this object with the specified object for order.
 void destroy()
          Prepare object for garbage collection.
 double getCollaborativePaperWorkTimeCompleted(Person researcher)
          Gets the work time completed for a collaborative researcher writing paper.
 double getCollaborativeResearcherEarnedScientificAchievement(Person researcher)
          Gets a collaborative researcher's earned scientific achievement from the study.
 Map<Person,Science> getCollaborativeResearchers()
          Gets the study's collaborative researchers and their fields of science.
 double getCollaborativeResearchWorkTimeCompleted(Person researcher)
          Gets the work time completed for a collaborative researcher.
 String getCompletionState()
          Gets the study's completion state.
 int getDifficultyLevel()
          Gets the study's difficulty level.
 MarsClock getLastCollaborativeResearchWorkTime(Person researcher)
          Gets the last time collaborative research work was done on the study.
 MarsClock getLastPrimaryResearchWorkTime()
          Gets the last time primary research work was done on the study.
 int getNumOpenResearchInvitations()
          Get number of research invitations that have not been responded to yet.
 double getPeerReviewTimeCompleted()
          Gets the amount of peer review time that has been completed so far.
 String getPhase()
          Gets the study's current phase.
 double getPrimaryPaperWorkTimeCompleted()
          Gets the work time completed for primary researcher writing paper.
 Person getPrimaryResearcher()
          Gets the study's primary researcher.
 double getPrimaryResearcherEarnedScientificAchievement()
          Gets the primary researcher's earned scientific achievement from the study.
 double getPrimaryResearchWorkTimeCompleted()
          Gets the work time completed for primary research.
 Settlement getPrimarySettlement()
          Gets the settlement where primary research is conducted.
 double getProposalWorkTimeCompleted()
          Gets the amount of work time completed for the proposal phase.
 Science getScience()
          Gets the study's primary field of science.
 double getTotalCollaborativePaperWorkTimeRequired()
          Gets the total work time required for a collaborative researcher writing paper.
 double getTotalCollaborativeResearchWorkTimeRequired()
          Gets the total work time required for a collaborative researcher.
 double getTotalPeerReviewTimeRequired()
          Gets the total amount of peer review time required for the study.
 double getTotalPrimaryPaperWorkTimeRequired()
          Gets the total work time required for primary researcher writing paper.
 double getTotalPrimaryResearchWorkTimeRequired()
          Gets the total work time required for primary research.
 double getTotalProposalWorkTimeRequired()
          Gets the total amount of proposal work time required for the study.
 boolean hasInvitedResearcherResponded(Person researcher)
          Checks if an invited researcher has responded to the invitation.
 boolean hasResearcherBeenInvited(Person researcher)
          Checks if a researcher has already been invited to collaborate on this study.
 boolean isAllCollaborativePaperCompleted()
          Checks if all collaborative paper writing has been completed.
 boolean isAllCollaborativeResearchCompleted()
          Checks if all collaborative research has been completed.
 boolean isAllPaperWritingCompleted()
          Checks if all paper writing in study has been completed.
 boolean isAllResearchCompleted()
          Checks if all research in study has been completed.
 boolean isCollaborativePaperCompleted(Person researcher)
          Checks if collaborative paper writing has been completed by a given researcher.
 boolean isCollaborativeResearchCompleted(Person researcher)
          Checks if collaborative research has been completed by a given researcher.
 boolean isCompleted()
          Checks if the study is completed.
 boolean isPeerReviewTimeFinished()
          Checks if peer review time has finished.
 boolean isPrimaryPaperCompleted()
          Checks if primary researcher paper writing has been completed.
 boolean isPrimaryResearchCompleted()
          Checks if primary research has been completed.
 void removeCollaborativeResearcher(Person researcher)
          Removes a collaborative researcher from a study.
 void removeScientificStudyListener(ScientificStudyListener oldListener)
          Removes a listener
 void respondingInvitedResearcher(Person researcher)
          Sets that an invited researcher has responded.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPOSAL_PHASE

public static final String PROPOSAL_PHASE
See Also:
Constant Field Values

INVITATION_PHASE

public static final String INVITATION_PHASE
See Also:
Constant Field Values

RESEARCH_PHASE

public static final String RESEARCH_PHASE
See Also:
Constant Field Values

PAPER_PHASE

public static final String PAPER_PHASE
See Also:
Constant Field Values

PEER_REVIEW_PHASE

public static final String PEER_REVIEW_PHASE
See Also:
Constant Field Values

SUCCESSFUL_COMPLETION

public static final String SUCCESSFUL_COMPLETION
See Also:
Constant Field Values

FAILED_COMPLETION

public static final String FAILED_COMPLETION
See Also:
Constant Field Values

CANCELED

public static final String CANCELED
See Also:
Constant Field Values

MAX_NUM_COLLABORATORS

public static final int MAX_NUM_COLLABORATORS
See Also:
Constant Field Values
Method Detail

getPhase

public String getPhase()
Gets the study's current phase.

Returns:
phase

getScience

public Science getScience()
Gets the study's primary field of science.

Returns:
science

getDifficultyLevel

public int getDifficultyLevel()
Gets the study's difficulty level.

Returns:
difficulty level.

getPrimaryResearcher

public Person getPrimaryResearcher()
Gets the study's primary researcher.

Returns:
primary researcher

getTotalProposalWorkTimeRequired

public double getTotalProposalWorkTimeRequired()
Gets the total amount of proposal work time required for the study.

Returns:
work time (millisols).

getProposalWorkTimeCompleted

public double getProposalWorkTimeCompleted()
Gets the amount of work time completed for the proposal phase.

Returns:
work time (millisols).

addProposalWorkTime

public void addProposalWorkTime(double workTime)
Adds work time to the proposal phase.

Parameters:
workTime - work time (millisols)

getCollaborativeResearchers

public Map<Person,Science> getCollaborativeResearchers()
Gets the study's collaborative researchers and their fields of science.

Returns:
map of researchers and their sciences.

addCollaborativeResearcher

public void addCollaborativeResearcher(Person researcher,
                                       Science science)
Adds a collaborative researcher to the study.

Parameters:
researcher - the collaborative researcher.
science - the scientific field to collaborate with.

removeCollaborativeResearcher

public void removeCollaborativeResearcher(Person researcher)
Removes a collaborative researcher from a study.

Parameters:
researcher - the collaborative researcher.

hasResearcherBeenInvited

public boolean hasResearcherBeenInvited(Person researcher)
Checks if a researcher has already been invited to collaborate on this study.

Parameters:
researcher - the researcher to check.
Returns:
true if already invited.

hasInvitedResearcherResponded

public boolean hasInvitedResearcherResponded(Person researcher)
Checks if an invited researcher has responded to the invitation.

Parameters:
researcher - the invited researcher
Returns:
true if reseacher has responded.

getNumOpenResearchInvitations

public int getNumOpenResearchInvitations()
Get number of research invitations that have not been responded to yet.

Returns:
num invitations.

addInvitedResearcher

public void addInvitedResearcher(Person researcher)
Adds a researcher to the list of researchers invited to collaborate on this study.

Parameters:
researcher - the invited researcher.

respondingInvitedResearcher

public void respondingInvitedResearcher(Person researcher)
Sets that an invited researcher has responded.

Parameters:
researcher - the invited researcher.

getTotalPrimaryResearchWorkTimeRequired

public double getTotalPrimaryResearchWorkTimeRequired()
Gets the total work time required for primary research.

Returns:
work time (millisols).

getPrimaryResearchWorkTimeCompleted

public double getPrimaryResearchWorkTimeCompleted()
Gets the work time completed for primary research.

Returns:
work time (millisols).

addPrimaryResearchWorkTime

public void addPrimaryResearchWorkTime(double workTime)
Adds work time for primary research.

Parameters:
workTime - work time (millisols).

isPrimaryResearchCompleted

public boolean isPrimaryResearchCompleted()
Checks if primary research has been completed.

Returns:
true if primary research completed.

getTotalCollaborativeResearchWorkTimeRequired

public double getTotalCollaborativeResearchWorkTimeRequired()
Gets the total work time required for a collaborative researcher.

Returns:
work time (millisols).

getCollaborativeResearchWorkTimeCompleted

public double getCollaborativeResearchWorkTimeCompleted(Person researcher)
Gets the work time completed for a collaborative researcher.

Parameters:
researcher - the collaborative researcher.
Returns:
work time (millisols).

addCollaborativeResearchWorkTime

public void addCollaborativeResearchWorkTime(Person researcher,
                                             double workTime)
Adds work time for collaborative research.

Parameters:
researcher - the collaborative researcher.
workTime - the work time (millisols).

isCollaborativeResearchCompleted

public boolean isCollaborativeResearchCompleted(Person researcher)
Checks if collaborative research has been completed by a given researcher.

Parameters:
researcher - the collaborative researcher.

isAllCollaborativeResearchCompleted

public boolean isAllCollaborativeResearchCompleted()
Checks if all collaborative research has been completed.

Returns:
true if research completed.

isAllResearchCompleted

public boolean isAllResearchCompleted()
Checks if all research in study has been completed.

Returns:
true if research completed.

getTotalPrimaryPaperWorkTimeRequired

public double getTotalPrimaryPaperWorkTimeRequired()
Gets the total work time required for primary researcher writing paper.

Returns:
work time (millisols).

getPrimaryPaperWorkTimeCompleted

public double getPrimaryPaperWorkTimeCompleted()
Gets the work time completed for primary researcher writing paper.

Returns:
work time (millisols).

addPrimaryPaperWorkTime

public void addPrimaryPaperWorkTime(double workTime)
Adds work time for primary researcher writing paper.

Parameters:
workTime - work time (millisols).

isPrimaryPaperCompleted

public boolean isPrimaryPaperCompleted()
Checks if primary researcher paper writing has been completed.

Returns:
true if primary researcher paper writing completed.

getTotalCollaborativePaperWorkTimeRequired

public double getTotalCollaborativePaperWorkTimeRequired()
Gets the total work time required for a collaborative researcher writing paper.

Returns:
work time (millisols).

getCollaborativePaperWorkTimeCompleted

public double getCollaborativePaperWorkTimeCompleted(Person researcher)
Gets the work time completed for a collaborative researcher writing paper.

Parameters:
researcher - the collaborative researcher.
Returns:
work time (millisols).

addCollaborativePaperWorkTime

public void addCollaborativePaperWorkTime(Person researcher,
                                          double workTime)
Adds work time for collaborative researcher writing paper.

Parameters:
researcher - the collaborative researcher.
workTime - the work time (millisols).

isCollaborativePaperCompleted

public boolean isCollaborativePaperCompleted(Person researcher)
Checks if collaborative paper writing has been completed by a given researcher.

Parameters:
researcher - the collaborative researcher.

isAllCollaborativePaperCompleted

public boolean isAllCollaborativePaperCompleted()
Checks if all collaborative paper writing has been completed.

Returns:
true if paper writing completed.

isAllPaperWritingCompleted

public boolean isAllPaperWritingCompleted()
Checks if all paper writing in study has been completed.

Returns:
true if paper writing completed.

isPeerReviewTimeFinished

public boolean isPeerReviewTimeFinished()
Checks if peer review time has finished.

Returns:
true if peer review time finished.

getPeerReviewTimeCompleted

public double getPeerReviewTimeCompleted()
Gets the amount of peer review time that has been completed so far.

Returns:
peer review time completed (millisols)..

getTotalPeerReviewTimeRequired

public double getTotalPeerReviewTimeRequired()
Gets the total amount of peer review time required for the study.

Returns:
the total peer review time (millisols).

isCompleted

public boolean isCompleted()
Checks if the study is completed.

Returns:
true if completed.

getCompletionState

public String getCompletionState()
Gets the study's completion state.

Returns:
completion state or null if not completed.

getPrimarySettlement

public Settlement getPrimarySettlement()
Gets the settlement where primary research is conducted.

Returns:
settlement.

getLastPrimaryResearchWorkTime

public MarsClock getLastPrimaryResearchWorkTime()
Gets the last time primary research work was done on the study.

Returns:
last time or null if none.

getLastCollaborativeResearchWorkTime

public MarsClock getLastCollaborativeResearchWorkTime(Person researcher)
Gets the last time collaborative research work was done on the study.

Parameters:
researcher - the collaborative researcher.
Returns:
last time or null if none.

getPrimaryResearcherEarnedScientificAchievement

public double getPrimaryResearcherEarnedScientificAchievement()
Gets the primary researcher's earned scientific achievement from the study.

Returns:
earned scientific achievement.

getCollaborativeResearcherEarnedScientificAchievement

public double getCollaborativeResearcherEarnedScientificAchievement(Person researcher)
Gets a collaborative researcher's earned scientific achievement from the study.

Parameters:
researcher - the collaborative researcher.
Returns:
earned scientific achievement.

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(ScientificStudy o)
Compares this object with the specified object for order.

Specified by:
compareTo in interface Comparable<ScientificStudy>
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

addScientificStudyListener

public final void addScientificStudyListener(ScientificStudyListener newListener)
Adds a listener

Parameters:
newListener - the listener to add.

removeScientificStudyListener

public final void removeScientificStudyListener(ScientificStudyListener oldListener)
Removes a listener

Parameters:
oldListener - the listener to remove.

destroy

public void destroy()
Prepare object for garbage collection.



Copyright © 2009-2013. All Rights Reserved.