T
- the token type of the alignment models to be created by this instancepublic abstract class AbstractAlignmentModelFactory<T> extends Object implements AlignmentModelFactory<T>
Constructor and Description |
---|
AbstractAlignmentModelFactory()
Creates a new instance of this class without an shared sequence ID manager.
|
AbstractAlignmentModelFactory(SequenceIDManager sharedIDManager)
Creates a new instance of this class using a shared sequence ID manager.
|
Modifier and Type | Method and Description |
---|---|
AlignmentModel<T> |
createNewModel(NewAlignmentModelParameterMap parameterMap)
Creates a new instance of an alignment model according to the specified parameters.
|
T |
createToken(AlignmentModel<T> alignmentModel,
String tokenRepresentation)
Creates a token using
TokenSet.tokenByRepresentation(String) . |
protected abstract AlignmentModel<T> |
doCreateNewModel(NewAlignmentModelParameterMap parameterMap) |
SequenceIDManager |
getSharedIDManager()
Returns the sequence ID manager that is shared among all model instances created by this factory.
|
boolean |
hasSharedIDManager()
Determines whether this instance uses a shared sequence ID manager.
|
public AbstractAlignmentModelFactory()
public AbstractAlignmentModelFactory(SequenceIDManager sharedIDManager)
sharedIDManager
- the sequence ID manager that will be shared by all model instances
created by this factorypublic SequenceIDManager getSharedIDManager()
null
if no shared ID manager is used by this factoryhasSharedIDManager()
public boolean hasSharedIDManager()
true
if a shared ID manager is present, false
otherwisegetSharedIDManager()
public T createToken(AlignmentModel<T> alignmentModel, String tokenRepresentation)
TokenSet.tokenByRepresentation(String)
.createToken
in interface AlignmentModelFactory<T>
alignmentModel
- the alignment model which will hold the returned tokentokenRepresentation
- the string representation of the token to be returned (e.g. read from
an alignment file)null
if no according representation was found in the setAlignmentModelFactory.createToken(info.bioinfweb.libralign.model.AlignmentModel, java.lang.String)
protected abstract AlignmentModel<T> doCreateNewModel(NewAlignmentModelParameterMap parameterMap)
public AlignmentModel<T> createNewModel(NewAlignmentModelParameterMap parameterMap)
AlignmentModelFactory
createNewModel
in interface AlignmentModelFactory<T>
parameterMap
- a map with parameters describing the requirements to be met by the returned instancenull
if this factory is not able to create an
object that meets the specified requirements