org.robokind.impl.speech
Class PortableSpeechRequest

java.lang.Object
  extended by org.robokind.impl.speech.PortableSpeechRequest
All Implemented Interfaces:
org.robokind.api.speech.SpeechRequest

public class PortableSpeechRequest
extends Object
implements org.robokind.api.speech.SpeechRequest

SpeechRequest implementation wrapping a SpeechRequestRecord.

Author:
Matthew Stevenson

Constructor Summary
PortableSpeechRequest(org.robokind.api.speech.SpeechRequest req)
          Creates a PortableSpeechRequest from another SpeechRequest.
PortableSpeechRequest(org.robokind.avrogen.speech.SpeechRequestRecord record)
          Creates a new PortableSpeechRequest from the given Record.
PortableSpeechRequest(String speechServiceId, String requestSourceId, long timestampMillisecUTC, String phrase)
          Creates a new PortableSpeechRequest.
 
Method Summary
 String getPhrase()
           
 org.robokind.avrogen.speech.SpeechRequestRecord getRecord()
          Returns the underlying SpeechRequestRecord.
 String getRequestSourceId()
           
 String getSpeechServiceId()
           
 long getTimestampMillisecUTC()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortableSpeechRequest

public PortableSpeechRequest(org.robokind.avrogen.speech.SpeechRequestRecord record)
Creates a new PortableSpeechRequest from the given Record.

Parameters:
record - SpeechRequestRecord to wrap

PortableSpeechRequest

public PortableSpeechRequest(String speechServiceId,
                             String requestSourceId,
                             long timestampMillisecUTC,
                             String phrase)
Creates a new PortableSpeechRequest.

Parameters:
speechServiceId - id String of the SpeechService
requestSourceId - id String of the SpeechRequest source
timestampMillisecUTC - speech request timestamp
phrase -

PortableSpeechRequest

public PortableSpeechRequest(org.robokind.api.speech.SpeechRequest req)
Creates a PortableSpeechRequest from another SpeechRequest. If the given SpeechRequest is a PortableSpeechRequest, the Record is simply copied. Otherwise, a new REcord is created and populated from the given request.

Parameters:
req - SpeechRequest to copy
Method Detail

getRecord

public org.robokind.avrogen.speech.SpeechRequestRecord getRecord()
Returns the underlying SpeechRequestRecord.

Returns:
underlying SpeechRequestRecord

getSpeechServiceId

public String getSpeechServiceId()
Specified by:
getSpeechServiceId in interface org.robokind.api.speech.SpeechRequest

getRequestSourceId

public String getRequestSourceId()
Specified by:
getRequestSourceId in interface org.robokind.api.speech.SpeechRequest

getTimestampMillisecUTC

public long getTimestampMillisecUTC()
Specified by:
getTimestampMillisecUTC in interface org.robokind.api.speech.SpeechRequest

getPhrase

public String getPhrase()
Specified by:
getPhrase in interface org.robokind.api.speech.SpeechRequest


Copyright © 2011. All Rights Reserved.