public class JaxbAlignmentIO extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALIGNMENT_CONTEXT
The JAXB context path for alignments.
|
Constructor and Description |
---|
JaxbAlignmentIO() |
Modifier and Type | Method and Description |
---|---|
static void |
addBaseAlignment(MutableAlignment alignment,
URI newBase,
URI projectLocation,
TypeIndex sourceTypes,
TypeIndex targetTypes,
IOReporter reporter)
Adds the given base alignment to the given alignment.
|
static MutableAlignment |
load(InputStream in,
IOReporter reporter,
TypeIndex sourceTypes,
TypeIndex targetTypes,
PathUpdate updater)
Load a default alignment from an input stream.
|
static void |
save(Alignment alignment,
IOReporter reporter,
OutputStream out,
PathUpdate pathUpdate)
Save a default alignment to an output stream.
|
public static final String ALIGNMENT_CONTEXT
public static MutableAlignment load(InputStream in, IOReporter reporter, TypeIndex sourceTypes, TypeIndex targetTypes, PathUpdate updater) throws JAXBException, IOException
in
- the input streamreporter
- the I/O reporter to report any errors to, may be
null
sourceTypes
- 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 alignmentsJAXBException
- if reading the alignment failedIOException
- if loading of base alignments failedpublic static void addBaseAlignment(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 failedpublic static void save(Alignment alignment, IOReporter reporter, OutputStream out, PathUpdate pathUpdate) throws Exception
alignment
- the alignment to savereporter
- the I/O reporter to report any errors to, may be
null
out
- the output streampathUpdate
- to update relative paths in case of a path changeException
- if converting or writing the alignment failsBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a