Class Adios2XmlPipe
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.extensions.rekenbox.Adios2XmlPipe
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,HasTransactionAttribute
,IConfigurable
,IForwardTarget
,IPipe
,IScopeProvider
,IWithParameters
,NameAware
,EventThrowing
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
@Forward(name="noConversionForwardName",
description="when successful, but no conversion took place")
@Category(NN_SPECIAL)
public class Adios2XmlPipe
extends FixedForwardPipe
Transforms between ascii-ADIOS and an XML representation of ADIOS.
For input, a 'naam' or a 'nummer'-attribute must be specified. If both are specified, their match is checked. On output, 'nummer', 'naam' and 'waarde'-attributes are always present in each rubriek-element. Where applicable 'index', 'recordnr', 'record' and 'recordindex' are present, too. If sub-records exist, they are present with a 'sub' prefix to all attributes.
Sample xml:
<adios rekenbox="L76HB150">
<rubriek naam="BER_VERZ_CD" waarde="COMBIFLEX_BELEGGING" />
<rubriek naam="INBR_CD" waarde="NIEUWE_VERZEKERING" />
<rubriek naam="PENS_DT_BEP_CD" waarde="DT_UIT_PENS_LFT" />
<rubriek nummer="313" naam="AS_OPSL_PRD_TRM_PRM" index="3" recordnr="74" record="VUT_VERZEKERING" waarde="52.34" />
...
</adios>
For input, a 'naam' or a 'nummer'-attribute must be specified. If both are specified, their match is checked. On output, 'nummer', 'naam' and 'waarde'-attributes are always present in each rubriek-element. Where applicable 'index', 'recordnr', 'record' and 'recordindex' are present, too. If sub-records exist, they are present with a 'sub' prefix to all attributes.
- Author:
- Gerrit van Brakel
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(String item, XmlBuilder builder, Map nummer2naam, String naamLabel, String nummerLabel, String indexLabel) void
Checks for correct configuration of forward.doPipe
(Message message, PipeLineSession session) This is where the action takes place.findRekenbox
(PipeLineSession session) protected void
makeAdios
(InputSource bericht, PipeLineSession session) makeXml
(String s, PipeLineSession session) The calcbox tool Adios exports the file "NNRSCONS.PAS" = adiosDefinities in configuration attributes.void
setAdiosDefinities
(String newAdiosDefinities) sets URL to the pascal file with label-constants generated by the ADIOS-utility.void
setDirection
(Adios2XmlPipe.Direction direction) Transformation direction.void
setNoConversionForwardName
(String string) Sets the name of the forward used when no conversion to XML was performed, because the input was already XML.void
setRekenbox
(String newRekenbox) Sets name of the rekenbox to be calledvoid
setRekenboxSessionKey
(String newRekenboxSessionKey) Name of the SessionKey to retrieve the rekenbox name fromMethods inherited from class org.frankframework.pipes.FixedForwardPipe
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
Methods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getParameterList, hasRegisteredForward, isRunning, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, start, stop, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods inherited from interface org.frankframework.core.IPipe
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
-
Field Details
-
recordIdentifier
- See Also:
-
rubriekIdentifier
- See Also:
-
-
Constructor Details
-
Adios2XmlPipe
public Adios2XmlPipe()
-
-
Method Details
-
configure
Description copied from class:FixedForwardPipe
Checks for correct configuration of forward.- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classFixedForwardPipe
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
doPipe
Description copied from interface:IPipe
This is where the action takes place. Pipes may only throw a PipeRunException, to be handled by the caller of this object. Implementations must either consume the message, or pass it on to the next Pipe in the PipeRunResult. If the result of the Pipe does not depend on the input, like for theFixedResultPipe
, the Pipe can schedule the input to be closed at session exit, by callingMessage.closeOnCloseOf(PipeLineSession)
This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open until the message was consumed. Doing so avoids connections leaking from pools, while it enables efficient streaming processing of data while it is being read from a stream.- Throws:
PipeRunException
-
initializeConversionTables
- Throws:
ConfigurationException
-
findRekenbox
-
makeAdios
- Throws:
PipeRunException
-
makeXml
The calcbox tool Adios exports the file "NNRSCONS.PAS" = adiosDefinities in configuration attributes. this file containts both "rubrieken" and "records" which together form the adios message te be send to the calcbox the most difficult format used is record[recordindex],label[index]:waarde; mind the delimiters,where a record has or hasnot an indexnummer and a label likewise.- Throws:
PipeRunException
-
addItem
-
setAdiosDefinities
sets URL to the pascal file with label-constants generated by the ADIOS-utility.- Default value
- nnrscons.pas
-
getAdiosDefinities
-
setDirection
Transformation direction.- Default value
- Adios2Xml
-
getDirection
-
setRekenbox
Sets name of the rekenbox to be called -
getRekenbox
-
setRekenboxSessionKey
Name of the SessionKey to retrieve the rekenbox name from -
getRekenboxSessionKey
-
setNoConversionForwardName
Sets the name of the forward used when no conversion to XML was performed, because the input was already XML.- Default value
- noconversion
-
getNoConversionForwardName
-