public abstract class AbstractTransformer extends Object implements Transformer
Constructor and Description |
---|
AbstractTransformer()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract StringBuffer |
getContentsFromTag(TCDLTag currentTag,
String inputItem,
TransformContext context)
Deprecated.
This is a recursive function which reads the contents of a particular tag, then recurses any child tags this
tag has,
calling the necessary transformer to deal with the contents of the tag.
|
protected StringBuffer |
getFullContentsFromTag(TCDLTag currentTag,
String inputItem,
TransformContext context)
Deprecated.
This is a recursive function which reads the contents of a particular tag, then recurses any child tags this
tag has,
calling the necessary transformer to deal with the contents of the tag.
|
StringBuffer |
startProcessingItem(String inputItem,
TreeMap dataModel,
TransformContext context)
Deprecated.
This is the entry point for transforming a text containing TCDL.
|
abstract StringBuffer |
transformFooter(StringBuffer footer)
Deprecated.
Generate the final output of a footer for a TransformContext.
|
abstract StringBuffer |
transformHeader(StringBuffer header)
Deprecated.
Generate the final output of a Header for a TransformContext.
|
abstract String |
transformTag(TCDLTag tag,
TransformContext context)
Deprecated.
This is the method which will transforms the attributes and contents of the tag into the configured target
output
language.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assembleContent
public StringBuffer startProcessingItem(String inputItem, TreeMap dataModel, TransformContext context)
TransformContext
, ensuring that the correct headers and footers are generated.TCDLTag
objects,
using an Integer representing the first index of the start of the TCDLTag found in the input stream.startProcessingItem
in interface Transformer
inputItem
- A string containing the file to be processed.dataModel
- A TreeMap containing TCDLTags, forming a representation of the data model generated by the TCDL.context
- The context of the item being processed.
It can be used to generate the correct headers and footers.public abstract String transformTag(TCDLTag tag, TransformContext context)
AbstractTransformer
class from the TransformProcessor,
and then calls the appropriate
transformer method for the tag, based on the name
field. The attributes
field is
passed to the
appropriate transformer method, together with the tagContents
field. The
AbstractTransformer
class
then returns a formatted string.transformTag
in interface Transformer
public abstract StringBuffer getContentsFromTag(TCDLTag currentTag, String inputItem, TransformContext context)
getContentsFromTag
in interface Transformer
currentTag
- A TCDLTag which you want to transform.inputItem
- A string from which to copy the non-transformable parts from.public abstract StringBuffer transformHeader(StringBuffer header)
transformHeader
in interface Transformer
header
- The contents of the header.public abstract StringBuffer transformFooter(StringBuffer footer)
transformFooter
in interface Transformer
footer
- The contents of the footer.protected StringBuffer getFullContentsFromTag(TCDLTag currentTag, String inputItem, TransformContext context)
currentTag
- A TCDLTag which you want to transform.inputItem
- A string from which to copy the non-transformable parts from.Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries