com.lmsal.solarb
Class SotSqlQuerier

java.lang.Object
  extended by com.lmsal.solarb.SotSqlQuerier
All Implemented Interfaces:
GalleryStorage, SotKbQuerier

public class SotSqlQuerier
extends java.lang.Object
implements SotKbQuerier, GalleryStorage


Field Summary
static java.text.SimpleDateFormat dateFormat
           
static java.text.SimpleDateFormat ddMmYyFormat
           
static java.text.SimpleDateFormat ddMmYyyyFormat
           
static java.text.SimpleDateFormat df8601
           
 
Fields inherited from interface com.lmsal.solarb.SotKbQuerier
FIELD_NAME, HUMAN_NAME, LONG_DESC, SHORT_DESC, TABLE_NAME
 
Constructor Summary
SotSqlQuerier()
           
 
Method Summary
 java.lang.String addGalleryEvent(java.lang.String xml, java.lang.String imageUrl, java.lang.String thumbUrl, java.lang.String galleryId)
          Adds the gallery event details to the VOEvent XML file listing already in the database.
 java.lang.String addGalleryEvent(java.lang.String xml, java.lang.String movieUrl, java.lang.String imageUrl, java.lang.String thumbUrl, java.lang.String galleryId)
          Adds the gallery event details to the VOEvent XML file listing already in the database.
 int addObservationAnnotation(java.lang.String eventId, java.lang.String author, java.lang.String institution, java.lang.String emailAddr, java.lang.String annotationTitle, java.lang.String featuresFound, java.lang.String description, java.lang.String refUrl, float xCen, float yCen, float fovX, float fovY, java.util.Date startTime, java.util.Date endTime)
           
 java.lang.String addObservationCitation(java.lang.String citedEventId, java.lang.String author, java.lang.String institution, java.lang.String emailAddr, java.lang.String observationTitle, java.lang.String featuresFound, java.lang.String description, java.lang.String refUrl, float xCen, float yCen, float fovX, float fovY, java.util.Date startTime, java.util.Date endTime)
           
 void addObservationNote(java.lang.String userId, java.lang.String eventId, java.lang.String note)
           
 void addObservationRating(java.lang.String userId, java.lang.String eventId, float rating, java.lang.String note)
           
 int addPOD(java.lang.String assignedId, java.lang.String title, java.lang.String shortText, java.lang.String fullText, java.lang.String firstName, java.lang.String lastName, java.lang.String contactInfo, java.lang.String category, float importance, java.lang.String url, java.lang.String thumbUrl, java.util.Date startTime, java.util.Date endTime, java.util.Vector seeAlso)
           
 void addPODRating(java.lang.String userId, java.lang.String assignedId, float rating, java.lang.String note)
           
 void addVOEvent(java.lang.String argXml, boolean lintMode, boolean followup)
          Common code for Planning Events, Utility Events, and Observation Events
 void addVOEvents(java.lang.String[] args, boolean lintMode, boolean followup)
          Common code for ingesting a list of XML files
 void executeUpdate(java.sql.PreparedStatement ps)
           
 void executeUpdate(java.sql.PreparedStatement ps, int retryCount)
           
 java.util.Vector getCitedEvents(java.lang.String citingEventId)
           
 java.util.Vector getCitingEvents(java.lang.String citedEventId)
           
 java.util.HashMap getEventById(java.lang.String eventId)
           
 java.lang.String getEventXml(java.lang.String eventId)
           
 java.util.HashMap getGroupNames()
           
 java.lang.String getITunes(java.lang.String channelTitle, java.lang.String description, java.util.Vector voevents)
           
 java.lang.String getKML(java.lang.String title, java.lang.String description, java.util.Vector voevents)
           
 java.util.Vector getObservationAnnotations(java.lang.String eventId)
           
 java.util.Vector getObservationNotes(java.lang.String eventId, java.lang.String userId, java.lang.String note)
           
 java.util.Vector getObservationParams(java.lang.String eventId)
           
 int getOrAddContactId(java.lang.String eventId, java.lang.String name, java.lang.String institution, java.lang.String emailAddr, java.lang.String url, java.lang.String address, java.lang.String telephone)
           
 int getOrAddInstrumentId(java.lang.String eventId, java.lang.String instrumentName)
           
 int getOrAddTelescopeId(java.lang.String eventId, java.lang.String telescopeName)
           
 int getPlanningEventCount(Filters filters)
           
 java.util.Vector getPlanningEvents(Filters filters, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getPlanningEvents(Filters filters, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getPOD(int maxCount, SortOrder sortInfo)
           
 java.util.HashMap getPODById(java.lang.String assignedId)
           
 java.util.HashMap getPODField(java.lang.String fieldName)
           
 java.util.HashMap getPODFields()
           
 int getPopularEventCount(float threshold, Filters filters)
           
 java.util.Vector getPopularEvents(float threshold, Filters filters, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getPopularEvents(float threshold, Filters filters, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getPopularPOD(float threshold, int maxCount, SortOrder sortInfo)
           
 int getRecentEventCount(int numDays, Filters filters)
           
 java.util.Vector getRecentEvents(Filters filters, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getRecentEvents(int numDays, Filters filters, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getRecentEvents(int numDays, Filters filters, int maxCount, SortOrder sortInfo)
           
 int getRecommendedEventCount(float threshold, Filters filters)
           
 java.util.Vector getRecommendedEvents(float threshold, Filters filters, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getRecommendedEvents(float threshold, Filters filters, int maxCount, SortOrder sortInfo)
           
 java.util.Vector getRecommendedPOD(float threshold, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.HashMap getReferences(java.lang.String eventId)
           
 java.lang.String getRSS(java.lang.String channelTitle, java.lang.String description, java.util.Vector voevents)
           
 int getSearchObservationCount(java.lang.String phrase)
           
 int getSearchObservationCount(java.lang.String phrase, int eventType)
           
 java.util.HashMap getVOEventField(java.lang.String fieldName)
           
 java.util.HashMap getVOEventFields()
           
static java.lang.Object hashGet(java.util.HashMap h, java.lang.String key)
           
static java.lang.Object hashGet(java.util.HashMap h, java.lang.String key, java.lang.String alternate)
           
 void incrementDetailViewCount(java.lang.String eventId)
           
 void incrementDetailViewCount(java.lang.String eventId, int count)
           
 void incrementViewPOD(java.lang.String assignedId)
           
 void incrementViewPOD(java.lang.String assignedId, int count)
           
 java.lang.String mapUserFieldname(java.lang.String fieldName)
           
static java.util.Date parseDate(java.lang.String dateStr)
           
 int PODCount()
           
 int popularPODCount(float threshold)
           
 int recommendedPODCount(float threshold)
           
 java.util.Vector searchObservations(java.lang.String phrase, int eventType, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector searchObservations(java.lang.String phrase, int startIdx, int maxCount, SortOrder sortInfo)
           
 java.util.Vector searchPOD(java.lang.String phrase, int startIdx, int maxCount, SortOrder sortInfo)
           
 void setLogger(java.util.logging.Logger nLog)
           
static java.lang.String uniqueSet(java.lang.String orig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

df8601

public static java.text.SimpleDateFormat df8601

dateFormat

public static java.text.SimpleDateFormat dateFormat

ddMmYyyyFormat

public static java.text.SimpleDateFormat ddMmYyyyFormat

ddMmYyFormat

public static java.text.SimpleDateFormat ddMmYyFormat
Constructor Detail

SotSqlQuerier

public SotSqlQuerier()
              throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

hashGet

public static java.lang.Object hashGet(java.util.HashMap h,
                                       java.lang.String key,
                                       java.lang.String alternate)

hashGet

public static java.lang.Object hashGet(java.util.HashMap h,
                                       java.lang.String key)

setLogger

public void setLogger(java.util.logging.Logger nLog)
Specified by:
setLogger in interface SotKbQuerier

getOrAddContactId

public int getOrAddContactId(java.lang.String eventId,
                             java.lang.String name,
                             java.lang.String institution,
                             java.lang.String emailAddr,
                             java.lang.String url,
                             java.lang.String address,
                             java.lang.String telephone)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getOrAddTelescopeId

public int getOrAddTelescopeId(java.lang.String eventId,
                               java.lang.String telescopeName)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getOrAddInstrumentId

public int getOrAddInstrumentId(java.lang.String eventId,
                                java.lang.String instrumentName)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getVOEventFields

public java.util.HashMap getVOEventFields()
Specified by:
getVOEventFields in interface SotKbQuerier

getVOEventField

public java.util.HashMap getVOEventField(java.lang.String fieldName)
Specified by:
getVOEventField in interface SotKbQuerier

executeUpdate

public void executeUpdate(java.sql.PreparedStatement ps,
                          int retryCount)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

executeUpdate

public void executeUpdate(java.sql.PreparedStatement ps)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

getGroupNames

public java.util.HashMap getGroupNames()
                                throws java.lang.Exception
Specified by:
getGroupNames in interface SotKbQuerier
Throws:
java.lang.Exception

getCitedEvents

public java.util.Vector getCitedEvents(java.lang.String citingEventId)
                                throws java.lang.Exception
Specified by:
getCitedEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getCitingEvents

public java.util.Vector getCitingEvents(java.lang.String citedEventId)
                                 throws java.lang.Exception
Specified by:
getCitingEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getReferences

public java.util.HashMap getReferences(java.lang.String eventId)
                                throws java.lang.Exception
Specified by:
getReferences in interface SotKbQuerier
Throws:
java.lang.Exception

getEventXml

public java.lang.String getEventXml(java.lang.String eventId)
                             throws java.lang.Exception
Specified by:
getEventXml in interface SotKbQuerier
Throws:
java.lang.Exception

getEventById

public java.util.HashMap getEventById(java.lang.String eventId)
                               throws java.lang.Exception
Specified by:
getEventById in interface SotKbQuerier
Throws:
java.lang.Exception

getPlanningEventCount

public int getPlanningEventCount(Filters filters)
                          throws java.lang.Exception
Specified by:
getPlanningEventCount in interface SotKbQuerier
Throws:
java.lang.Exception

getPlanningEvents

public java.util.Vector getPlanningEvents(Filters filters,
                                          int startIdx,
                                          int maxCount,
                                          SortOrder sortInfo)
                                   throws java.lang.Exception
Specified by:
getPlanningEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getPlanningEvents

public java.util.Vector getPlanningEvents(Filters filters,
                                          int maxCount,
                                          SortOrder sortInfo)
                                   throws java.lang.Exception
Specified by:
getPlanningEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getRecentEventCount

public int getRecentEventCount(int numDays,
                               Filters filters)
                        throws java.lang.Exception
Specified by:
getRecentEventCount in interface SotKbQuerier
Throws:
java.lang.Exception

getRecentEvents

public java.util.Vector getRecentEvents(int numDays,
                                        Filters filters,
                                        int startIdx,
                                        int maxCount,
                                        SortOrder sortInfo)
                                 throws java.lang.Exception
Specified by:
getRecentEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getRecentEvents

public java.util.Vector getRecentEvents(int numDays,
                                        Filters filters,
                                        int maxCount,
                                        SortOrder sortInfo)
                                 throws java.lang.Exception
Specified by:
getRecentEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getRecentEvents

public java.util.Vector getRecentEvents(Filters filters,
                                        int maxCount,
                                        SortOrder sortInfo)
                                 throws java.lang.Exception
Specified by:
getRecentEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getPopularEventCount

public int getPopularEventCount(float threshold,
                                Filters filters)
                         throws java.lang.Exception
Specified by:
getPopularEventCount in interface SotKbQuerier
Throws:
java.lang.Exception

getPopularEvents

public java.util.Vector getPopularEvents(float threshold,
                                         Filters filters,
                                         int startIdx,
                                         int maxCount,
                                         SortOrder sortInfo)
                                  throws java.lang.Exception
Specified by:
getPopularEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getPopularEvents

public java.util.Vector getPopularEvents(float threshold,
                                         Filters filters,
                                         int maxCount,
                                         SortOrder sortInfo)
                                  throws java.lang.Exception
Specified by:
getPopularEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getRecommendedEventCount

public int getRecommendedEventCount(float threshold,
                                    Filters filters)
                             throws java.lang.Exception
Specified by:
getRecommendedEventCount in interface SotKbQuerier
Throws:
java.lang.Exception

getRecommendedEvents

public java.util.Vector getRecommendedEvents(float threshold,
                                             Filters filters,
                                             int startIdx,
                                             int maxCount,
                                             SortOrder sortInfo)
                                      throws java.lang.Exception
Specified by:
getRecommendedEvents in interface SotKbQuerier
Throws:
java.lang.Exception

getRecommendedEvents

public java.util.Vector getRecommendedEvents(float threshold,
                                             Filters filters,
                                             int maxCount,
                                             SortOrder sortInfo)
                                      throws java.lang.Exception
Specified by:
getRecommendedEvents in interface SotKbQuerier
Throws:
java.lang.Exception

addObservationCitation

public java.lang.String addObservationCitation(java.lang.String citedEventId,
                                               java.lang.String author,
                                               java.lang.String institution,
                                               java.lang.String emailAddr,
                                               java.lang.String observationTitle,
                                               java.lang.String featuresFound,
                                               java.lang.String description,
                                               java.lang.String refUrl,
                                               float xCen,
                                               float yCen,
                                               float fovX,
                                               float fovY,
                                               java.util.Date startTime,
                                               java.util.Date endTime)
                                        throws java.lang.Exception
Specified by:
addObservationCitation in interface SotKbQuerier
Throws:
java.lang.Exception

addObservationAnnotation

public int addObservationAnnotation(java.lang.String eventId,
                                    java.lang.String author,
                                    java.lang.String institution,
                                    java.lang.String emailAddr,
                                    java.lang.String annotationTitle,
                                    java.lang.String featuresFound,
                                    java.lang.String description,
                                    java.lang.String refUrl,
                                    float xCen,
                                    float yCen,
                                    float fovX,
                                    float fovY,
                                    java.util.Date startTime,
                                    java.util.Date endTime)
                             throws java.lang.Exception
Specified by:
addObservationAnnotation in interface SotKbQuerier
Throws:
java.lang.Exception

getObservationAnnotations

public java.util.Vector getObservationAnnotations(java.lang.String eventId)
                                           throws java.lang.Exception
Specified by:
getObservationAnnotations in interface SotKbQuerier
Throws:
java.lang.Exception

addObservationNote

public void addObservationNote(java.lang.String userId,
                               java.lang.String eventId,
                               java.lang.String note)
                        throws java.lang.Exception
Specified by:
addObservationNote in interface SotKbQuerier
Throws:
java.lang.Exception

getObservationNotes

public java.util.Vector getObservationNotes(java.lang.String eventId,
                                            java.lang.String userId,
                                            java.lang.String note)
                                     throws java.lang.Exception
Specified by:
getObservationNotes in interface SotKbQuerier
Throws:
java.lang.Exception

incrementDetailViewCount

public void incrementDetailViewCount(java.lang.String eventId,
                                     int count)
                              throws java.lang.Exception
Specified by:
incrementDetailViewCount in interface SotKbQuerier
Throws:
java.lang.Exception

incrementDetailViewCount

public void incrementDetailViewCount(java.lang.String eventId)
                              throws java.lang.Exception
Specified by:
incrementDetailViewCount in interface SotKbQuerier
Throws:
java.lang.Exception

addObservationRating

public void addObservationRating(java.lang.String userId,
                                 java.lang.String eventId,
                                 float rating,
                                 java.lang.String note)
                          throws java.lang.Exception
Specified by:
addObservationRating in interface SotKbQuerier
Throws:
java.lang.Exception

getObservationParams

public java.util.Vector getObservationParams(java.lang.String eventId)
                                      throws java.lang.Exception
Specified by:
getObservationParams in interface SotKbQuerier
Throws:
java.lang.Exception

mapUserFieldname

public java.lang.String mapUserFieldname(java.lang.String fieldName)

searchObservations

public java.util.Vector searchObservations(java.lang.String phrase,
                                           int eventType,
                                           int startIdx,
                                           int maxCount,
                                           SortOrder sortInfo)
                                    throws java.lang.Exception
Specified by:
searchObservations in interface SotKbQuerier
Throws:
java.lang.Exception

searchObservations

public java.util.Vector searchObservations(java.lang.String phrase,
                                           int startIdx,
                                           int maxCount,
                                           SortOrder sortInfo)
                                    throws java.lang.Exception
Specified by:
searchObservations in interface SotKbQuerier
Throws:
java.lang.Exception

getSearchObservationCount

public int getSearchObservationCount(java.lang.String phrase,
                                     int eventType)
                              throws java.lang.Exception
Specified by:
getSearchObservationCount in interface SotKbQuerier
Throws:
java.lang.Exception

getSearchObservationCount

public int getSearchObservationCount(java.lang.String phrase)
                              throws java.lang.Exception
Specified by:
getSearchObservationCount in interface SotKbQuerier
Throws:
java.lang.Exception

getRSS

public java.lang.String getRSS(java.lang.String channelTitle,
                               java.lang.String description,
                               java.util.Vector voevents)
                        throws java.lang.Exception
Specified by:
getRSS in interface SotKbQuerier
Throws:
java.lang.Exception

getITunes

public java.lang.String getITunes(java.lang.String channelTitle,
                                  java.lang.String description,
                                  java.util.Vector voevents)
                           throws java.lang.Exception
Specified by:
getITunes in interface SotKbQuerier
Throws:
java.lang.Exception

getKML

public java.lang.String getKML(java.lang.String title,
                               java.lang.String description,
                               java.util.Vector voevents)
                        throws java.lang.Exception
Specified by:
getKML in interface SotKbQuerier
Throws:
java.lang.Exception

getPODFields

public java.util.HashMap getPODFields()
Specified by:
getPODFields in interface SotKbQuerier

getPODField

public java.util.HashMap getPODField(java.lang.String fieldName)
Specified by:
getPODField in interface SotKbQuerier

getPODById

public java.util.HashMap getPODById(java.lang.String assignedId)
                             throws java.lang.Exception
Specified by:
getPODById in interface SotKbQuerier
Throws:
java.lang.Exception

addPOD

public int addPOD(java.lang.String assignedId,
                  java.lang.String title,
                  java.lang.String shortText,
                  java.lang.String fullText,
                  java.lang.String firstName,
                  java.lang.String lastName,
                  java.lang.String contactInfo,
                  java.lang.String category,
                  float importance,
                  java.lang.String url,
                  java.lang.String thumbUrl,
                  java.util.Date startTime,
                  java.util.Date endTime,
                  java.util.Vector seeAlso)
           throws java.lang.Exception
Specified by:
addPOD in interface SotKbQuerier
Throws:
java.lang.Exception

PODCount

public int PODCount()
             throws java.lang.Exception
Specified by:
PODCount in interface SotKbQuerier
Throws:
java.lang.Exception

getPOD

public java.util.Vector getPOD(int maxCount,
                               SortOrder sortInfo)
                        throws java.lang.Exception
Specified by:
getPOD in interface SotKbQuerier
Throws:
java.lang.Exception

popularPODCount

public int popularPODCount(float threshold)
                    throws java.lang.Exception
Specified by:
popularPODCount in interface SotKbQuerier
Throws:
java.lang.Exception

getPopularPOD

public java.util.Vector getPopularPOD(float threshold,
                                      int maxCount,
                                      SortOrder sortInfo)
                               throws java.lang.Exception
Specified by:
getPopularPOD in interface SotKbQuerier
Throws:
java.lang.Exception

recommendedPODCount

public int recommendedPODCount(float threshold)
                        throws java.lang.Exception
Specified by:
recommendedPODCount in interface SotKbQuerier
Throws:
java.lang.Exception

getRecommendedPOD

public java.util.Vector getRecommendedPOD(float threshold,
                                          int startIdx,
                                          int maxCount,
                                          SortOrder sortInfo)
                                   throws java.lang.Exception
Specified by:
getRecommendedPOD in interface SotKbQuerier
Throws:
java.lang.Exception

searchPOD

public java.util.Vector searchPOD(java.lang.String phrase,
                                  int startIdx,
                                  int maxCount,
                                  SortOrder sortInfo)
                           throws java.lang.Exception
Specified by:
searchPOD in interface SotKbQuerier
Throws:
java.lang.Exception

incrementViewPOD

public void incrementViewPOD(java.lang.String assignedId,
                             int count)
                      throws java.lang.Exception
Specified by:
incrementViewPOD in interface SotKbQuerier
Throws:
java.lang.Exception

incrementViewPOD

public void incrementViewPOD(java.lang.String assignedId)
                      throws java.lang.Exception
Specified by:
incrementViewPOD in interface SotKbQuerier
Throws:
java.lang.Exception

addPODRating

public void addPODRating(java.lang.String userId,
                         java.lang.String assignedId,
                         float rating,
                         java.lang.String note)
                  throws java.lang.Exception
Specified by:
addPODRating in interface SotKbQuerier
Throws:
java.lang.Exception

parseDate

public static java.util.Date parseDate(java.lang.String dateStr)

uniqueSet

public static java.lang.String uniqueSet(java.lang.String orig)

addGalleryEvent

public java.lang.String addGalleryEvent(java.lang.String xml,
                                        java.lang.String movieUrl,
                                        java.lang.String imageUrl,
                                        java.lang.String thumbUrl,
                                        java.lang.String galleryId)
                                 throws java.lang.Exception
Adds the gallery event details to the VOEvent XML file listing already in the database. Overloaded method that includes movieUrl.

Specified by:
addGalleryEvent in interface GalleryStorage
Parameters:
xml - VOEvent XML file
movieUrl - URL pointing to movie file
imageUrl - URL pointing to image file
thumbUrl - URL pointing to thumbnail file
galleryId - ID number from web call
Returns:
event ID from VOEvent XML file
Throws:
java.lang.Exception

addGalleryEvent

public java.lang.String addGalleryEvent(java.lang.String xml,
                                        java.lang.String imageUrl,
                                        java.lang.String thumbUrl,
                                        java.lang.String galleryId)
                                 throws java.lang.Exception
Adds the gallery event details to the VOEvent XML file listing already in the database. Overloaded method that does NOT include movieUrl

Specified by:
addGalleryEvent in interface GalleryStorage
Parameters:
xml - VOEvent XML file
imageUrl - URL pointing to image file
thumbUrl - URL pointing to thumbnail file
galleryId - ID number from web call
Returns:
event ID from VOEvent XML file
Throws:
java.lang.Exception

addVOEvent

public void addVOEvent(java.lang.String argXml,
                       boolean lintMode,
                       boolean followup)
                throws java.lang.Exception
Common code for Planning Events, Utility Events, and Observation Events

Specified by:
addVOEvent in interface SotKbQuerier
Parameters:
argXml - VOEvent XML file
lintMode - If true, will activate debug mode for extra printouts
followup - If true, treated as a followup event
Throws:
java.lang.Exception

addVOEvents

public void addVOEvents(java.lang.String[] args,
                        boolean lintMode,
                        boolean followup)
                 throws java.lang.Exception
Common code for ingesting a list of XML files

Specified by:
addVOEvents in interface SotKbQuerier
Parameters:
args - A list of VOEvent XML files
lintMode - If true, will activate debug mode for extra printouts
followup - If true, treated as a followup event
Throws:
java.lang.Exception