de.esprit.appsuite.xml

## Class XmlTagWriter<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.io.DataWriter<C>
        - - de.esprit.appsuite.xml.TagWriter<C>
          - - de.esprit.appsuite.xml.XmlTagWriter<C>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, CancellableTask, TaskMonitorSupport, SimpleLogSupport, Dumpable, Executable, java.io.Closeable, java.lang.AutoCloseable
  Direct Known Subclasses:
    DBOXmlWriter

      public abstract class XmlTagWriter<C extends ApplicationContext>
      extends TagWriter<C>

  This class adds XML specific functionality to the TagWriter class
  Author:
    Rainer Buesch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_XML_ENCODING`

    - ### Fields inherited from class de.esprit.appsuite.xml.TagWriter

      `attrs, DEFAULT_ENCODING`

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlTagWriter(C ctx, java.io.File file)`
    `XmlTagWriter(C ctx, java.io.File file, java.lang.String encoding)`
    `XmlTagWriter(C ctx, java.io.OutputStream out)`
    `XmlTagWriter(C ctx, java.io.OutputStream out, java.lang.String encoding)`
    `XmlTagWriter(C ctx, java.lang.String fileName)`
    `XmlTagWriter(C ctx, java.lang.String fileName, java.lang.String encoding)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeNameSpace()` Closes the namespace and makes the previous namespace the current one.
    `protected java.lang.String` | `getSimpleTagCloseBracket()`
    `protected java.lang.String` | `getTag(java.lang.String tag)`
    `void` | `openNameSpace(java.lang.String nameSpace)` Opens a namespace and makes it the current one.
    `protected void` | `performWriteHeader()`

    - ### Methods inherited from class de.esprit.appsuite.xml.TagWriter

      `attr, close, closeTag, isWritingEmptyTags, openTag, openTag, performWrite, performWriteBody, performWriteFooter, printIndent, setIndentString, setWriteEmptyTags, writeComment, writeTag, writeTag, writeTag, writeTag, writeValue, writeXmlHeader`

    - ### Methods inherited from class de.esprit.appsuite.io.DataWriter

      `createFileOutputStream, executeAsync, flush, format, format, getEncoding, getOutputFile, getWriteDuration, getWriter, openStream, print, print, print, print, print, print, print, print, print, printf, printf, printLine, println, println, println, println, println, println, println, println, println, println, setCloseStreamWhenFinished, setEncoding, setOutputFile, setOutputStream, write, write, write, write, write`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, handleFinish, handleStart, handleSuccess, hasError, hasMonitor, isCancellable, notifyProceeded, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

- - ### Field Detail

    - #### DEFAULT_XML_ENCODING

          public static final java.lang.String DEFAULT_XML_ENCODING

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.lang.String fileName)

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.lang.String fileName,
                      java.lang.String encoding)

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.io.File file)

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.io.File file,
                      java.lang.String encoding)

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.io.OutputStream out)

    - #### XmlTagWriter

          public XmlTagWriter(C ctx,
                      java.io.OutputStream out,
                      java.lang.String encoding)

  - ### Method Detail

    - #### performWriteHeader

          protected void performWriteHeader()
                                     throws java.lang.Exception

      Overrides:
        `performWriteHeader` in class `TagWriter<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`

    - #### getSimpleTagCloseBracket

          protected java.lang.String getSimpleTagCloseBracket()

      Overrides:
        `getSimpleTagCloseBracket` in class `TagWriter<C extends ApplicationContext>`

    - #### openNameSpace

          public void openNameSpace(java.lang.String nameSpace)

      Opens a namespace and makes it the current one. The namespace must be closed again with the `closeNameSpace()` method.

    - #### closeNameSpace

          public void closeNameSpace()

      Closes the namespace and makes the previous namespace the current one. If there is no previous namespace then no namespacing is used any more.

    - #### getTag

          protected java.lang.String getTag(java.lang.String tag)

      Overrides:
        `getTag` in class `TagWriter<C extends ApplicationContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.