public class GenericSkeletonWriter extends Object implements ISkeletonWriter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowEmptyOutputTarget
Deprecated.
|
static String |
ALLOWEMPTYOUTPUTTARGET |
protected EncoderManager |
encoderManager |
protected LocaleId |
inputLoc |
protected boolean |
isMultilingual |
protected ILayerProvider |
layer
Deprecated.
|
protected String |
outputEncoding |
protected LocaleId |
outputLoc |
protected Stack<StorageList> |
storageStack |
| Constructor and Description |
|---|
GenericSkeletonWriter() |
GenericSkeletonWriter(LocaleId inputLoc,
LocaleId outputLoc,
ILayerProvider layer,
EncoderManager encoderManager,
boolean isMultilingual,
boolean allowEmptyOutputTarget,
Map<String,Referent> referents,
Stack<StorageList> storageStack,
String outputEncoding,
int referentCopies,
SubFilterSkeletonWriter sfWriter) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
_processEndGroup(Ending resource) |
protected String |
_processStartGroup(StartGroup resource) |
void |
addToReferents(Event event) |
void |
close()
Closes this skeleton writer.
|
protected String |
expandCodeContent(Code code,
LocaleId locToUse,
EncoderContext context) |
protected String |
getContent(ITextUnit tu,
LocaleId locToUse,
EncoderContext context)
Gets the original content of a given text unit.
|
String |
getContent(TextFragment tf,
LocaleId locToUse,
EncoderContext context)
Gets the original content of a TextFragment.
|
EncoderManager |
getEncoderManager() |
LocaleId |
getInputLoc() |
ILayerProvider |
getLayer()
Deprecated.
|
String |
getOutputEncoding() |
LocaleId |
getOutputLoc() |
protected String |
getPropertyValue(INameable resource,
String name,
LocaleId locToUse,
EncoderContext context) |
protected IReferenceable |
getReference(String id) |
int |
getReferentCopies() |
Map<String,Referent> |
getReferents() |
ISkeletonWriter |
getSfWriter() |
protected String |
getString(GenericSkeletonPart part,
EncoderContext context) |
protected String |
getString(INameable ref,
String propName,
LocaleId locToUse,
EncoderContext context) |
protected String |
getString(ISkeleton skeleton,
EncoderContext context) |
protected String |
getString(ITextUnit tu,
LocaleId locToUse,
EncoderContext context)
Gets the skeleton and the original content of a given text unit.
|
protected String |
getString(StorageList list,
LocaleId locToUse,
EncoderContext context) |
boolean |
isAllowEmptyOutputTarget()
Deprecated.
|
protected boolean |
isCodeThatDisablesEncoding(Code code) |
boolean |
isMultilingual() |
String |
processDocumentPart(DocumentPart resource)
Processes the DOCUMENT_PART event.
|
String |
processEndDocument(Ending resource)
Processes the END_DOCUMENT event.
|
String |
processEndGroup(Ending resource)
Processes the END_GROUP event.
|
String |
processEndSubDocument(Ending resource)
Processes the END_SUBDOCUMENT event.
|
String |
processEndSubfilter(EndSubfilter resource) |
String |
processStartDocument(LocaleId outputLocale,
String outputEncoding,
ILayerProvider layer,
EncoderManager encoderManager,
StartDocument resource)
Processes the START_DOCUMENT event.
|
String |
processStartGroup(StartGroup resource)
Processes the START_GROUP event.
|
String |
processStartSubDocument(StartSubDocument resource)
Processes a START_SUBDOCUMENT event.
|
String |
processStartSubfilter(StartSubfilter resource) |
String |
processTextUnit(ITextUnit resource)
Processes the TEXT_UNIT event.
|
void |
setAllowEmptyOutputTarget(boolean allowEmptyOutputTarget)
Deprecated.
|
void |
setEncoderManager(EncoderManager encoderManager) |
void |
setLayer(ILayerProvider layer)
Deprecated.
|
void |
setMultilingual(boolean isMultilingual) |
void |
setOutputEncoding(String outputEncoding) |
void |
setOutputLoc(LocaleId outputLoc) |
void |
setReferentCopies(int referentCopies)
Sets the number of copies to keep for a referent.
|
void |
setReferents(Map<String,Referent> referents) |
public static String ALLOWEMPTYOUTPUTTARGET
protected LocaleId inputLoc
protected LocaleId outputLoc
@Deprecated protected ILayerProvider layer
protected EncoderManager encoderManager
protected Stack<StorageList> storageStack
protected boolean isMultilingual
@Deprecated protected boolean allowEmptyOutputTarget
protected String outputEncoding
public GenericSkeletonWriter()
public GenericSkeletonWriter(LocaleId inputLoc, LocaleId outputLoc, ILayerProvider layer, EncoderManager encoderManager, boolean isMultilingual, boolean allowEmptyOutputTarget, Map<String,Referent> referents, Stack<StorageList> storageStack, String outputEncoding, int referentCopies, SubFilterSkeletonWriter sfWriter)
protected IReferenceable getReference(String id)
public void close()
ISkeletonWriterclose in interface ISkeletonWriterpublic void setReferentCopies(int referentCopies)
referentCopies - the number of copies to hold (must be at least 1).public String processStartDocument(LocaleId outputLocale, String outputEncoding, ILayerProvider layer, EncoderManager encoderManager, StartDocument resource)
ISkeletonWriterprocessStartDocument in interface ISkeletonWriteroutputLocale - the output locale.outputEncoding - the name of the output charset encoding.layer - the layer provider to use.encoderManager - the encoder manager to use.resource - the StartDocument resource associated with the event.public String processEndDocument(Ending resource)
ISkeletonWriterprocessEndDocument in interface ISkeletonWriterresource - the Ending resource associated with the event.public String processStartSubDocument(StartSubDocument resource)
ISkeletonWriterprocessStartSubDocument in interface ISkeletonWriterresource - the StartSubDocument resource associated with the event.public String processEndSubDocument(Ending resource)
ISkeletonWriterprocessEndSubDocument in interface ISkeletonWriterresource - the Ending resource associated with the event.public String processStartGroup(StartGroup resource)
ISkeletonWriterprocessStartGroup in interface ISkeletonWriterresource - the StartGroup resource associated with the event.protected String _processStartGroup(StartGroup resource)
public String processEndGroup(Ending resource)
ISkeletonWriterprocessEndGroup in interface ISkeletonWriterresource - the Ending resource associated with the event.public String processStartSubfilter(StartSubfilter resource)
processStartSubfilter in interface ISkeletonWriterpublic String processEndSubfilter(EndSubfilter resource)
processEndSubfilter in interface ISkeletonWriterpublic String processTextUnit(ITextUnit resource)
ISkeletonWriterprocessTextUnit in interface ISkeletonWriterresource - the TextUnit resource associated with the event.public String processDocumentPart(DocumentPart resource)
ISkeletonWriterprocessDocumentPart in interface ISkeletonWriterresource - the DocumentPart resource associated with the event.protected String getString(ISkeleton skeleton, EncoderContext context)
protected String getString(GenericSkeletonPart part, EncoderContext context)
protected String getString(INameable ref, String propName, LocaleId locToUse, EncoderContext context)
protected String getString(ITextUnit tu, LocaleId locToUse, EncoderContext context)
tu - The text unit to process.locToUse - locale to output. Use null for the source, or a LocaleId
object for the target locales.context - Context flag: 0=text, 1=skeleton, 2=in-line.protected String getContent(ITextUnit tu, LocaleId locToUse, EncoderContext context)
tu - The text unit to process.locToUse - locale to output. Use null for the source, or the locale
for the target locales.context - Context flag: 0=text, 1=skeleton, 2=inline.protected boolean isCodeThatDisablesEncoding(Code code)
public String getContent(TextFragment tf, LocaleId locToUse, EncoderContext context)
tf - the TextFragment to process.locToUse - locale to output. Use null for the source, or the locale
for the target locales. This is used for referenced content in inline codes.context - Context flag: 0=text, 1=skeleton, 2=inline.protected String expandCodeContent(Code code, LocaleId locToUse, EncoderContext context)
protected String getString(StorageList list, LocaleId locToUse, EncoderContext context)
protected String getPropertyValue(INameable resource, String name, LocaleId locToUse, EncoderContext context)
public void addToReferents(Event event)
@Deprecated public ILayerProvider getLayer()
public LocaleId getInputLoc()
public LocaleId getOutputLoc()
public EncoderManager getEncoderManager()
public boolean isMultilingual()
@Deprecated public boolean isAllowEmptyOutputTarget()
public String getOutputEncoding()
public int getReferentCopies()
public ISkeletonWriter getSfWriter()
public void setOutputLoc(LocaleId outputLoc)
@Deprecated public void setLayer(ILayerProvider layer)
public void setEncoderManager(EncoderManager encoderManager)
public void setMultilingual(boolean isMultilingual)
@Deprecated public void setAllowEmptyOutputTarget(boolean allowEmptyOutputTarget)
public void setOutputEncoding(String outputEncoding)
Copyright © 2022. All rights reserved.