|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mckay.utilities.webservices.NetworkSearchDialog
public class NetworkSearchDialog
A JFrame dialog box that can be used to perform searches using web services that extend the NetworkSearch class. The names of the available web services are listed in the included_web_services field of this class. Although the intended purpose of this clas is to debug data mining applications, it can certainly be adapted to other purposes, including simply performing searches.
The top section of this dialog box allows the user to choose the parameters of the search to be performed. This provides an interface that is independent of the particular search service being used for any given search. The parameters are as follows:
The middle section of this dialog box displays search results. Each search can be performed using up to two search services, and the results are listed side by side. Above each results field is a combo box allowing the user to chosse which search service to utilize (if any), as well as Prev and Next buttons for navigating large sets of results. The number of results moved when a Prev or Next button is pressed is set by the Maximum resluts returned combo box. Results also include the total number of hits found, any relevant limitations of the particular search service used and information on the actual query sent to the web service that generated the result.
Searches can be initiated by pressing the PERFORM SEARCH button or by pressing Enter while the cursor is in one of the text fields.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NetworkSearchDialog(java.lang.String yahoo_application_id,
java.lang.String google_license_key)
Set up the dialog box with the default GUI parameters selected. |
|
NetworkSearchDialog(java.lang.String first_search_string,
java.lang.String second_search_string,
boolean is_literal_search,
boolean is_boolean_or,
boolean include_similar_hits,
java.lang.String first_excluded_string,
java.lang.String second_excluded_string,
java.lang.String specific_domain,
java.lang.String specific_language,
java.lang.String specific_country,
java.lang.String search_origin,
java.lang.String specific_file_type,
boolean suppress_similar_hits,
boolean suppress_adult_content,
int max_results,
java.lang.String yahoo_application_id,
java.lang.String google_license_key)
Set up the dialog box with the GUI parameters specified. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Calls the appropriate methods when the buttons are pressed. |
void |
keyPressed(java.awt.event.KeyEvent e)
Does nothing if a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
Performs a search if the enter key is released while the cursor is in one of the two search strings boxes. |
void |
keyTyped(java.awt.event.KeyEvent e)
Does nothing if a key is typed. |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Constructor Detail |
---|
public NetworkSearchDialog(java.lang.String yahoo_application_id, java.lang.String google_license_key) throws java.lang.Exception
yahoo_application_id
- The Application ID needed to identify
the applciation to Yahoo!google_license_key
- The Google license key that is to be
used to access the Google SOAP web
services.
java.lang.Exception
- Throws an informative exception if
any of the web services keys are null
or empty.public NetworkSearchDialog(java.lang.String first_search_string, java.lang.String second_search_string, boolean is_literal_search, boolean is_boolean_or, boolean include_similar_hits, java.lang.String first_excluded_string, java.lang.String second_excluded_string, java.lang.String specific_domain, java.lang.String specific_language, java.lang.String specific_country, java.lang.String search_origin, java.lang.String specific_file_type, boolean suppress_similar_hits, boolean suppress_adult_content, int max_results, java.lang.String yahoo_application_id, java.lang.String google_license_key) throws java.lang.Exception
first_search_string
- A string to base the search on,
consisting of one or more words.second_search_string
- Another string to base the search on,
consisting of one or more words.is_literal_search
- Whether the strings specified in
first_search_string and
second_search_string are to be searched
literally. If so, all words must occur
exactly as they appear and in the same
order as in first_search_string and
second_search_string to result in a hit.
This is also sometimes known as an exact
search or a phrase search.is_boolean_or
- Whether all strings in both
first_search_string and
second_search_string are searched based
on a boolean OR or AND. In the OR case,
hits will occur if some but not all of
the search words are present and in the
AND case hits will only occur if all
search words are present.include_similar_hits
- Whether hits may be included that do not
contain a specified search string but do
contain something very similar to it
(e.g. alternative spellings).first_excluded_string
- A string that may not be contained in a
hit. Also sometimes referred to as a
filter string. Set to "" if there are no
exclusions.second_excluded_string
- Another string that may not be
contained in ahit. Also sometimes
referred to as a filter string. Set to
"" if there are no exclusions.specific_domain
- A specific domain that a search can be
limited to. Set to "" if all
available sites are to be searched.specific_language
- Excludes hits that to not belong to the
specified language. An entry of
"No Limitations" places no language-
based restrictions.specific_country
- Excludes hits that are not located in
the specified country. An entry of
"No Limitations" places no location-
based restrictions.search_origin
- Performs the search using services
located in the specified country, if
possible. An entry of "No Limitations"
causes the default service to be used.specific_file_type
- Only searches for files of the specified
type (extension). An entry of "No
Limitations" places no file type-based
restrictions.suppress_similar_hits
- Whether to suppress similar hits, namely
ones with identical titles and
descriptions or multiple hits from the
same host.suppress_adult_content
- Whether to suppress hits that are
classified as adult by the search
service.max_results
- Specifies the maximum number of results
for which the details will be reported.
This is not a maximum on the number of
overall hits reported.yahoo_application_id
- The Application ID needed to identify
the applciation to Yahoo!google_license_key
- The Google license key that is to be
used to access the Google SOAP web
services.
java.lang.Exception
- Throws an informative exception if
any of the web services keys are null
or empty.Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The event that is to be reacted to.public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
e
- An event generated by a key being released.public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
e
- An event generated by a key being pressed.public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
e
- An event generated by a key being typed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |