public abstract class AbstractPortObject extends Object implements PortObject
PortObject) has the advantage that the serializing methods are enforced by abstract methods (rather than defining a static method with a particular name as given by the interface).
Subclasses must provide an empty no-arg constructor with public scope (which will be used to restore the content). They are encouraged to also provide a convenience access member such as
public static final PortType TYPE = new PortType(FooModelPortObject.class);and to narrow the return type of the
getSpec()method. Derived classes don't need to provide a static serializer method as required by the interface
|Modifier and Type||Class and Description|
Abstract implementation of the a serializer for all
|Constructor and Description|
Public no-arg constructor.
|Modifier and Type||Method and Description|
Loads the content into the freshly instantiated object.
Saves this object to an output stream.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected abstract void save(PortObjectZipOutputStream out, ExecutionMonitor exec) throws IOException, CanceledExecutionException
#savePortObject(PortObject, PortObjectZipOutputStream, ExecutionMonitor).
protected abstract void load(PortObjectZipInputStream in, PortObjectSpec spec, ExecutionMonitor exec) throws IOException, CanceledExecutionException
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.