package dmt.features;
import java.util.HashMap;
import java.util.Vector;
import dmt.features.definitions.ChildrenDepthFeature;
import dmt.features.definitions.ElementDepthFeature;
import dmt.features.definitions.ElementTypeFeature;
import dmt.features.definitions.IsMissingFeature;
import dmt.features.definitions.IsTheOnlyChildFeature;
import dmt.features.definitions.ItemNumberInParentFeature;
import dmt.features.definitions.NumberOfCharsBeforeFeature;
import dmt.features.definitions.NumberOfCharsStemmedFeature;
import dmt.features.definitions.NumberOfChildrenFeature;
import dmt.features.definitions.NumberOfDescendentsFeature;
import dmt.features.definitions.NumberOfSiblingsFeature;
import dmt.features.definitions.NumberOfSiblingsSameTypeFeature;
import dmt.features.definitions.NumberOfWordsAfterFeature;
import dmt.features.definitions.NumberOfWordsBeforeFeature;
import dmt.features.definitions.NumberOfWordsStemmedFeature;
import dmt.features.definitions.SectionDepthFeature;
import dmt.features.definitions.VerifyParents;
public abstract class Feature
{
public abstract String[] getNames();
public abstract Object[] getValues(Vector<String> fields, HashMap<String, Boolean> hashMap);
protected static Vector<Feature> features = null;
public static Vector<Feature> getFeatures()
{
if(features == null)
{
registerFeatures();
}
return features;
}
public static void registerFeatures()
{
features = new Vector<Feature>();
//TODO register features
features.add(new ElementTypeFeature());
//features.add(new VerifyParents());
features.add(new IsMissingFeature());
features.add(new NumberOfWordsBeforeFeature());
features.add(new NumberOfWordsAfterFeature());
features.add(new NumberOfWordsStemmedFeature());
features.add(new NumberOfCharsBeforeFeature());
features.add(new NumberOfCharsStemmedFeature());
features.add(new ElementDepthFeature());
features.add(new ItemNumberInParentFeature());
features.add(new NumberOfChildrenFeature());
features.add(new NumberOfDescendentsFeature());
features.add(new IsTheOnlyChildFeature());
features.add(new ChildrenDepthFeature());
features.add(new SectionDepthFeature());
features.add(new NumberOfSiblingsFeature());
features.add(new NumberOfSiblingsSameTypeFeature());
}
}