Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.core.io.project.impl
Class DefaultProjectWriter

java.lang.Object
  extended by eu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider
      extended by eu.esdihumboldt.hale.common.core.io.impl.AbstractExportProvider
          extended by eu.esdihumboldt.hale.common.core.io.project.impl.AbstractProjectWriter
              extended by eu.esdihumboldt.hale.common.core.io.project.impl.DefaultProjectWriter
All Implemented Interfaces:
ExportProvider, IOProvider, ProjectWriter
Direct Known Subclasses:
XMLProjectWriter, ZipProjectWriter

public class DefaultProjectWriter
extends AbstractProjectWriter

Writes a project file

Author:
Simon Templer

Field Summary
static String PARAM_SEPARATE_FILES
          The configuration parameter name for detailing if project files are to be placed outside the project archive
 
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.ExportProvider
PARAM_TARGET
 
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider
PARAM_CONTENT_TYPE
 
Constructor Summary
DefaultProjectWriter(boolean archive)
           
 
Method Summary
protected  IOReport execute(ProgressIndicator progress, IOReporter reporter)
          Execute the I/O provider.
 boolean isUseSeparateFiles()
           
 void setParameter(String name, String value)
          Set a parameter
 void setUseSeparateFiles(boolean useSeparateFiles)
           
 void storeConfiguration(Map<String,String> configuration)
          Stores all parameters that were set using AbstractIOProvider.setParameter(String, String) in the configuration.
 void validate()
          Validate the I/O provider configuration
 
Methods inherited from class eu.esdihumboldt.hale.common.core.io.project.impl.AbstractProjectWriter
getDefaultTypeName, getProject, getProjectFiles, isCancelable, setProject, setProjectFiles
 
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractExportProvider
createReporter, getTarget, setTarget
 
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider
addSupportedParameter, execute, fail, getContentType, getParameter, getSupportedParameters, getTypeName, loadConfiguration, setContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.ExportProvider
getTarget, setTarget
 
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider
createReporter, execute, getContentType, getParameter, getSupportedParameters, loadConfiguration, setContentType
 

Field Detail

PARAM_SEPARATE_FILES

public static final String PARAM_SEPARATE_FILES
The configuration parameter name for detailing if project files are to be placed outside the project archive

See Also:
Constant Field Values
Constructor Detail

DefaultProjectWriter

public DefaultProjectWriter(boolean archive)
Parameters:
archive - if the project shall be saved to a ZIP archive
Method Detail

validate

public void validate()
              throws IOProviderConfigurationException
Description copied from interface: IOProvider
Validate the I/O provider configuration

Specified by:
validate in interface IOProvider
Overrides:
validate in class AbstractExportProvider
Throws:
IOProviderConfigurationException - if the I/O provider was not configured properly
See Also:
AbstractExportProvider.validate()

storeConfiguration

public void storeConfiguration(Map<String,String> configuration)
Description copied from class: AbstractIOProvider
Stores all parameters that were set using AbstractIOProvider.setParameter(String, String) in the configuration. For changing the behavior please override this method.

Specified by:
storeConfiguration in interface IOProvider
Overrides:
storeConfiguration in class AbstractExportProvider
Parameters:
configuration - the configuration to populate
See Also:
AbstractExportProvider.storeConfiguration(Map)

setParameter

public void setParameter(String name,
                         String value)
Description copied from interface: IOProvider
Set a parameter

Specified by:
setParameter in interface IOProvider
Overrides:
setParameter in class AbstractExportProvider
Parameters:
name - the parameter name
value - the parameter value
See Also:
AbstractExportProvider.setParameter(String, String)

execute

protected IOReport execute(ProgressIndicator progress,
                           IOReporter reporter)
                    throws IOProviderConfigurationException,
                           IOException
Description copied from class: AbstractIOProvider
Execute the I/O provider.

Specified by:
execute in class AbstractIOProvider
Parameters:
progress - the progress indicator
reporter - the reporter to use for the execution report
Returns:
the execution report
Throws:
IOProviderConfigurationException - if the I/O provider was not configured properly
IOException - if an I/O operation fails
See Also:
AbstractIOProvider.execute(ProgressIndicator, IOReporter)

isUseSeparateFiles

public boolean isUseSeparateFiles()
Returns:
the useSeparateFiles

setUseSeparateFiles

public void setUseSeparateFiles(boolean useSeparateFiles)
Parameters:
useSeparateFiles - the useSeparateFiles to set

Humboldt Alignment Editor 2.5.0

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