@Override public void postExecution() throws Exception { if (getClassifier() instanceof CommandlineRunnable) { ((CommandlineRunnable) getClassifier()).postExecution(); } } }
@Override public void postExecution() throws Exception { if (getClassifier() instanceof CommandlineRunnable) { ((CommandlineRunnable) getClassifier()).postExecution(); } } }
@Override public void preExecution() throws Exception { if (getClassifier() instanceof CommandlineRunnable) { ((CommandlineRunnable) getClassifier()).preExecution(); } }
@Override public void preExecution() throws Exception { if (getClassifier() instanceof CommandlineRunnable) { ((CommandlineRunnable) getClassifier()).preExecution(); } }
/** * Gets the classifier specification string, which contains the class name of * the classifier and any options to the classifier * * @return the classifier string */ protected String getClassifierSpec() { Classifier c = getClassifier(); return c.getClass().getName() + " " + Utils.joinOptions(((OptionHandler)c).getOptions()); }
/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-W"); options.add(getClassifier().getClass().getName()); Collections.addAll(options, super.getOptions()); String[] classifierOptions = ((OptionHandler)m_Classifier).getOptions(); if (classifierOptions.length > 0) { options.add("--"); Collections.addAll(options, classifierOptions); } return options.toArray(new String[0]); }
/** * Gets the classifier specification string, which contains the class name of * the classifier and any options to the classifier * * @return the classifier string */ protected String getClassifierSpec() { Classifier c = getClassifier(); return c.getClass().getName() + " " + Utils.joinOptions(((OptionHandler)c).getOptions()); }
/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-W"); options.add(getClassifier().getClass().getName()); Collections.addAll(options, super.getOptions()); String[] classifierOptions = ((OptionHandler)m_Classifier).getOptions(); if (classifierOptions.length > 0) { options.add("--"); Collections.addAll(options, classifierOptions); } return options.toArray(new String[0]); }
/** * Returns default capabilities of the base classifier. * * @return the capabilities of the base classifier */ public Capabilities getCapabilities() { Capabilities result; if (getClassifier() != null) { result = getClassifier().getCapabilities(); } else { result = new Capabilities(this); result.disableAll(); } // set dependencies for (Capability cap: Capability.values()) result.enableDependency(cap); result.setOwner(this); return result; }
/** * Returns default capabilities of the base classifier. * * @return the capabilities of the base classifier */ public Capabilities getCapabilities() { Capabilities result; if (getClassifier() != null) { result = getClassifier().getCapabilities(); } else { result = new Capabilities(this); result.disableAll(); } // set dependencies for (Capability cap: Capability.values()) result.enableDependency(cap); result.setOwner(this); return result; }