Yosokumo::Study Class Reference

A container for all resources associated with an analytic project. More...

#include <Study.h>

List of all members.

Public Types

enum  Type { CLASS, RANK, NUMBER, CHANCE }
 

Indicates the quality of the predictands associated with subjects in the study.

More...
enum  Status { RUNNING, STANDBY, STOPPED }
 

Describes the state of the study, whether it is running, on standby, or stopped.

More...
enum  Visibility { PRIVATE, PUBLIC }
 

Tells whether unidentified users can get estimated predictands from the model of the study.

More...

Public Member Functions

 Study ()
 Initializes a newly created Study object with default attributes.
 Study (const std::string &studyName, Type type, Status status, Visibility visibility)
 Initializes a newly created Study object with attributes specified by the input parameters.
 Study (const Study &rhs)
 Copy constructor - initializes a newly created Study object with a copy of another Study object.
virtual ~Study ()
 Destructor - destroy a Study object.
Studyoperator= (const Study &rhs)
 Assignment operator - assign one Study to another.
bool operator== (const Study &rhs) const
 Equality operator - compare two Study for equality.
bool operator!= (const Study &rhs) const
 Inequality operator - compare two Study for inequality.
void initStudy ()
 Initialize the data members of a study.
void setStudyIdentifier (const std::string &id)
 Set the study identifier.
std::string getStudyIdentifier () const
 Return the study identifier.
void setStudyName (const std::string &name)
 Set the study name.
std::string getStudyName () const
 Return the study name.
void setStudyLocation (const std::string &loc)
 Set the study location.
std::string getStudyLocation () const
 Return the study location.
void setType (Type t)
 Set the study type.
Type getType () const
 Return the study type.
void setStatus (Status s)
 Set the study status.
Status getStatus () const
 Return the study status.
void setVisibility (Visibility v)
 Set the study visibility.
Visibility getVisibility () const
 Return the study visibility.
void setOwnerIdentifier (const std::string &id)
 Set the owner identifier.
std::string getOwnerIdentifier () const
 Return the owner identifier.
void setOwnerName (const std::string &name)
 Set the owner name.
std::string getOwnerName () const
 Return the owner name.
void setTableLocation (const std::string &loc)
 Set the table location.
std::string getTableLocation () const
 Return the table location.
void setModelLocation (const std::string &loc)
 Set the model location.
std::string getModelLocation () const
 Return the model location.
void setPanelLocation (const std::string &loc)
 Set the panel location.
std::string getPanelLocation () const
 Return the panel location.
void setRosterLocation (const std::string &loc)
 Set the roster location.
std::string getRosterLocation () const
 Return the roster location.
void setNameControlLocation (const std::string &nameControlLocation)
 Set the name control location.
std::string getNameControlLocation () const
 Return the name control location.
void setStatusControlLocation (const std::string &statusControlLocation)
 Set the status control location.
std::string getStatusControlLocation () const
 Return the status control location.
void setVisibilityControlLocation (const std::string &visibilityControlLocation)
 Set the visibility control location.
std::string getVisibilityControlLocation () const
 Return the visibility control location.
void setBlockCount (uint64_t blockCount)
 Set the block count.
uint64_t getBlockCount () const
 Return the block count.
void setCellCount (uint64_t cellCount)
 Set the cell count.
uint64_t getCellCount () const
 Return the cell count.
void setProspectCount (uint64_t prospectCount)
 Set the prospect count.
uint64_t getProspectCount () const
 Return the prospect count.
void setCreationTime (const std::string &creationTime)
 Set the creation time.
std::string getCreationTime () const
 Return the creation time.
void setLatestBlockTime (const std::string &latestBlockTime)
 Set the latest block time.
std::string getLatestBlockTime () const
 Return the latest block time.
void setLatestProspectTime (const std::string &latestProspectTime)
 Set the latest prospect time.
std::string getLatestProspectTime () const
 Return the latest prospect time.
std::string toString ()
 Return a string representation of this Study.

Static Public Member Functions

static void copyStudy (Study &t, const Study &s)
 Make a copy of a study.

Private Attributes

std::string studyIdentifier
std::string studyName
std::string studyLocation
Type type
Status status
Visibility visibility
std::string ownerIdentifier
std::string ownerName
std::string tableLocation
std::string modelLocation
std::string panelLocation
std::string rosterLocation
std::string nameControlLocation
std::string statusControlLocation
std::string visibilityControlLocation
uint64_t blockCount
uint64_t cellCount
uint64_t prospectCount
std::string creationTime
std::string latestBlockTime
std::string latestProspectTime

Detailed Description

A container for all resources associated with an analytic project.

A study has these attributes:

Author:
Roger House
Version:
0.9

Definition at line 25 of file Study.h.


Member Enumeration Documentation

Describes the state of the study, whether it is running, on standby, or stopped.

The Status can be changed at any time. If the status attribute is not included in the posted study document, the default status is RUNNING.

Enumerator:
RUNNING 

the service is accepting data into the study's table, analyzing the data to improve the study's predictive model and estimating predictands based on the model.

STANDBY 

the service is no longer accepting or analyzing data, but is still estimating predictands for the study based on the current model.

STOPPED 

the service is neither accepting nor analyzing data, and is not estimating predictands for the study.

Definition at line 64 of file Study.h.

Indicates the quality of the predictands associated with subjects in the study.

The Type determines the type of the predictive model that will be built for the study. The type attribute may not be changed after it has been set at study creation. If the type attribute is not included in the posted study document, the default value is NUMBER.

Enumerator:
CLASS 

the predictand is categorical and nominal.

RANK 

the predictand is categorical, but also ordinal.

NUMBER 

the predictand is continuous and ratio.

CHANCE 

the predictand represents a probability given as a continuous value between zero and one inclusive.

Definition at line 37 of file Study.h.

Tells whether unidentified users can get estimated predictands from the model of the study.

The visibility of a study can be changed at any time. If the visibility is not included in the posted study document, the default visibility is PRIVATE.

Enumerator:
PRIVATE 

only users that are authenticated and authorized may make a Get Model request for the study.

PUBLIC 

any web client may make a Get Model request for the study.

Definition at line 90 of file Study.h.


Constructor & Destructor Documentation

Study::Study (  ) 

Initializes a newly created Study object with default attributes.

  • identifier = ""
  • name = ""
  • type = NUMBER
  • status = RUNNING
  • visibility = PRIVATE

The type of a Study cannot be changed after construction.

Definition at line 11 of file Study.cpp.

References initStudy().

Study::Study ( const std::string &  studyName,
Type  type,
Status  status,
Visibility  visibility 
)

Initializes a newly created Study object with attributes specified by the input parameters.

Parameters:
studyName the name of the study.
type the type of the study.
status the status of the study.
visibility the visibility of the study.

The type of a Study cannot be changed after construction.

Definition at line 17 of file Study.cpp.

Study::Study ( const Study rhs  ) 

Copy constructor - initializes a newly created Study object with a copy of another Study object.

Parameters:
rhs the Study to make a copy of.

Definition at line 32 of file Study.cpp.

References operator=().

Study::~Study (  )  [virtual]

Destructor - destroy a Study object.

Definition at line 37 of file Study.cpp.


Member Function Documentation

void Study::copyStudy ( Study t,
const Study s 
) [static]
uint64_t Study::getBlockCount (  )  const

Return the block count.

Returns:
the number of posted blocks that have been accepted into the study table.

Definition at line 310 of file Study.cpp.

References blockCount.

Referenced by copyStudy(), and toString().

uint64_t Study::getCellCount (  )  const

Return the cell count.

Returns:
the total number of cells contained in the blocks reported in the block count.

Definition at line 320 of file Study.cpp.

References cellCount.

Referenced by copyStudy(), and toString().

std::string Study::getCreationTime (  )  const

Return the creation time.

Returns:
the UTC time the study was created.

Definition at line 340 of file Study.cpp.

References creationTime.

Referenced by copyStudy(), and toString().

std::string Study::getLatestBlockTime (  )  const

Return the latest block time.

Returns:
the UTC time that the service accepted the most recent block into the study table.

Definition at line 350 of file Study.cpp.

References latestBlockTime.

Referenced by copyStudy(), and toString().

std::string Study::getLatestProspectTime (  )  const

Return the latest prospect time.

Returns:
the UTC time of the most recent Post Model or Get Model request.

Definition at line 360 of file Study.cpp.

References latestProspectTime.

Referenced by copyStudy(), and toString().

std::string Study::getModelLocation (  )  const

Return the model location.

Returns:
the location of the model for this study. May be null.

Definition at line 248 of file Study.cpp.

References modelLocation.

Referenced by copyStudy(), and toString().

std::string Study::getNameControlLocation (  )  const

Return the name control location.

Returns:
the URI to use to change the name of the study.

Definition at line 280 of file Study.cpp.

References nameControlLocation.

Referenced by copyStudy(), and toString().

std::string Study::getOwnerIdentifier (  )  const

Return the owner identifier.

Returns:
the identifier of the owner of this study. May be null.

Definition at line 218 of file Study.cpp.

References ownerIdentifier.

Referenced by copyStudy(), and toString().

std::string Study::getOwnerName (  )  const

Return the owner name.

Returns:
the name of the owner of this study. May be null.

Definition at line 228 of file Study.cpp.

References ownerName.

Referenced by copyStudy(), and toString().

std::string Study::getPanelLocation (  )  const

Return the panel location.

Returns:
the location of the panel for this study. May be null.

Definition at line 258 of file Study.cpp.

References panelLocation.

Referenced by copyStudy(), and toString().

uint64_t Study::getProspectCount (  )  const

Return the prospect count.

Returns:
the total number of specimens contained in all Post Model and Get Model requests for the study.

Definition at line 330 of file Study.cpp.

References prospectCount.

Referenced by copyStudy(), and toString().

std::string Study::getRosterLocation (  )  const

Return the roster location.

Returns:
the location of the roster for this study. May be null.

Definition at line 268 of file Study.cpp.

References rosterLocation.

Referenced by copyStudy(), and toString().

Study::Status Study::getStatus (  )  const

Return the study status.

Returns:
the status of this study.

Definition at line 198 of file Study.cpp.

Referenced by copyStudy(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromStudy(), and toString().

std::string Study::getStatusControlLocation (  )  const

Return the status control location.

Returns:
the URI to use to change the status of the study.

Definition at line 290 of file Study.cpp.

References statusControlLocation.

Referenced by copyStudy(), and toString().

std::string Study::getStudyIdentifier (  )  const

Return the study identifier.

Returns:
the identifier of this study, which is the unique identification of the study. May be null.

Definition at line 158 of file Study.cpp.

References studyIdentifier.

Referenced by Yosokumo::Catalog::addStudy(), copyStudy(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromStudy(), Yosokumo::Catalog::operator==(), toString(), and Yosokumo::Catalog::toStringInternal().

std::string Study::getStudyLocation (  )  const

Return the study location.

Returns:
the location of this study. May be null.

Definition at line 178 of file Study.cpp.

References studyLocation.

Referenced by copyStudy(), and toString().

std::string Study::getStudyName (  )  const

Return the study name.

Returns:
the name of this study. May be null.

Definition at line 168 of file Study.cpp.

Referenced by copyStudy(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromStudy(), toString(), and Yosokumo::Catalog::toStringInternal().

std::string Study::getTableLocation (  )  const

Return the table location.

Returns:
the location of the table for this study. May be null.

Definition at line 238 of file Study.cpp.

References tableLocation.

Referenced by copyStudy(), and toString().

Study::Type Study::getType (  )  const

Return the study type.

Returns:
the type of this study.

Definition at line 188 of file Study.cpp.

Referenced by copyStudy(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromStudy(), and toString().

Study::Visibility Study::getVisibility (  )  const

Return the study visibility.

Returns:
the visibility of this study.

Definition at line 208 of file Study.cpp.

Referenced by copyStudy(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromStudy(), and toString().

std::string Study::getVisibilityControlLocation (  )  const

Return the visibility control location.

Returns:
the URI to use to change the visibility of the study.

Definition at line 300 of file Study.cpp.

References visibilityControlLocation.

Referenced by copyStudy(), and toString().

void Study::initStudy (  ) 
bool Study::operator!= ( const Study rhs  )  const

Inequality operator - compare two Study for inequality.

Parameters:
rhs the righthand side of the inequality.
Returns:
true if and only if this Study and the righthand side Study are not identically equal.

Definition at line 89 of file Study.cpp.

Study & Study::operator= ( const Study rhs  ) 

Assignment operator - assign one Study to another.

Parameters:
rhs the righthand side of the assignment.
Returns:
a reference to this Study.

Definition at line 40 of file Study.cpp.

References copyStudy().

Referenced by Study().

bool Study::operator== ( const Study rhs  )  const

Equality operator - compare two Study for equality.

Parameters:
rhs the righthand side of the equality.
Returns:
true if and only if this Study and the righthand side Study are identically equal.

Definition at line 53 of file Study.cpp.

References blockCount, cellCount, creationTime, latestBlockTime, latestProspectTime, modelLocation, nameControlLocation, ownerIdentifier, ownerName, panelLocation, prospectCount, rosterLocation, status, statusControlLocation, studyIdentifier, studyLocation, studyName, tableLocation, type, visibility, and visibilityControlLocation.

void Study::setBlockCount ( uint64_t  blockCount  ) 

Set the block count.

Parameters:
blockCount the number of posted blocks that have been accepted into the study table.

Definition at line 305 of file Study.cpp.

Referenced by copyStudy().

void Study::setCellCount ( uint64_t  cellCount  ) 

Set the cell count.

Parameters:
cellCount the total number of cells contained in the blocks reported in the block count.

Definition at line 315 of file Study.cpp.

Referenced by copyStudy().

void Study::setCreationTime ( const std::string &  creationTime  ) 

Set the creation time.

Parameters:
creationTime the UTC time the study was created.

Definition at line 335 of file Study.cpp.

Referenced by copyStudy().

void Study::setLatestBlockTime ( const std::string &  latestBlockTime  ) 

Set the latest block time.

Parameters:
latestBlockTime the UTC time that the service accepted the most recent block into the study table.

Definition at line 345 of file Study.cpp.

Referenced by copyStudy().

void Study::setLatestProspectTime ( const std::string &  latestProspectTime  ) 

Set the latest prospect time.

Parameters:
latestProspectTime the UTC time of the most recent Post Model or Get Model request.

Definition at line 355 of file Study.cpp.

Referenced by copyStudy().

void Study::setModelLocation ( const std::string &  loc  ) 

Set the model location.

Parameters:
loc the location of the model for this study. May be null.

Definition at line 243 of file Study.cpp.

References modelLocation.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setNameControlLocation ( const std::string &  nameControlLocation  ) 

Set the name control location.

Parameters:
nameControlLocation the URI to use to change the name of the study.

Definition at line 275 of file Study.cpp.

Referenced by copyStudy().

void Study::setOwnerIdentifier ( const std::string &  id  ) 

Set the owner identifier.

Parameters:
id the identifier of the owner of this study. May be null.

Definition at line 213 of file Study.cpp.

References ownerIdentifier.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setOwnerName ( const std::string &  name  ) 

Set the owner name.

Parameters:
name the name to assign to the owner of this study. May be null.

Definition at line 223 of file Study.cpp.

References ownerName.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setPanelLocation ( const std::string &  loc  ) 

Set the panel location.

Parameters:
loc the location of the panel for this study. May be null.

Definition at line 253 of file Study.cpp.

References panelLocation.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setProspectCount ( uint64_t  prospectCount  ) 

Set the prospect count.

Parameters:
prospectCount the total number of specimens contained in all Post Model and Get Model requests for the study.

Definition at line 325 of file Study.cpp.

Referenced by copyStudy().

void Study::setRosterLocation ( const std::string &  loc  ) 

Set the roster location.

Parameters:
loc the location of the roster for this study. May be null.

Definition at line 263 of file Study.cpp.

References rosterLocation.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setStatus ( Status  s  ) 

Set the study status.

Parameters:
s the status to assign to this study.

Definition at line 193 of file Study.cpp.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setStatusControlLocation ( const std::string &  statusControlLocation  ) 

Set the status control location.

Parameters:
statusControlLocation the URI to use to change the status of the study.

Definition at line 285 of file Study.cpp.

Referenced by copyStudy().

void Study::setStudyIdentifier ( const std::string &  id  ) 

Set the study identifier.

Parameters:
id the identifier to assign to this study. This is the unique identification of the study. May be null.

Definition at line 153 of file Study.cpp.

References studyIdentifier.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setStudyLocation ( const std::string &  loc  ) 

Set the study location.

Parameters:
loc the location to assign to this study. May be null.

Definition at line 173 of file Study.cpp.

References studyLocation.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setStudyName ( const std::string &  name  ) 

Set the study name.

Parameters:
name the name to assign to this study. May be null.

Definition at line 163 of file Study.cpp.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setTableLocation ( const std::string &  loc  ) 

Set the table location.

Parameters:
loc the location of the table for this study. May be null.

Definition at line 233 of file Study.cpp.

References tableLocation.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setType ( Type  t  ) 

Set the study type.

Parameters:
t the type to assign to this study.

Definition at line 183 of file Study.cpp.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setVisibility ( Visibility  v  ) 

Set the study visibility.

Parameters:
v the type to assign to this study.

Definition at line 203 of file Study.cpp.

Referenced by copyStudy(), and Yosokumo::YosokumoProtobuf::makeStudyFromProtobufStudy().

void Study::setVisibilityControlLocation ( const std::string &  visibilityControlLocation  ) 

Set the visibility control location.

Parameters:
visibilityControlLocation the URI to use to change the visibility of the study.

Definition at line 295 of file Study.cpp.

Referenced by copyStudy().

std::string Study::toString (  ) 

Member Data Documentation

uint64_t Yosokumo::Study::blockCount [private]

Definition at line 127 of file Study.h.

Referenced by getBlockCount(), initStudy(), and operator==().

uint64_t Yosokumo::Study::cellCount [private]

Definition at line 128 of file Study.h.

Referenced by getCellCount(), initStudy(), and operator==().

std::string Yosokumo::Study::creationTime [private]

Definition at line 131 of file Study.h.

Referenced by getCreationTime(), initStudy(), and operator==().

std::string Yosokumo::Study::latestBlockTime [private]

Definition at line 132 of file Study.h.

Referenced by getLatestBlockTime(), initStudy(), and operator==().

std::string Yosokumo::Study::latestProspectTime [private]

Definition at line 133 of file Study.h.

Referenced by getLatestProspectTime(), initStudy(), and operator==().

std::string Yosokumo::Study::modelLocation [private]

Definition at line 117 of file Study.h.

Referenced by getModelLocation(), initStudy(), operator==(), and setModelLocation().

std::string Yosokumo::Study::nameControlLocation [private]

Definition at line 123 of file Study.h.

Referenced by getNameControlLocation(), initStudy(), and operator==().

std::string Yosokumo::Study::ownerIdentifier [private]

Definition at line 113 of file Study.h.

Referenced by getOwnerIdentifier(), initStudy(), operator==(), and setOwnerIdentifier().

std::string Yosokumo::Study::ownerName [private]

Definition at line 114 of file Study.h.

Referenced by getOwnerName(), initStudy(), operator==(), and setOwnerName().

std::string Yosokumo::Study::panelLocation [private]

Definition at line 118 of file Study.h.

Referenced by getPanelLocation(), initStudy(), operator==(), and setPanelLocation().

uint64_t Yosokumo::Study::prospectCount [private]

Definition at line 129 of file Study.h.

Referenced by getProspectCount(), initStudy(), and operator==().

std::string Yosokumo::Study::rosterLocation [private]

Definition at line 119 of file Study.h.

Referenced by getRosterLocation(), initStudy(), operator==(), and setRosterLocation().

Definition at line 110 of file Study.h.

Referenced by operator==().

Definition at line 124 of file Study.h.

Referenced by getStatusControlLocation(), initStudy(), and operator==().

std::string Yosokumo::Study::studyIdentifier [private]

Definition at line 105 of file Study.h.

Referenced by getStudyIdentifier(), initStudy(), operator==(), and setStudyIdentifier().

std::string Yosokumo::Study::studyLocation [private]

Definition at line 107 of file Study.h.

Referenced by getStudyLocation(), initStudy(), operator==(), and setStudyLocation().

std::string Yosokumo::Study::studyName [private]

Definition at line 106 of file Study.h.

Referenced by operator==().

std::string Yosokumo::Study::tableLocation [private]

Definition at line 116 of file Study.h.

Referenced by getTableLocation(), initStudy(), operator==(), and setTableLocation().

Definition at line 109 of file Study.h.

Referenced by operator==().

Definition at line 111 of file Study.h.

Referenced by operator==().

Definition at line 125 of file Study.h.

Referenced by getVisibilityControlLocation(), initStudy(), and operator==().


The documentation for this class was generated from the following files:
Generated on Mon May 13 09:19:12 2013 for C++ Yosokumo API by  doxygen 1.6.3