com.yosokumo.core
Class YosokumoProtobuf

java.lang.Object
  extended by com.yosokumo.core.YosokumoProtobuf
All Implemented Interfaces:
YosokumoDIF

 class YosokumoProtobuf
extends java.lang.Object
implements YosokumoDIF

Implements all functionality for transforming HTTP entity bytes in Google Protocol Buffer form into Yosokumo Java objects (e.g., Catalog and Study) and vice versa. In general there are six functions for each Yosokumo class, illustrated here for Study:

Converting from HTTP entity bytes to Study:

   public           Study makeStudyFromBytes        (byte [] studyAsBytes)
   private ProtoBuf.Study makeProtobufStudyFromBytes(byte [] studyAsBytes)
   private          Study makeStudyFromProtobufStudy(ProtoBuf.Study protoStudy)
 
Converting from Study to HTTP entity bytes:
   public         byte [] makeBytesFromStudy        (Study study)
   private ProtoBuf.Study makeProtobufStudyFromStudy(Study study)
   private        byte [] makeBytesFromProtobufStudy(ProtoBuf.Study protoStudy)
 
Note how Google Protocol Buffer objects are used as the intermediaries between HTTP entity bytes and Yosokumo objects. Here is another view of the transformations done by the functions shown above:
    makeStudyFromBytes:
      byte []        -> makeProtobufStudyFromBytes -> ProtoBuf.Study
      ProtoBuf.Study -> makeStudyFromProtobufStudy -> Study

    makeBytesFromStudy:
      Study          -> makeProtobufStudyFromStudy -> ProtoBuf.Study
      ProtoBuf.Study -> makeBytesFromProtobufStudy -> byte []
 


Field Summary
private  ServiceException exception
           
 
Constructor Summary
YosokumoProtobuf()
           
 
Method Summary
 java.lang.String getContentType()
          Return a content type string for use in Accept and Content-Type HTTP header lines.
 ServiceException getException()
          Return a ServiceException from the code-decode process.
private  com.yosokumo.core.protobuf.ProtoBuf.Predictor.Level levelToProtobufLevel(Predictor.Level level)
           
 Block makeBlockFromBytes(byte[] blockAsBytes)
          Make a Yosokumo Block object out of the bytes of an HTTP Entity.
private  Block makeBlockFromProtobufBlock(com.yosokumo.core.protobuf.ProtoBuf.Block protoBlock)
           
 byte[] makeBytesFromBlock(Block block)
          Make the bytes for an HTTP Entity out of a Yosokumo Block object.
 byte[] makeBytesFromCell(Cell cell)
          Make the bytes for an HTTP Entity out of a Yosokumo Cell object.
 byte[] makeBytesFromPredictor(Predictor predictor)
          Make the bytes for an HTTP Entity out of a Yosokumo Predictor object.
private  byte[] makeBytesFromProtobufBlock(com.yosokumo.core.protobuf.ProtoBuf.Block protoBlock)
           
private  byte[] makeBytesFromProtobufCell(com.yosokumo.core.protobuf.ProtoBuf.Cell protoCell)
           
private  byte[] makeBytesFromProtobufPredictor(com.yosokumo.core.protobuf.ProtoBuf.Predictor protoPredictor)
           
private  byte[] makeBytesFromProtobufRole(com.yosokumo.core.protobuf.ProtoBuf.Role protoRole)
           
private  byte[] makeBytesFromProtobufSpecimen(com.yosokumo.core.protobuf.ProtoBuf.Specimen protoSpecimen)
           
private  byte[] makeBytesFromProtobufStatusControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.StatusControl protoStatusControl)
           
private  byte[] makeBytesFromProtobufStudy(com.yosokumo.core.protobuf.ProtoBuf.Study protoStudy)
           
private  byte[] makeBytesFromProtobufStudyNameControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.StudyNameControl protoNameControl)
           
private  byte[] makeBytesFromProtobufVisibilityControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.VisibilityControl protoVisibilityControl)
           
 byte[] makeBytesFromRole(Role role)
          Make the bytes for an HTTP Entity out of a Yosokumo Role object.
 byte[] makeBytesFromSpecimen(Specimen specimen)
          Make the bytes for an HTTP Entity out of a Yosokumo Specimen object.
 byte[] makeBytesFromStudy(Study study)
          Make the bytes for an HTTP Entity out of a Yosokumo Study object.
 byte[] makeBytesFromStudyName(java.lang.String name)
          Make the bytes for an HTTP Entity out of a Yosokumo Study name.
 byte[] makeBytesFromStudyStatus(Study.Status status)
          Make the bytes for an HTTP Entity out of a Yosokumo Study status.
 byte[] makeBytesFromStudyVisibility(Study.Visibility visibility)
          Make the bytes for an HTTP Entity out of a Yosokumo Study visibility.
 Catalog makeCatalogFromBytes(byte[] catalogAsBytes)
          Make a Yosokumo Catalog object out of the bytes of an HTTP Entity.
private  Catalog makeCatalogFromProtobufCatalog(com.yosokumo.core.protobuf.ProtoBuf.Catalog protoCatalog)
           
 Cell makeCellFromBytes(byte[] cellAsBytes)
          Make a Yosokumo Cell object out of the bytes of an HTTP Entity.
private  Cell makeCellFromProtobufCell(com.yosokumo.core.protobuf.ProtoBuf.Cell protoCell)
           
 Message makeMessageFromBytes(byte[] messageAsBytes)
          Make a Yosokumo Message object out of the bytes of an HTTP Entity.
private  Message makeMessageFromProtobufMessage(com.yosokumo.core.protobuf.ProtoBuf.Message protoMessage)
           
 Panel makePanelFromBytes(byte[] panelAsBytes)
          Make a Yosokumo Panel object out of the bytes of an HTTP Entity.
private  Panel makePanelFromProtobufPanel(com.yosokumo.core.protobuf.ProtoBuf.Panel protoPanel)
           
 Predictor makePredictorFromBytes(byte[] predictorAsBytes)
          Make a Yosokumo Predictor object out of the bytes of an HTTP Entity.
private  Predictor makePredictorFromProtobufPredictor(com.yosokumo.core.protobuf.ProtoBuf.Predictor protoPredictor)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Block makeProtobufBlockFromBlock(Block block)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Block makeProtobufBlockFromBytes(byte[] blockAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Catalog makeProtobufCatalogFromBytes(byte[] catalogAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Cell makeProtobufCellFromBytes(byte[] cellAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Cell makeProtobufCellFromCell(Cell cell)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Message makeProtobufMessageFromBytes(byte[] messageAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Panel makeProtobufPanelFromBytes(byte[] panelAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Predictor makeProtobufPredictorFromBytes(byte[] predictorAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Predictor makeProtobufPredictorFromPredictor(Predictor predictor)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Role makeProtobufRoleFromBytes(byte[] roleAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Role makeProtobufRoleFromRole(Role role)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Roster makeProtobufRosterFromBytes(byte[] rosterAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Specimen makeProtobufSpecimenFromBytes(byte[] specimenAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Specimen makeProtobufSpecimenFromSpecimen(Specimen specimen)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Panel.StatusControl makeProtobufStatusControlFromStatus(Study.Status status)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Study makeProtobufStudyFromBytes(byte[] studyAsBytes)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Study makeProtobufStudyFromStudy(Study study)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Panel.StudyNameControl makeProtobufStudyNameControlFromName(java.lang.String name)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Panel.VisibilityControl makeProtobufVisibilityControlFromVisibility(Study.Visibility visibility)
           
 Role makeRoleFromBytes(byte[] roleAsBytes)
          Make a Yosokumo Role object out of the bytes of an HTTP Entity.
private  Role makeRoleFromProtobufRole(com.yosokumo.core.protobuf.ProtoBuf.Role protoRole)
           
 Roster makeRosterFromBytes(byte[] rosterAsBytes)
          Make a Yosokumo Roster object out of the bytes of an HTTP Entity.
private  Roster makeRosterFromProtobufRoster(com.yosokumo.core.protobuf.ProtoBuf.Roster protoRoster)
           
 Specimen makeSpecimenFromBytes(byte[] specimenAsBytes)
          Make a Yosokumo Specimen object out of the bytes of an HTTP Entity.
private  Specimen makeSpecimenFromProtobufSpecimen(com.yosokumo.core.protobuf.ProtoBuf.Specimen protoSpecimen)
           
 Study makeStudyFromBytes(byte[] studyAsBytes)
          Make a Yosokumo Study object out of the bytes of an HTTP Entity.
private  Study makeStudyFromProtobufStudy(com.yosokumo.core.protobuf.ProtoBuf.Study protoStudy)
           
private  Predictor.Level protoLevelToLevel(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Level protoLevel)
           
private  Predictor.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Status protoStatus)
           
private  Specimen.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Specimen.Status protoStatus)
           
private  Study.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Study.Status protoStatus)
           
private  Message.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Message.Type protoType)
           
private  Predictor.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Type protoType)
           
private  Study.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Study.Type protoType)
           
private  Study.Visibility protoVisibilityToVisibility(com.yosokumo.core.protobuf.ProtoBuf.Study.Visibility protoVisibility)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Predictor.Status statusToProtobufStatus(Predictor.Status status)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Specimen.Status statusToProtobufStatus(Specimen.Status status)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Study.Status statusToProtobufStatus(Study.Status status)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Predictor.Type typeToProtobufType(Predictor.Type type)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Study.Type typeToProtobufType(Study.Type type)
           
private  com.yosokumo.core.protobuf.ProtoBuf.Study.Visibility visibilityToProtobufVisibility(Study.Visibility visibility)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exception

private ServiceException exception
Constructor Detail

YosokumoProtobuf

YosokumoProtobuf()
Method Detail

getContentType

public java.lang.String getContentType()
Description copied from interface: YosokumoDIF
Return a content type string for use in Accept and Content-Type HTTP header lines. For example, "application/yosokumo+protobuf".

Specified by:
getContentType in interface YosokumoDIF
Returns:
a content type string for use in Accept and other HTTP headers.

getException

public ServiceException getException()
Description copied from interface: YosokumoDIF
Return a ServiceException from the code-decode process.

Specified by:
getException in interface YosokumoDIF
Returns:
a ServiceException; null means there is no exception.

makeCatalogFromBytes

public Catalog makeCatalogFromBytes(byte[] catalogAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Catalog object out of the bytes of an HTTP Entity.

Specified by:
makeCatalogFromBytes in interface YosokumoDIF
Parameters:
catalogAsBytes - a catalog as bytes from an HTTP Entity.
Returns:
the Yosokumo Catalog object represented by the input bytes.

makeProtobufCatalogFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Catalog makeProtobufCatalogFromBytes(byte[] catalogAsBytes)

makeCatalogFromProtobufCatalog

private Catalog makeCatalogFromProtobufCatalog(com.yosokumo.core.protobuf.ProtoBuf.Catalog protoCatalog)

makeStudyFromBytes

public Study makeStudyFromBytes(byte[] studyAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Study object out of the bytes of an HTTP Entity.

Specified by:
makeStudyFromBytes in interface YosokumoDIF
Parameters:
studyAsBytes - a study as bytes from an HTTP Entity.
Returns:
the Yosokumo Study object represented by the input bytes.

makeProtobufStudyFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Study makeProtobufStudyFromBytes(byte[] studyAsBytes)

makeStudyFromProtobufStudy

private Study makeStudyFromProtobufStudy(com.yosokumo.core.protobuf.ProtoBuf.Study protoStudy)

makeBytesFromStudy

public byte[] makeBytesFromStudy(Study study)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Study object.

Specified by:
makeBytesFromStudy in interface YosokumoDIF
Parameters:
study - a Yosokumo Study object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Study object.

makeProtobufStudyFromStudy

private com.yosokumo.core.protobuf.ProtoBuf.Study makeProtobufStudyFromStudy(Study study)

makeBytesFromProtobufStudy

private byte[] makeBytesFromProtobufStudy(com.yosokumo.core.protobuf.ProtoBuf.Study protoStudy)

protoTypeToType

private Study.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Study.Type protoType)

typeToProtobufType

private com.yosokumo.core.protobuf.ProtoBuf.Study.Type typeToProtobufType(Study.Type type)

protoStatusToStatus

private Study.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Study.Status protoStatus)

statusToProtobufStatus

private com.yosokumo.core.protobuf.ProtoBuf.Study.Status statusToProtobufStatus(Study.Status status)

protoVisibilityToVisibility

private Study.Visibility protoVisibilityToVisibility(com.yosokumo.core.protobuf.ProtoBuf.Study.Visibility protoVisibility)

visibilityToProtobufVisibility

private com.yosokumo.core.protobuf.ProtoBuf.Study.Visibility visibilityToProtobufVisibility(Study.Visibility visibility)

makeBytesFromStudyName

public byte[] makeBytesFromStudyName(java.lang.String name)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Study name.

Specified by:
makeBytesFromStudyName in interface YosokumoDIF
Parameters:
name - a Yosokumo Study name.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Study name.

makeProtobufStudyNameControlFromName

private com.yosokumo.core.protobuf.ProtoBuf.Panel.StudyNameControl makeProtobufStudyNameControlFromName(java.lang.String name)

makeBytesFromProtobufStudyNameControl

private byte[] makeBytesFromProtobufStudyNameControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.StudyNameControl protoNameControl)

makeBytesFromStudyStatus

public byte[] makeBytesFromStudyStatus(Study.Status status)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Study status.

Specified by:
makeBytesFromStudyStatus in interface YosokumoDIF
Parameters:
status - a Yosokumo Study status.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Study status.

makeProtobufStatusControlFromStatus

private com.yosokumo.core.protobuf.ProtoBuf.Panel.StatusControl makeProtobufStatusControlFromStatus(Study.Status status)

makeBytesFromProtobufStatusControl

private byte[] makeBytesFromProtobufStatusControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.StatusControl protoStatusControl)

makeBytesFromStudyVisibility

public byte[] makeBytesFromStudyVisibility(Study.Visibility visibility)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Study visibility.

Specified by:
makeBytesFromStudyVisibility in interface YosokumoDIF
Parameters:
visibility - a Yosokumo Study visibility.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Study visibility.

makeProtobufVisibilityControlFromVisibility

private com.yosokumo.core.protobuf.ProtoBuf.Panel.VisibilityControl makeProtobufVisibilityControlFromVisibility(Study.Visibility visibility)

makeBytesFromProtobufVisibilityControl

private byte[] makeBytesFromProtobufVisibilityControl(com.yosokumo.core.protobuf.ProtoBuf.Panel.VisibilityControl protoVisibilityControl)

makePanelFromBytes

public Panel makePanelFromBytes(byte[] panelAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Panel object out of the bytes of an HTTP Entity.

Specified by:
makePanelFromBytes in interface YosokumoDIF
Parameters:
panelAsBytes - a panel as bytes from an HTTP Entity.
Returns:
the Yosokumo Panel object represented by the input bytes.

makeProtobufPanelFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Panel makeProtobufPanelFromBytes(byte[] panelAsBytes)

makePanelFromProtobufPanel

private Panel makePanelFromProtobufPanel(com.yosokumo.core.protobuf.ProtoBuf.Panel protoPanel)

makeRosterFromBytes

public Roster makeRosterFromBytes(byte[] rosterAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Roster object out of the bytes of an HTTP Entity.

Specified by:
makeRosterFromBytes in interface YosokumoDIF
Parameters:
rosterAsBytes - a roster as bytes from an HTTP Entity.
Returns:
the Yosokumo Roster object represented by the input bytes.

makeProtobufRosterFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Roster makeProtobufRosterFromBytes(byte[] rosterAsBytes)

makeRosterFromProtobufRoster

private Roster makeRosterFromProtobufRoster(com.yosokumo.core.protobuf.ProtoBuf.Roster protoRoster)

makeRoleFromBytes

public Role makeRoleFromBytes(byte[] roleAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Role object out of the bytes of an HTTP Entity.

Specified by:
makeRoleFromBytes in interface YosokumoDIF
Parameters:
roleAsBytes - a role as bytes from an HTTP Entity.
Returns:
the Yosokumo Role object represented by the input bytes.

makeProtobufRoleFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Role makeProtobufRoleFromBytes(byte[] roleAsBytes)

makeRoleFromProtobufRole

private Role makeRoleFromProtobufRole(com.yosokumo.core.protobuf.ProtoBuf.Role protoRole)

makeBytesFromRole

public byte[] makeBytesFromRole(Role role)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Role object.

Specified by:
makeBytesFromRole in interface YosokumoDIF
Parameters:
role - a Yosokumo Role object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Role object.

makeProtobufRoleFromRole

private com.yosokumo.core.protobuf.ProtoBuf.Role makeProtobufRoleFromRole(Role role)

makeBytesFromProtobufRole

private byte[] makeBytesFromProtobufRole(com.yosokumo.core.protobuf.ProtoBuf.Role protoRole)

makePredictorFromBytes

public Predictor makePredictorFromBytes(byte[] predictorAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Predictor object out of the bytes of an HTTP Entity.

Specified by:
makePredictorFromBytes in interface YosokumoDIF
Parameters:
predictorAsBytes - a predictor as bytes from an HTTP Entity.
Returns:
the Yosokumo Predictor object represented by the input bytes.

makeProtobufPredictorFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Predictor makeProtobufPredictorFromBytes(byte[] predictorAsBytes)

makePredictorFromProtobufPredictor

private Predictor makePredictorFromProtobufPredictor(com.yosokumo.core.protobuf.ProtoBuf.Predictor protoPredictor)

makeBytesFromPredictor

public byte[] makeBytesFromPredictor(Predictor predictor)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Predictor object.

Specified by:
makeBytesFromPredictor in interface YosokumoDIF
Parameters:
predictor - a Yosokumo Predictor object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Predictor object.

makeProtobufPredictorFromPredictor

private com.yosokumo.core.protobuf.ProtoBuf.Predictor makeProtobufPredictorFromPredictor(Predictor predictor)

makeBytesFromProtobufPredictor

private byte[] makeBytesFromProtobufPredictor(com.yosokumo.core.protobuf.ProtoBuf.Predictor protoPredictor)

protoStatusToStatus

private Predictor.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Status protoStatus)

statusToProtobufStatus

private com.yosokumo.core.protobuf.ProtoBuf.Predictor.Status statusToProtobufStatus(Predictor.Status status)

protoTypeToType

private Predictor.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Type protoType)

typeToProtobufType

private com.yosokumo.core.protobuf.ProtoBuf.Predictor.Type typeToProtobufType(Predictor.Type type)

protoLevelToLevel

private Predictor.Level protoLevelToLevel(com.yosokumo.core.protobuf.ProtoBuf.Predictor.Level protoLevel)

levelToProtobufLevel

private com.yosokumo.core.protobuf.ProtoBuf.Predictor.Level levelToProtobufLevel(Predictor.Level level)

makeSpecimenFromBytes

public Specimen makeSpecimenFromBytes(byte[] specimenAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Specimen object out of the bytes of an HTTP Entity.

Specified by:
makeSpecimenFromBytes in interface YosokumoDIF
Parameters:
specimenAsBytes - a specimen as bytes from an HTTP Entity.
Returns:
the Yosokumo Specimen object represented by the input bytes.

makeProtobufSpecimenFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Specimen makeProtobufSpecimenFromBytes(byte[] specimenAsBytes)

makeSpecimenFromProtobufSpecimen

private Specimen makeSpecimenFromProtobufSpecimen(com.yosokumo.core.protobuf.ProtoBuf.Specimen protoSpecimen)

makeBytesFromSpecimen

public byte[] makeBytesFromSpecimen(Specimen specimen)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Specimen object.

Specified by:
makeBytesFromSpecimen in interface YosokumoDIF
Parameters:
specimen - a Yosokumo Specimen object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Specimen object.

makeProtobufSpecimenFromSpecimen

private com.yosokumo.core.protobuf.ProtoBuf.Specimen makeProtobufSpecimenFromSpecimen(Specimen specimen)

makeBytesFromProtobufSpecimen

private byte[] makeBytesFromProtobufSpecimen(com.yosokumo.core.protobuf.ProtoBuf.Specimen protoSpecimen)

protoStatusToStatus

private Specimen.Status protoStatusToStatus(com.yosokumo.core.protobuf.ProtoBuf.Specimen.Status protoStatus)

statusToProtobufStatus

private com.yosokumo.core.protobuf.ProtoBuf.Specimen.Status statusToProtobufStatus(Specimen.Status status)

makeCellFromBytes

public Cell makeCellFromBytes(byte[] cellAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Cell object out of the bytes of an HTTP Entity.

Specified by:
makeCellFromBytes in interface YosokumoDIF
Parameters:
cellAsBytes - a cell as bytes from an HTTP Entity.
Returns:
the Yosokumo Cell object represented by the input bytes.

makeProtobufCellFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Cell makeProtobufCellFromBytes(byte[] cellAsBytes)

makeCellFromProtobufCell

private Cell makeCellFromProtobufCell(com.yosokumo.core.protobuf.ProtoBuf.Cell protoCell)

makeBytesFromCell

public byte[] makeBytesFromCell(Cell cell)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Cell object.

Specified by:
makeBytesFromCell in interface YosokumoDIF
Parameters:
cell - a Yosokumo Cell object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Cell object.

makeProtobufCellFromCell

private com.yosokumo.core.protobuf.ProtoBuf.Cell makeProtobufCellFromCell(Cell cell)

makeBytesFromProtobufCell

private byte[] makeBytesFromProtobufCell(com.yosokumo.core.protobuf.ProtoBuf.Cell protoCell)

makeBlockFromBytes

public Block makeBlockFromBytes(byte[] blockAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Block object out of the bytes of an HTTP Entity.

Specified by:
makeBlockFromBytes in interface YosokumoDIF
Parameters:
blockAsBytes - a block as bytes from an HTTP Entity.
Returns:
the Yosokumo Block object represented by the input bytes.

makeProtobufBlockFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Block makeProtobufBlockFromBytes(byte[] blockAsBytes)

makeBlockFromProtobufBlock

private Block makeBlockFromProtobufBlock(com.yosokumo.core.protobuf.ProtoBuf.Block protoBlock)

makeBytesFromBlock

public byte[] makeBytesFromBlock(Block block)
Description copied from interface: YosokumoDIF
Make the bytes for an HTTP Entity out of a Yosokumo Block object.

Specified by:
makeBytesFromBlock in interface YosokumoDIF
Parameters:
block - a Yosokumo Block object.
Returns:
the bytes of an HTTP Entity representing the input Yosokumo Block object.

makeProtobufBlockFromBlock

private com.yosokumo.core.protobuf.ProtoBuf.Block makeProtobufBlockFromBlock(Block block)

makeBytesFromProtobufBlock

private byte[] makeBytesFromProtobufBlock(com.yosokumo.core.protobuf.ProtoBuf.Block protoBlock)

makeMessageFromBytes

public Message makeMessageFromBytes(byte[] messageAsBytes)
Description copied from interface: YosokumoDIF
Make a Yosokumo Message object out of the bytes of an HTTP Entity.

Specified by:
makeMessageFromBytes in interface YosokumoDIF
Parameters:
messageAsBytes - a message as bytes from an HTTP Entity.
Returns:
the Yosokumo Message object represented by the input bytes.

makeProtobufMessageFromBytes

private com.yosokumo.core.protobuf.ProtoBuf.Message makeProtobufMessageFromBytes(byte[] messageAsBytes)

makeMessageFromProtobufMessage

private Message makeMessageFromProtobufMessage(com.yosokumo.core.protobuf.ProtoBuf.Message protoMessage)

protoTypeToType

private Message.Type protoTypeToType(com.yosokumo.core.protobuf.ProtoBuf.Message.Type protoType)