eu.semaine.jms.message
Class SEMAINEFeatureMessage

java.lang.Object
  extended by eu.semaine.jms.message.SEMAINEMessage
      extended by eu.semaine.jms.message.SEMAINEFeatureMessage

public class SEMAINEFeatureMessage
extends SEMAINEMessage


Field Summary
protected  java.lang.String[] featureNames
           
protected  float[] features
           
 
Fields inherited from class eu.semaine.jms.message.SEMAINEMessage
CONTENT_CREATION_TIME, CONTENT_ID, DATATYPE, EVENT, message, PERIOD, SOURCE, USERTIME
 
Constructor Summary
SEMAINEFeatureMessage(javax.jms.Message message)
           
 
Method Summary
 java.lang.String[] getFeatureNames()
          Get the list of feature names if available.
 float[] getFeatureVector()
          Get the feature vector from the message.
protected  void readFromBytesMessage()
           
protected  void readFromTextMessage()
           
 void setFeatureNames(java.lang.String[] names)
          Set the feature names corresponding to the features.
 
Methods inherited from class eu.semaine.jms.message.SEMAINEMessage
getContentCreationTime, getContentID, getDatatype, getEventType, getMessage, getPeriod, getSource, getText, getTopicName, getUsertime, isBytesMessage, isEventBased, isPeriodic, isTextMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

features

protected float[] features

featureNames

protected java.lang.String[] featureNames
Constructor Detail

SEMAINEFeatureMessage

public SEMAINEFeatureMessage(javax.jms.Message message)
                      throws MessageFormatException
Throws:
MessageFormatException
Method Detail

getFeatureVector

public float[] getFeatureVector()
                         throws javax.jms.JMSException,
                                MessageFormatException
Get the feature vector from the message.

Returns:
the feature vector contained in the message.
Throws:
javax.jms.JMSException
MessageFormatException

getFeatureNames

public java.lang.String[] getFeatureNames()
                                   throws javax.jms.JMSException
Get the list of feature names if available.

Returns:
an array of strings containing the names of features if available, or null if the feature names are not available.
Throws:
javax.jms.JMSException

setFeatureNames

public void setFeatureNames(java.lang.String[] names)
                     throws MessageFormatException
Set the feature names corresponding to the features.

Parameters:
names - an array of feature names, which must correspond in number and in their order to the features in this message.
Throws:
MessageFormatException - if the number of feature names does not match the number of features saved in the message

readFromBytesMessage

protected void readFromBytesMessage()
                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

readFromTextMessage

protected void readFromTextMessage()
                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException