/** * Creates a new instance of a TcFeature * * @param featureName * The class of a feature extractor * @param parameters * The configuration parameters for this feature extractor * @return Configured feature which has a randomly assigned unique identification */ public static TcFeature create(Class<? extends Resource> featureName, Object... parameters) { /* * Each feature has to set a unique name which is build from the simple name of the feature * class and extended with a random value */ String id = featureName.getSimpleName() + System.nanoTime(); List<Object> params = getParameterAsString(parameters); params.add(FeatureExtractorResource_ImplBase.PARAM_UNIQUE_EXTRACTOR_NAME); params.add(id); TcFeature tcFeature = new TcFeature(featureName, id, params.toArray()); return tcFeature; }
/** * Creates a new instance of a TcFeature * * @param featureName * The class of a feature extractor * @param parameters * The configuration parameters for this feature extractor * @return Configured feature which has a randomly assigned unique identification */ public static TcFeature create(Class<? extends Resource> featureName, Object... parameters) { /* * Each feature has to set a unique name which is build from the simple name of the feature * class and extended with a random value */ String id = featureName.getSimpleName() + System.nanoTime(); List<Object> params = getParameterAsString(parameters); params.add(FeatureExtractorResource_ImplBase.PARAM_UNIQUE_EXTRACTOR_NAME); params.add(id); TcFeature tcFeature = new TcFeature(featureName, id, params.toArray()); return tcFeature; }
/** * Creates a new instance of a TcFeature which allows the user to set an own id * * @param id * The id of the feature which must be unique among all used features * @param featureName * The class of the feature extractor that shall be instantiated * @param parameters * The list of the parameters for this feature extractor * @return A configured feature which is identified by a user provided identification string */ public static TcFeature create(String id, Class<? extends Resource> featureName, Object... parameters) { /* * Each feature has to set a unique name which is build from the simple name of the feature * class and extended with a random value */ List<Object> params = getParameterAsString(parameters); params.add(FeatureExtractorResource_ImplBase.PARAM_UNIQUE_EXTRACTOR_NAME); params.add(id); TcFeature tcFeature = new TcFeature(featureName, id, params.toArray()); return tcFeature; }
/** * Creates a new instance of a TcFeature which allows the user to set an own id * * @param id * The id of the feature which must be unique among all used features * @param featureName * The class of the feature extractor that shall be instantiated * @param parameters * The list of the parameters for this feature extractor * @return A configured feature which is identified by a user provided identification string */ public static TcFeature create(String id, Class<? extends Resource> featureName, Object... parameters) { /* * Each feature has to set a unique name which is build from the simple name of the feature * class and extended with a random value */ List<Object> params = getParameterAsString(parameters); params.add(FeatureExtractorResource_ImplBase.PARAM_UNIQUE_EXTRACTOR_NAME); params.add(id); TcFeature tcFeature = new TcFeature(featureName, id, params.toArray()); return tcFeature; }