public class SimilarityPanel extends javax.swing.JPanel implements TopicSelector
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
boolean |
ALLOW_PARTIAL_MATCH |
private javax.swing.JPanel |
compareToPanel |
private javax.swing.JPanel |
containerPanel |
private javax.swing.JLabel |
gapCostLabel |
private javax.swing.JTextField |
gapCostTextField |
private javax.swing.JPanel |
jPanel1 |
private javax.swing.JPanel |
jPanel2 |
private javax.swing.JPanel |
jPanel3 |
private javax.swing.JSeparator |
jSeparator1 |
private SimpleLabel |
message |
private javax.swing.JTabbedPane |
optionsTabbedPane |
private javax.swing.JPanel |
resultPanel |
private javax.swing.JPanel |
resultPanelContainer |
private javax.swing.JScrollPane |
resultScrollPane |
private TopicTable |
resultsTable |
private javax.swing.JPanel |
runButtonPanel |
private javax.swing.JButton |
searchButton |
static int |
SIMILARITY_BLOCK_DISTANCE |
static int |
SIMILARITY_COSINE_SIMILARITY |
static int |
SIMILARITY_DICES_COEFFICIENT |
static int |
SIMILARITY_EUCLIDEAN_DISTANCE |
static int |
SIMILARITY_GOTOH_DISTANCE |
static int |
SIMILARITY_JACCARD_SIMILARITY |
static int |
SIMILARITY_JARO_DISTANCE_METRIC |
static int |
SIMILARITY_JARO_WINKLER |
static int |
SIMILARITY_LEVENSHTEIN_DISTANCE |
static int |
SIMILARITY_MATCHING_COEFFICIENT |
static int |
SIMILARITY_MONGE_ELKAN_DISTANCE |
static int |
SIMILARITY_NEEDLEMAN_WUNCH_DISTANCE |
static int |
SIMILARITY_OVERLAP_COEFFICIENT |
static int |
SIMILARITY_Q_GRAM |
static int |
SIMILARITY_SMITH_WATERMAN_DISTANCE |
static int |
SIMILARITY_SOUNDEX_DISTANCE_METRIC |
private javax.swing.JCheckBox |
similarityBasenameCheckBox |
private javax.swing.JCheckBox |
similarityDifferenceCheckBox |
private javax.swing.JPanel |
similaritygapCostPanel |
private javax.swing.JCheckBox |
similarityOccurrenceCheckBox |
private javax.swing.JPanel |
similarityPanel |
private javax.swing.JPanel |
similarityPanelInner |
private javax.swing.JCheckBox |
similaritySICheckBox |
private javax.swing.JCheckBox |
similaritySLCheckBox |
private javax.swing.JTextField |
similarityTextField |
private javax.swing.JPanel |
similarityTextPanel |
private javax.swing.JSlider |
similarityThresholdSlider |
private javax.swing.JTextField |
similarityThresholdTextField |
private javax.swing.JComboBox |
similarityTokenizerComboBox |
private javax.swing.JLabel |
similarityTokenizerLabel |
private javax.swing.JPanel |
similarityTokenizerPanel |
Tuples.T2[] |
similarityTokenizers |
private javax.swing.JComboBox |
similarityTypeComboBox |
private javax.swing.JPanel |
similarityTypePanel |
Tuples.T2[] |
similarityTypes |
private javax.swing.JCheckBox |
similarityVariantCheckBox |
private javax.swing.JPanel |
thresholdInnerPanel |
private javax.swing.JPanel |
thresholdPanel |
private javax.swing.JPanel |
tokenizerPanel |
private javax.swing.JCheckBox |
useNGrams |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
SimilarityPanel()
Creates new form SimilarityPanel
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
doSearch() |
float |
getGapCost(float defaultValue) |
java.awt.Component |
getPanel()
Returns the panel used to make selection.
|
Topic |
getSelectedTopic()
Returns the selected topic.
|
Topic[] |
getSelectedTopics()
Returns an array of selected topics.
|
java.lang.String |
getSelectorName()
Gets the name of the selector.
|
TopicMapSearchOptions |
getSimilarityOptions() |
java.lang.String |
getSimilarityQuery() |
float |
getSimilarityThreshold() |
uk.ac.shef.wit.simmetrics.tokenisers.InterfaceTokeniser |
getSimilarityTokenizer() |
int |
getSimilarityType() |
java.util.Collection<Topic> |
getSimilarTopics(java.lang.String query,
TopicMapSearchOptions options,
java.util.Iterator<Topic> topicIterator,
int similarityType,
float threshold,
boolean differenceInsteadOfSimilarity) |
java.util.Collection<Topic> |
getSimilarTopics(TopicMap tm) |
uk.ac.shef.wit.simmetrics.similaritymetrics.InterfaceStringMetric |
getStringMetric(int similarityType) |
boolean |
getUseNGrams() |
void |
init() |
private void |
initComponents()
This method is called from within the constructor to initialize the form.
|
void |
refresh() |
void |
removeResultScrollPanesMouseListeners() |
private void |
searchButtonActionPerformed(java.awt.event.ActionEvent evt) |
private void |
similarityThresholdSliderMouseDragged(java.awt.event.MouseEvent evt) |
private void |
similarityThresholdSliderMousePressed(java.awt.event.MouseEvent evt) |
private void |
similarityThresholdSliderMouseReleased(java.awt.event.MouseEvent evt) |
private void |
similarityTokenizerComboBoxActionPerformed(java.awt.event.ActionEvent evt) |
private void |
similarityTypeComboBoxActionPerformed(java.awt.event.ActionEvent evt) |
private void |
updateSimilarityOptions() |
void |
updateSimilarityThreshold() |
void |
updateTokenizerOptions() |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public boolean ALLOW_PARTIAL_MATCH
public static final int SIMILARITY_LEVENSHTEIN_DISTANCE
public static final int SIMILARITY_NEEDLEMAN_WUNCH_DISTANCE
public static final int SIMILARITY_SMITH_WATERMAN_DISTANCE
public static final int SIMILARITY_GOTOH_DISTANCE
public static final int SIMILARITY_BLOCK_DISTANCE
public static final int SIMILARITY_MONGE_ELKAN_DISTANCE
public static final int SIMILARITY_JARO_DISTANCE_METRIC
public static final int SIMILARITY_JARO_WINKLER
public static final int SIMILARITY_SOUNDEX_DISTANCE_METRIC
public static final int SIMILARITY_MATCHING_COEFFICIENT
public static final int SIMILARITY_DICES_COEFFICIENT
public static final int SIMILARITY_JACCARD_SIMILARITY
public static final int SIMILARITY_OVERLAP_COEFFICIENT
public static final int SIMILARITY_EUCLIDEAN_DISTANCE
public static final int SIMILARITY_COSINE_SIMILARITY
public static final int SIMILARITY_Q_GRAM
public Tuples.T2[] similarityTypes
public Tuples.T2[] similarityTokenizers
private TopicTable resultsTable
private SimpleLabel message
private javax.swing.JPanel compareToPanel
private javax.swing.JPanel containerPanel
private javax.swing.JLabel gapCostLabel
private javax.swing.JTextField gapCostTextField
private javax.swing.JPanel jPanel1
private javax.swing.JPanel jPanel2
private javax.swing.JPanel jPanel3
private javax.swing.JSeparator jSeparator1
private javax.swing.JTabbedPane optionsTabbedPane
private javax.swing.JPanel resultPanel
private javax.swing.JPanel resultPanelContainer
private javax.swing.JScrollPane resultScrollPane
private javax.swing.JPanel runButtonPanel
private javax.swing.JButton searchButton
private javax.swing.JCheckBox similarityBasenameCheckBox
private javax.swing.JCheckBox similarityDifferenceCheckBox
private javax.swing.JCheckBox similarityOccurrenceCheckBox
private javax.swing.JPanel similarityPanel
private javax.swing.JPanel similarityPanelInner
private javax.swing.JCheckBox similaritySICheckBox
private javax.swing.JCheckBox similaritySLCheckBox
private javax.swing.JTextField similarityTextField
private javax.swing.JPanel similarityTextPanel
private javax.swing.JSlider similarityThresholdSlider
private javax.swing.JTextField similarityThresholdTextField
private javax.swing.JComboBox similarityTokenizerComboBox
private javax.swing.JLabel similarityTokenizerLabel
private javax.swing.JPanel similarityTokenizerPanel
private javax.swing.JComboBox similarityTypeComboBox
private javax.swing.JPanel similarityTypePanel
private javax.swing.JCheckBox similarityVariantCheckBox
private javax.swing.JPanel similaritygapCostPanel
private javax.swing.JPanel thresholdInnerPanel
private javax.swing.JPanel thresholdPanel
private javax.swing.JPanel tokenizerPanel
private javax.swing.JCheckBox useNGrams
public void removeResultScrollPanesMouseListeners()
public java.lang.String getSimilarityQuery()
public int getSimilarityType()
public uk.ac.shef.wit.simmetrics.tokenisers.InterfaceTokeniser getSimilarityTokenizer()
public TopicMapSearchOptions getSimilarityOptions()
public float getSimilarityThreshold()
public void updateSimilarityThreshold()
public java.util.Collection<Topic> getSimilarTopics(TopicMap tm) throws TopicMapException
TopicMapException
public uk.ac.shef.wit.simmetrics.similaritymetrics.InterfaceStringMetric getStringMetric(int similarityType)
public java.util.Collection<Topic> getSimilarTopics(java.lang.String query, TopicMapSearchOptions options, java.util.Iterator<Topic> topicIterator, int similarityType, float threshold, boolean differenceInsteadOfSimilarity)
private void updateSimilarityOptions()
public void updateTokenizerOptions()
public float getGapCost(float defaultValue)
public boolean getUseNGrams()
public void refresh()
public void doSearch()
private void initComponents()
private void similarityTypeComboBoxActionPerformed(java.awt.event.ActionEvent evt)
private void similarityTokenizerComboBoxActionPerformed(java.awt.event.ActionEvent evt)
private void similarityThresholdSliderMousePressed(java.awt.event.MouseEvent evt)
private void similarityThresholdSliderMouseReleased(java.awt.event.MouseEvent evt)
private void similarityThresholdSliderMouseDragged(java.awt.event.MouseEvent evt)
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt)
public Topic getSelectedTopic()
TopicSelector
getSelectedTopic
in interface TopicSelector
public Topic[] getSelectedTopics()
TopicSelector
getSelectedTopics
in interface TopicSelector
public java.awt.Component getPanel()
TopicSelector
getPanel
in interface TopicSelector
public java.lang.String getSelectorName()
TopicSelector
getSelectorName
in interface TopicSelector
public void init()
init
in interface TopicSelector
public void cleanup()
cleanup
in interface TopicSelector
Copyright 2004-2015 Wandora Team