org.embl.ebi.escience.scuflui.facets
Class RegexScanner.Scanner

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.facets.RegexScanner.Scanner
All Implemented Interfaces:
FacetFinderSPI.ColumnID
Enclosing class:
RegexScanner

public static class RegexScanner.Scanner
extends java.lang.Object
implements FacetFinderSPI.ColumnID

A column that describes how to turn regular expression matches into facets.

In the case of no matches, the empty string is returned. If the joinValues option is enabled, then all matches are concatenated into a single string, seperated by the value of joinText. If joinValues is not enabled, then makeCollections is considered. When makeCollections is enabled, a List containing every match is returned. If it is not enabled, then the first match only is returned.

Author:
Matthew Pocock

Constructor Summary
RegexScanner.Scanner()
           
RegexScanner.Scanner(java.util.regex.Pattern pattern, int group, boolean makeCollection)
           
RegexScanner.Scanner(java.util.regex.Pattern pattern, int group, java.lang.String joinText)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener that will be informed whenever any property of the column alters that could affect the data the column would return.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 boolean equals(java.lang.Object o)
           
 java.awt.Component getCustomiser(DataThing dataThing)
          Get a component able to customise this column, given a hint object, or null if the column is not customisable.
 int getGroup()
           
 java.lang.String getJoinText()
           
 boolean getJoinValues()
           
 boolean getMakeCollection()
           
 java.lang.String getName()
          Get a human readable name for this column.
 java.util.regex.Pattern getPattern()
           
 int hashCode()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void setGroup(int group)
           
 void setJoinText(java.lang.String joinText)
           
 void setJoinValues(boolean joinValues)
           
 void setMakeCollection(boolean makeCollection)
           
 void setPattern(java.util.regex.Pattern pattern)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexScanner.Scanner

public RegexScanner.Scanner()

RegexScanner.Scanner

public RegexScanner.Scanner(java.util.regex.Pattern pattern,
                            int group,
                            java.lang.String joinText)

RegexScanner.Scanner

public RegexScanner.Scanner(java.util.regex.Pattern pattern,
                            int group,
                            boolean makeCollection)
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: FacetFinderSPI.ColumnID
Add a property change listener that will be informed whenever any property of the column alters that could affect the data the column would return.

Specified by:
addPropertyChangeListener in interface FacetFinderSPI.ColumnID
Parameters:
listener - the PropertyChangeListener to register

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: FacetFinderSPI.ColumnID
Remove a property change listener.

Specified by:
removePropertyChangeListener in interface FacetFinderSPI.ColumnID
Parameters:
listener - the PropertyChangeListener to unregister

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface FacetFinderSPI.ColumnID

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface FacetFinderSPI.ColumnID

getPattern

public java.util.regex.Pattern getPattern()

setPattern

public void setPattern(java.util.regex.Pattern pattern)

getGroup

public int getGroup()

setGroup

public void setGroup(int group)

getJoinValues

public boolean getJoinValues()

setJoinValues

public void setJoinValues(boolean joinValues)

getJoinText

public java.lang.String getJoinText()

setJoinText

public void setJoinText(java.lang.String joinText)

getMakeCollection

public boolean getMakeCollection()

setMakeCollection

public void setMakeCollection(boolean makeCollection)

getCustomiser

public java.awt.Component getCustomiser(DataThing dataThing)
Description copied from interface: FacetFinderSPI.ColumnID
Get a component able to customise this column, given a hint object, or null if the column is not customisable.

Specified by:
getCustomiser in interface FacetFinderSPI.ColumnID
Parameters:
dataThing - an example DataThing this column will act upon
Returns:
a Component suitable for editing this column

getName

public java.lang.String getName()
Description copied from interface: FacetFinderSPI.ColumnID
Get a human readable name for this column. This may change as column properties change.

Specified by:
getName in interface FacetFinderSPI.ColumnID
Returns:
a name for this column

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object