public class StructureWriter extends Object implements WorkflowBundleWriter
WorkflowBundleWriter
that writes a WorkflowBundle
in Scufl2 Structure
format.Constructor and Description |
---|
StructureWriter() |
Modifier and Type | Method and Description |
---|---|
protected String |
bundleString(WorkflowBundle wb) |
Set<String> |
getMediaTypes()
Returns the media types that this writer can handle.
|
void |
writeBundle(WorkflowBundle wb,
File destination,
String mediaType)
Writes a
WorkflowBundle to a file with specified media type. |
void |
writeBundle(WorkflowBundle wfBundle,
OutputStream output,
String mediaType)
Writes a
WorkflowBundle to a stream with specified media type. |
protected String bundleString(WorkflowBundle wb)
public Set<String> getMediaTypes()
WorkflowBundleWriter
getMediaTypes
in interface WorkflowBundleWriter
public void writeBundle(WorkflowBundle wb, File destination, String mediaType) throws IOException
WorkflowBundleWriter
WorkflowBundle
to a file with specified media type.writeBundle
in interface WorkflowBundleWriter
wb
- the workflow bundle to writedestination
- the file to write the workflow bundle tomediaType
- the media type to write workflow bundle inIOException
- if there is an error writing the filepublic void writeBundle(WorkflowBundle wfBundle, OutputStream output, String mediaType) throws IOException
WorkflowBundleWriter
WorkflowBundle
to a stream with specified media type.writeBundle
in interface WorkflowBundleWriter
wfBundle
- the workflow bundle to writeoutput
- the stream to write the workflow bundle tomediaType
- the media type to write workflow bundle inIOException
- if there is an error writing to the streamCopyright © 2013 myGrid. All rights reserved.