public class FindWithCapabilities extends java.lang.Object implements OptionHandler, CapabilitiesHandler, RevisionHandler
All class and attribute options can be prefixed with 'not', e.g., '-not-numeric-class'. This makes sure that the returned schemes 'cannot' handle numeric classes.
-num-instances <num> The minimum number of instances (default 1).
-unary-class Must handle unray classes.
-binary-class Must handle binary classes.
-nominal-class Must handle nominal classes.
-numeric-class Must handle numeric classes.
-string-class Must handle string classes.
-date-class Must handle date classes.
-relational-class Must handle relational classes.
-missing-class-values Must handle missing class values.
-no-class Doesn't need a class.
-unary-atts Must handle unary attributes.
-binary-atts Must handle binary attributes.
-nominal-atts Must handle nominal attributes.
-numeric-atts Must handle numeric attributes.
-string-atts Must handle string attributes.
-date-atts Must handle date attributes.
-relational-atts Must handle relational attributes.
-missing-att-values Must handle missing attribute values.
-only-multiinstance Must handle multi-instance data.
-W <classname> The Capabilities handler to base the handling on. The other parameters can be used to override the ones determined from the handler. Additional parameters for handler can be passed on after the '--'. Either '-W' or '-t' can be used.
-t <file> The dataset to base the capabilities on. The other parameters can be used to override the ones determined from the handler. Either '-t' or '-W' can be used.
-c <num> The index of the class attribute, -1 for none. 'first' and 'last' are also valid. Only in conjunction with option '-t'.
-superclass Superclass to look for in the packages.
-packages Comma-separated list of packages to search in.
-generic Retrieves the package list from the GenericPropertiesCreator for the given superclass. (overrides -packages <list>).
-misses Also prints the classname that didn't match the criteria.
Capabilities
,
Capabilities.Capability
,
GenericPropertiesCreator
Constructor and Description |
---|
FindWithCapabilities() |
Modifier and Type | Method and Description |
---|---|
void |
disable(Capabilities.Capability c)
disables the given capability.
|
void |
disableNot(Capabilities.Capability c)
disables the given "not to have" capability.
|
void |
enable(Capabilities.Capability c)
enables the given capability.
|
void |
enableNot(Capabilities.Capability c)
enables the given "not to have" capability.
|
java.util.Vector |
find()
returns a list with all the classnames that fit the criteria.
|
Capabilities |
getCapabilities()
The capabilities to search for.
|
java.lang.String |
getClassIndex()
returns the current current class index, -1 if no class attribute.
|
java.lang.String |
getFilename()
returns the current filename for the dataset to base the capabilities on.
|
CapabilitiesHandler |
getHandler()
returns the current set CapabilitiesHandler to generate the dataset
for, can be null.
|
java.util.Vector |
getMatches()
returns the matches from the last find call.
|
java.util.Vector |
getMisses()
returns the misses from the last find call.
|
Capabilities |
getNotCapabilities()
The "not to have" capabilities to search for.
|
java.lang.String[] |
getOptions()
Gets the current settings of this object.
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
handles(Capabilities.Capability c)
returns true if the given capability can be handled.
|
boolean |
isEnabled(Capabilities.Capability c)
whether the given capability is enabled.
|
boolean |
isEnabledNot(Capabilities.Capability c)
whether the given "not to have" capability is enabled.
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
Executes the location of classes with parameters from the commandline.
|
void |
setCapabilities(Capabilities c)
Uses the given Capabilities for the search.
|
void |
setClassIndex(java.lang.String value)
sets the class index, -1 for none, first and last are also valid.
|
void |
setFilename(java.lang.String value)
Sets the dataset filename to base the capabilities on.
|
void |
setHandler(CapabilitiesHandler value)
sets the Capabilities handler to generate the data for.
|
void |
setNotCapabilities(Capabilities c)
Uses the given "not to have" Capabilities for the search.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public void setHandler(CapabilitiesHandler value)
value
- the handlerpublic CapabilitiesHandler getHandler()
public void setFilename(java.lang.String value)
value
- the filename of the datasetpublic java.lang.String getFilename()
public void setClassIndex(java.lang.String value)
value
- the class indexpublic java.lang.String getClassIndex()
public void enable(Capabilities.Capability c)
c
- the capability to enablepublic boolean isEnabled(Capabilities.Capability c)
c
- the capability to enablepublic void disable(Capabilities.Capability c)
c
- the capability to disablepublic void enableNot(Capabilities.Capability c)
c
- the capability to enablepublic boolean isEnabledNot(Capabilities.Capability c)
c
- the capability to enablepublic void disableNot(Capabilities.Capability c)
c
- the capability to disablepublic boolean handles(Capabilities.Capability c)
c
- the capability to checkpublic Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
Capabilities
public void setCapabilities(Capabilities c)
c
- the capabilities to use for the searchpublic Capabilities getNotCapabilities()
Capabilities
public void setNotCapabilities(Capabilities c)
c
- the capabilities to use for the searchpublic java.util.Vector getMatches()
public java.util.Vector getMisses()
public java.util.Vector find()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] args)
args
- the commandline parameters