Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## info.bioinfweb.treegraph.document.io.xtg
Class XTGReader

    java.lang.Object
      info.bioinfweb.treegraph.document.io.AbstractDocumentReader
          info.bioinfweb.treegraph.document.io.xtg.XTGReader

All Implemented Interfaces:
  DocumentReader, XTGConstants

    public class XTGReader

extends AbstractDocumentReader
implements XTGConstants

Reads the TreeGraph 2 specific XML format (*.xtg).
If the document contains additional (not defined tags) they are ignored. Note that they can not tranfered to the internal data structure and therefor a not written back to a document generated with TreeGraph 2.
If defined attrubutes are missing in the document, standard values are used.

Author:
  Ben Stöver

Field Summary
`private XMLEventReader` | `reader`

Fields inherited from class info.bioinfweb.treegraph.document.io.AbstractDocumentReader
`document`

Fields inherited from interface info.bioinfweb.treegraph.document.io.xtg.XTGConstants
`ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TREE_WIDTH, ATTR_BG_COLOR, ATTR_BOTTOM, ATTR_BRANCH_LENGTH, ATTR_BRANCH_LENGTH_SCALE, ATTR_CONSTANT_WIDTH, ATTR_DECIMAL_FORMAT, ATTR_EDGE_RADIUS, ATTR_FONT_FAMILY, ATTR_HEIGHT, ATTR_HORIZ_LABEL_SPACING, ATTR_ID, ATTR_LABEL_ABOVE, ATTR_LABEL_BLOCK_DISTANCE, ATTR_LEFT, ATTR_LEGEND_POS, ATTR_LEGEND_SPACING, ATTR_LEGEND_STYLE, ATTR_LINE_COLOR, ATTR_LINE_NO, ATTR_LINE_POS, ATTR_LINE_WIDTH, ATTR_LOCALE_COUNTRY, ATTR_LOCALE_LANG, ATTR_LOCALE_VARIANT, ATTR_LONG_INTERVAL, ATTR_MIN_BRANCH_LENGTH, ATTR_MIN_SPACE_ABOVE, ATTR_MIN_SPACE_BELOW, ATTR_MIN_TREE_DISTANCE, ATTR_RIGHT, ATTR_SCALE_BAR_ALIGN, ATTR_SCALE_BAR_DISTANCE, ATTR_SCALE_BAR_HEIGHT, ATTR_SCALE_BAR_INCREASE, ATTR_SCALE_BAR_START, ATTR_SCALE_BAR_WIDTH, ATTR_SHOW_ROOTED, ATTR_SHOW_SCALE_BAR, ATTR_SMALL_INTERVAL, ATTR_TEXT, ATTR_TEXT_COLOR, ATTR_TEXT_HEIGHT, ATTR_TEXT_IS_DECIMAL, ATTR_TEXT_ORIENTATION, ATTR_TEXT_STYLE, ATTR_TOP, ATTR_UNIQUE_NAME, ATTR_VERT_LABEL_SPACING, ATTR_WIDTH, BRANCH_LENGTH_UNITS, MILLIMETERS, ORIENT_DOWN, ORIENT_HORIZONTAL, ORIENT_UP, PRE_LEGEND_ANCHOR, STYLE_BOLD, STYLE_BRACE, STYLE_BRACKET, STYLE_ITALIC, STYLE_UNDERLINE, TAG_BRANCH, TAG_DOC_MARGIN, TAG_GLOBAL_FORMATS, TAG_GLOBAL_LABEL_FORMATS, TAG_GLOBAL_LEGEND_FORMATS, TAG_HIDDEN_DATA, TAG_ICON_LABEL, TAG_LABEL_BLOCK_MARGIN, TAG_LEAF_MARGIN, TAG_LEGEND, TAG_LEGEND_MARGIN, TAG_MIN_DOC_DIM, TAG_NODE, TAG_NODE_MARGIN, TAG_ROOT, TAG_SCALE_BAR, TAG_TEXT_LABEL, TAG_TREE`

Constructor Summary
`XTGReader()`

Method Summary
`Document` | `read(File file, NodeDataAdapter internalAdapter, NodeDataAdapter branchLengthsAdapter, TreeSelector selector, boolean translateInternalNodes)` If you want to implement file specific functionalities you should override this method.
`Document` | `read(InputStream stream, NodeDataAdapter internalAdapter, NodeDataAdapter branchLengthsAdapter, TreeSelector selector, boolean translateInternalNodes)`
`private void` | `readAnchor(StartElement element, Legend l, int no)`
`private void` | `readBranch(StartElement rootElement, Branch b)`
`private void` | `readDecimalFormat(TextFormats f, StartElement element, String prefix)`
`private void` | `readDistanceDimensionAttr(DistanceDimension d, StartElement element)`
`private void` | `readDistanceValueAttr(DistanceValue value, StartElement element, QName name)`
`private void` | `readDocument(StartElement rootElement)`
`private void` | `readGlobalFormats(StartElement rootElement)`
`private void` | `readGlobalLabelFormst(StartElement rootElement, GlobalFormats f)`
`private void` | `readGlobalLegendFormst(StartElement rootElement, GlobalFormats f)`
`private void` | `readHiddenData(StartElement element, HiddenDataMap list)`
`private void` | `readLabel(StartElement element, Labels labels)`
`private void` | `readLegend(StartElement element, Legends legends)`
`private void` | `readLineAttr(LineFormats f, StartElement element)`
`private void` | `readMarginAttr(Margin m, StartElement element)`
`private void` | `readScaleBar(StartElement element, ScaleBar s)`
`private void` | `readScaleValueAttr(ScaleValue value, StartElement element, QName name)`
`private Node` | `readSubtree(StartElement rootElement)`
`private void` | `readTextElementDataAttr(TextElementData data, StartElement element)`
`private void` | `readTextFormatsAttr(TextFormats f, StartElement element, String prefix)`
`private void` | `readTextStyleAttr(TextFormats f, StartElement element)`
`private void` | `readTree(StartElement rootElement)`

Methods inherited from class info.bioinfweb.treegraph.document.io.AbstractDocumentReader
`read, read, read, read`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### reader

    private XMLEventReader reader

Constructor Detail

### XTGReader

    public XTGReader()

Method Detail

### readDistanceValueAttr

    private void readDistanceValueAttr(DistanceValue value,
                                       StartElement element,
                                       QName name)

### readTextElementDataAttr

    private void readTextElementDataAttr(TextElementData data,
                                         StartElement element)

### readDistanceDimensionAttr

    private void readDistanceDimensionAttr(DistanceDimension d,
                                           StartElement element)

### readMarginAttr

    private void readMarginAttr(Margin m,
                                StartElement element)

### readGlobalLabelFormst

    private void readGlobalLabelFormst(StartElement rootElement,
                                       GlobalFormats f)
                                throws XMLStreamException

  Throws:
    `XMLStreamException`

### readGlobalLegendFormst

    private void readGlobalLegendFormst(StartElement rootElement,
                                        GlobalFormats f)
                                 throws XMLStreamException

  Throws:
    `XMLStreamException`

### readGlobalFormats

    private void readGlobalFormats(StartElement rootElement)
                            throws XMLStreamException

  Throws:
    `XMLStreamException`

### readTextStyleAttr

    private void readTextStyleAttr(TextFormats f,
                                   StartElement element)

### readDecimalFormat

    private void readDecimalFormat(TextFormats f,
                                   StartElement element,
                                   String prefix)

### readTextFormatsAttr

    private void readTextFormatsAttr(TextFormats f,
                                     StartElement element,
                                     String prefix)

### readLineAttr

    private void readLineAttr(LineFormats f,
                              StartElement element)

### readBranch

    private void readBranch(StartElement rootElement,
                            Branch b)
                     throws XMLStreamException

  Throws:
    `XMLStreamException`

### readLabel

    private void readLabel(StartElement element,
                           Labels labels)

### readHiddenData

    private void readHiddenData(StartElement element,
                                HiddenDataMap list)

### readSubtree

    private Node readSubtree(StartElement rootElement)
                      throws XMLStreamException

  Throws:
    `XMLStreamException`

### readScaleValueAttr

    private void readScaleValueAttr(ScaleValue value,
                                    StartElement element,
                                    QName name)

### readScaleBar

    private void readScaleBar(StartElement element,
                              ScaleBar s)

### readAnchor

    private void readAnchor(StartElement element,
                            Legend l,
                            int no)

### readLegend

    private void readLegend(StartElement element,
                            Legends legends)

### readTree

    private void readTree(StartElement rootElement)
                   throws XMLStreamException

  Throws:
    `XMLStreamException`

### readDocument

    private void readDocument(StartElement rootElement)
                       throws XMLStreamException

  Throws:
    `XMLStreamException`

### read

    public Document read(InputStream stream,
                         NodeDataAdapter internalAdapter,
                         NodeDataAdapter branchLengthsAdapter,
                         TreeSelector selector,
                         boolean translateInternalNodes)
                  throws Exception

  Specified by:
    `read` in interface `DocumentReader`
  Throws:
    `Exception`

### read

    public Document read(File file,
                         NodeDataAdapter internalAdapter,
                         NodeDataAdapter branchLengthsAdapter,
                         TreeSelector selector,
                         boolean translateInternalNodes)
                  throws Exception

  Description copied from class: `AbstractDocumentReader`
  If you want to implement file specific functionalities you should override this method. It is called by all other `read`-methods with a file as parameter.

  Specified by:
    `read` in interface `DocumentReader`
  Overrides:
    `read` in class `AbstractDocumentReader`
  Throws:
    `Exception`
  See Also:
    `info.bioinfweb.treegraph.document.io.DocumentReader#read(java.io.File, NodeDataAdapter, int)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD