|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.tools.util.BaseToolFactory
public abstract class BaseToolFactory
Base class for all tool factories. Extensions of this class should:
ArtifactProvider
and calls #BaseToolFactory(Map)
createArtifactMap()
and createArtifactSerializersMap()
methods if necessary.
Constructor Summary | |
---|---|
BaseToolFactory()
All sub-classes should have an empty constructor |
Method Summary | |
---|---|
static BaseToolFactory |
create(Class<? extends BaseToolFactory> factoryClass,
ArtifactProvider artifactProvider)
|
static BaseToolFactory |
create(String subclassName,
ArtifactProvider artifactProvider)
|
Map<String,Object> |
createArtifactMap()
Creates a Map with pairs of keys and objects. |
Map<String,ArtifactSerializer> |
createArtifactSerializersMap()
Creates a Map with pairs of keys and ArtifactSerializer . |
Map<String,String> |
createManifestEntries()
Creates the manifest entries that will be added to the model manifest |
abstract void |
validateArtifactMap()
Validates the parsed artifacts. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseToolFactory()
Method Detail |
---|
public Map<String,ArtifactSerializer> createArtifactSerializersMap()
Map
with pairs of keys and ArtifactSerializer
.
The models implementation should call this method from
BaseModel#createArtifactSerializersMap
The base implementation will return a HashMap
that should be
populated by sub-classes.
public Map<String,Object> createArtifactMap()
Map
with pairs of keys and objects. The models
implementation should call this constructor that creates a model
programmatically.
The base implementation will return a HashMap
that should be
populated by sub-classes.
public Map<String,String> createManifestEntries()
public abstract void validateArtifactMap() throws InvalidFormatException
InvalidFormatException
.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.
InvalidFormatException
public static BaseToolFactory create(String subclassName, ArtifactProvider artifactProvider) throws InvalidFormatException
InvalidFormatException
public static BaseToolFactory create(Class<? extends BaseToolFactory> factoryClass, ArtifactProvider artifactProvider) throws InvalidFormatException
InvalidFormatException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |