DoccatFactory (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.doccat, class: DoccatFactory

Package opennlp.tools.doccat

# Class DoccatFactory

java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.doccat.DoccatFactory

public class DoccatFactory extends BaseToolFactory
The factory that provides Doccat default implementations and resources.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DoccatFactory()`
  Instantiates a `DoccatFactory` that provides the default implementation of the resources.
  `DoccatFactory(opennlp.tools.doccat.FeatureGenerator[] featureGenerators)`
  Instantiates a `DoccatFactory` that provides the default implementation of the resources.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DoccatFactory`
  `create(String subclassName, opennlp.tools.doccat.FeatureGenerator[] featureGenerators)`
  Factory method the framework uses create a new `DoccatFactory`.
  `Map<String,String>`
  `createManifestEntries()`
  `opennlp.tools.doccat.FeatureGenerator[]`
  `getFeatureGenerators()`
  `void`
  `setFeatureGenerators(opennlp.tools.doccat.FeatureGenerator[] featureGenerators)`
  `void`
  `validateArtifactMap()`
  Validates the parsed artifacts.

  ### Methods inherited from class opennlp.tools.util.BaseToolFactory

  `create, create, createArtifactMap, createArtifactSerializersMap`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DoccatFactory

    public DoccatFactory()
    Instantiates a `DoccatFactory` that provides the default implementation of the resources.

  - ### DoccatFactory

    public DoccatFactory(opennlp.tools.doccat.FeatureGenerator[] featureGenerators)
    Instantiates a `DoccatFactory` that provides the default implementation of the resources.
    Parameters:
      `featureGenerators` - The `featureGenerators` to use.

- ## Method Details

  - ### createManifestEntries

    public Map<String,String> createManifestEntries()
    Overrides:
      `createManifestEntries` in class `BaseToolFactory`
    Returns:
      Retrieves the manifest entries to be added to the model manifest.

  - ### validateArtifactMap

    public void validateArtifactMap() throws opennlp.tools.util.InvalidFormatException
    Description copied from class: `BaseToolFactory`
    Validates the parsed artifacts.

    Note: Subclasses should generally invoke `super.validateArtifactMap` at the beginning of this method.

    Specified by:
      `validateArtifactMap` in class `BaseToolFactory`
    Throws:
      `opennlp.tools.util.InvalidFormatException` - Thrown if validation found invalid states.

  - ### create

    public static DoccatFactory create(String subclassName, opennlp.tools.doccat.FeatureGenerator[] featureGenerators) throws opennlp.tools.util.InvalidFormatException
    Factory method the framework uses create a new `DoccatFactory`.
    Parameters:
      `subclassName` - The name of the class implementing the `DoccatFactory`.
      `featureGenerators` - The `featureGenerators` to use.
    Returns:
      A valid `DoccatFactory` instance.
    Throws:
      `opennlp.tools.util.InvalidFormatException` - Thrown if the `ExtensionLoader` mechanism failed to create the factory associated with `subclassName`.

  - ### getFeatureGenerators

    public opennlp.tools.doccat.FeatureGenerator[] getFeatureGenerators()
    Returns:
      Retrieves the `generators` used.

  - ### setFeatureGenerators

    public void setFeatureGenerators(opennlp.tools.doccat.FeatureGenerator[] featureGenerators)
    Parameters:
      `featureGenerators` - The `featureGenerators` to use.