public class CastorAlignmentIO extends Object
Constructor and Description |
---|
CastorAlignmentIO() |
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,
OutputStream out,
PathUpdate pathUpdate)
Save a default alignment to an output stream.
|
public static MutableAlignment load(InputStream in, IOReporter reporter, TypeIndex sourceTypes, TypeIndex targetTypes, PathUpdate updater) throws org.exolab.castor.mapping.MappingException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, 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 alignmentsorg.exolab.castor.mapping.MappingException
- if the mapping could not be loadedorg.exolab.castor.xml.MarshalException
- if the alignment could not be readorg.exolab.castor.xml.ValidationException
- if the input stream did not provide valid XMLIOException
- 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 failspublic static void save(Alignment alignment, OutputStream out, PathUpdate pathUpdate) throws org.exolab.castor.mapping.MappingException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
alignment
- the alignment to saveout
- the output streampathUpdate
- to update relative paths in case of a path changeorg.exolab.castor.mapping.MappingException
- if the mapping could not be loadedorg.exolab.castor.xml.ValidationException
- if the mapping is no valid XMLorg.exolab.castor.xml.MarshalException
- if the alignment could not be marshaledIOException
- if the output could not be writtenBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a