T - the type of the target@ParametersAreNonnullByDefault public abstract class AbstractWriter<T> extends Object implements Writer
Writer that acts as an accumulator of multi-value features in order to notify them once. This
 allow to use batch methods in a DataMapper, and ensure the call order
 when writing in a file.| Modifier and Type | Field and Description | 
|---|---|
| protected T | targetThe target where to write data. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractWriter(T target)Constructs a new  AbstractWriterwith the giventarget. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | onAttribute(ProxyAttribute attribute)Handles an attribute in the current element. | 
| abstract void | onAttribute(ProxyAttribute attribute,
           List<Object> values)Handles an attribute in the current element. | 
| void | onEndElement()Handles the end of the current element. | 
| void | onReference(ProxyReference reference)Handles a reference from the current element to another. | 
| abstract void | onReference(ProxyReference reference,
           List<Id> values)Handles a reference in the current element. | 
| void | onStartElement(ProxyElement element)Handles the start of an element. | 
| protected boolean | requireEndBeforeFlush()Returns  trueif this writer requires the end of the current element before flushing all features,
 otherwise, all features will be flushed as soon as another feature is intercepted. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonComplete, onInitializeprotected AbstractWriter(T target)
AbstractWriter with the given target.target - the target where to write data@OverridingMethodsMustInvokeSuper public void onStartElement(ProxyElement element) throws IOException
HandleronStartElement in interface Handlerelement - the element of the new elementIOExceptionHandler.onEndElement(), 
Notifier.notifyStartElement(ProxyElement)public final void onAttribute(ProxyAttribute attribute) throws IOException
HandleronAttribute in interface Handlerattribute - the new attributeIOExceptionHandler.onStartElement(ProxyElement), 
Notifier.notifyAttribute(ProxyAttribute)public final void onReference(ProxyReference reference) throws IOException
HandleronReference in interface Handlerreference - the new referenceIOExceptionHandler.onStartElement(ProxyElement), 
Notifier.notifyReference(ProxyReference)@OverridingMethodsMustInvokeSuper public void onEndElement() throws IOException
HandleronEndElement in interface HandlerIOExceptionHandler.onStartElement(ProxyElement), 
Notifier.notifyEndElement()public abstract void onAttribute(ProxyAttribute attribute, List<Object> values) throws IOException
attribute - the new attribute, without its valuevalues - the ordered values of the attribute; when the attribute is single-valued, this parameter
                  is a Collections.singletonList(Object)IOExceptionpublic abstract void onReference(ProxyReference reference, List<Id> values) throws IOException
reference - the new reference, without its valuevalues - the ordered values of the reference; when the reference is single-valued, this parameter
                  is a Collections.singletonList(Object)IOExceptionprotected boolean requireEndBeforeFlush()
true if this writer requires the end of the current element before flushing all features,
 otherwise, all features will be flushed as soon as another feature is intercepted. This is typically used when
 writing a structured file with streams.true if this writer requires the end of the current element before flushing all featuresCopyright © 2013–2019 Atlanmod. All rights reserved.