Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.io.impl
Class DefaultAlignmentIO

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.io.impl.DefaultAlignmentIO

public class DefaultAlignmentIO
extends Object

Save or load an alignment

Author:
Simon Templer

Constructor Summary
DefaultAlignmentIO()
           
 
Method Summary
static MutableAlignment load(InputStream in, IOReporter reporter, TypeIndex sourceTypes, TypeIndex targetTypes)
          Load a default alignment from an input stream.
static void save(Alignment alignment, OutputStream out)
          Save a default alignment to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAlignmentIO

public DefaultAlignmentIO()
Method Detail

load

public static MutableAlignment load(InputStream in,
                                    IOReporter reporter,
                                    TypeIndex sourceTypes,
                                    TypeIndex targetTypes)
                             throws org.exolab.castor.mapping.MappingException,
                                    org.exolab.castor.xml.MarshalException,
                                    org.exolab.castor.xml.ValidationException
Load a default alignment from an input stream.

Parameters:
in - the input stream
reporter - the I/O reporter to report any errors to, may be null
sourceTypes - the source types to use for resolving definition references
targetTypes - the target types to use for resolving definition references
Returns:
the alignment
Throws:
org.exolab.castor.mapping.MappingException - if the mapping could not be loaded
org.exolab.castor.xml.MarshalException - if the alignment could not be read
org.exolab.castor.xml.ValidationException - if the input stream did not provide valid XML

save

public static void save(Alignment alignment,
                        OutputStream out)
                 throws org.exolab.castor.mapping.MappingException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        IOException
Save a default alignment to an output stream.

Parameters:
alignment - the alignment to save
out - the output stream
Throws:
org.exolab.castor.mapping.MappingException - if the mapping could not be loaded
org.exolab.castor.xml.ValidationException - if the mapping is no valid XML
org.exolab.castor.xml.MarshalException - if the alignment could not be marshaled
IOException - if the output could not be written

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d