org.pandora.api.sense
Interface Sense

All Known Subinterfaces:
DiscoverySense
All Known Implementing Classes:
BasicSense, Context, Email, Freebase, Http, IRC, TextEntry, Twitter, TwitterDirectMessaging, Voice, Wiktionary

public interface Sense

Defines an external interface. i.e. - text - voice - hearing - vision


Method Summary
 void awake()
          Start sensing.
 Language.LanguageState getLanguageState()
          Return the current conversational state.
 java.lang.String getName()
          Return the name that identifies the sense.
 Pandora getPandora()
          Return the associated Pandora instance.
 Primitive getPrimitive()
          Allows senses to be referenced by memory.
 void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
          Initialize any configuration properties.
 void input(java.lang.Object inputData)
          Receive any input from the sense.
 void input(java.lang.Object inputData, Network network)
          Receive any input from the sense.
 boolean isEnabled()
          Return if the sense is enabled.
 void output(Vertex output)
          Output the active network through the sense, could be text, sound, image, commands etc..
 void setEmotionalState(EmotionalState emotion)
          Set the current conversational mood.
 void setIsEnabled(boolean isEnabled)
          Allow the sense to disabled/enabled.
 void setLanguageState(Language.LanguageState languageState)
          Set the current conversational state.
 void setName(java.lang.String name)
          Set the name that identifies the sense.
 void setPandora(Pandora pandora)
          Set the associated Pandora instance.
 void shutdown()
          Stop sensing.
 

Method Detail

initialize

void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
Initialize any configuration properties.


awake

void awake()
Start sensing.


shutdown

void shutdown()
Stop sensing.


input

void input(java.lang.Object inputData)
Receive any input from the sense. The type of input varies by sense, could be text, sound, image, html etc.


input

void input(java.lang.Object inputData,
           Network network)
           throws java.lang.Exception
Receive any input from the sense. The type of input varies by sense, could be text, sound, image, html etc.

Throws:
java.lang.Exception

output

void output(Vertex output)
Output the active network through the sense, could be text, sound, image, commands etc..


getName

java.lang.String getName()
Return the name that identifies the sense.


setName

void setName(java.lang.String name)
Set the name that identifies the sense.


getPandora

Pandora getPandora()
Return the associated Pandora instance.


setPandora

void setPandora(Pandora pandora)
Set the associated Pandora instance.


getLanguageState

Language.LanguageState getLanguageState()
Return the current conversational state.


setLanguageState

void setLanguageState(Language.LanguageState languageState)
Set the current conversational state.


setEmotionalState

void setEmotionalState(EmotionalState emotion)
Set the current conversational mood.


isEnabled

boolean isEnabled()
Return if the sense is enabled.


setIsEnabled

void setIsEnabled(boolean isEnabled)
Allow the sense to disabled/enabled.


getPrimitive

Primitive getPrimitive()
Allows senses to be referenced by memory.