A
- the alignment representation typeC
- the cell representation typeM
- the cell modifier representation typepublic abstract class AbstractBaseAlignmentLoader<A,C,M> extends Object
Constructor and Description |
---|
AbstractBaseAlignmentLoader() |
Modifier and Type | Method and Description |
---|---|
protected MutableAlignment |
createAlignment(A start,
TypeIndex sourceTypes,
TypeIndex targetTypes,
PathUpdate updater,
IOReporter reporter)
Creates an alignment from the given alignment representation.
|
protected abstract MutableCell |
createCell(C cell,
TypeIndex sourceTypes,
TypeIndex targetTypes,
IOReporter reporter)
Create a cell from the given cell representation
|
protected abstract Map<String,URI> |
getBases(A alignment)
Returns a map of prefix, URI pairs of base alignments for the given
alignment.
|
protected abstract String |
getCellId(C cell)
Returns the cell id of the given cell.
|
protected abstract Collection<C> |
getCells(A alignment)
Returns a collection of cell representations of the given alignment
representation.
|
protected abstract Collection<String> |
getDisabledForList(M modifier)
Returns the disabled for list of the given modifier representation.
|
protected abstract String |
getModifiedCell(M modifier)
Returns the raw cell id that is modified by the given modifier.
|
protected abstract Collection<M> |
getModifiers(A alignment)
Returns a collection of modifier representations of the given alignment
representation.
|
protected abstract TransformationMode |
getTransformationMode(M modifier)
Get the transformation mode specified in a modifier.
|
protected void |
internalAddBaseAlignment(MutableAlignment alignment,
URI newBase,
URI projectLocation,
TypeIndex sourceTypes,
TypeIndex targetTypes,
IOReporter reporter)
Adds the given base alignment to the given alignment.
|
protected abstract A |
loadAlignment(InputStream in,
IOReporter reporter)
Load a alignment representation from the given stream.
|
protected abstract A loadAlignment(InputStream in, IOReporter reporter) throws IOException
in
- the input streamreporter
- the I/O reporter to report any errors to, may be
null
IOException
- if some kind of exception occurs while loading the
alignmentprotected abstract Map<String,URI> getBases(A alignment)
alignment
- the alignment representation in questionprotected abstract Collection<C> getCells(A alignment)
alignment
- the alignment representation in questionprotected abstract String getCellId(C cell)
cell
- the cell in questionprotected abstract MutableCell createCell(C cell, TypeIndex sourceTypes, TypeIndex targetTypes, IOReporter reporter)
cell
- the cell representationsourceTypes
- the source types to use for resolving definition
referencestargetTypes
- the target types to use for resolving definition
referencesreporter
- the I/O reporter to report any errors to, may be
null
protected abstract Collection<M> getModifiers(A alignment)
alignment
- the alignment representation in questionprotected abstract String getModifiedCell(M modifier)
modifier
- the modifier representation in questionprotected abstract Collection<String> getDisabledForList(M modifier)
modifier
- the modifier representation in questionprotected abstract TransformationMode getTransformationMode(M modifier)
modifier
- the modifiernull
if none is specifiedprotected final void internalAddBaseAlignment(MutableAlignment alignment, URI newBase, URI projectLocation, TypeIndex sourceTypes, TypeIndex targetTypes, IOReporter reporter) throws IOException
alignment
- the alignment to add a base alignment tonewBase
- URI of the new base alignmentprojectLocation
- the project location or null
sourceTypes
- the source types to use for resolving definition
referencestargetTypes
- the target types to use for resolving definition
referencesreporter
- the I/O reporter to report any errors to, may be
null
IOException
- if adding the base alignment failsprotected final MutableAlignment createAlignment(A start, TypeIndex sourceTypes, TypeIndex targetTypes, PathUpdate updater, IOReporter reporter) throws IOException
start
- the main alignment representationsourceTypes
- the source types to use for resolving definition
referencestargetTypes
- the target types to use for resolving definition
referencesupdater
- the path updater to use for base alignmentsreporter
- the I/O reporter to report any errors to, may be
null
IOException
- if a base alignment couldn't be loadedBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a