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

Constructor Detail

### XTGReader

    public XTGReader()

Method Detail

### readDistanceValueAttr

    private void readDistanceValueAttr(DistanceValue value,
                                       javax.xml.stream.events.StartElement element,
                                       javax.xml.namespace.QName name)

### readTextElementDataAttr

    private void readTextElementDataAttr(TextElementData data,
                                         javax.xml.stream.events.StartElement element)

### readDistanceDimensionAttr

    private void readDistanceDimensionAttr(DistanceDimension d,
                                           javax.xml.stream.events.StartElement element)

### readMarginAttr

    private void readMarginAttr(Margin m,
                                javax.xml.stream.events.StartElement element)

### readGlobalLabelFormst

    private void readGlobalLabelFormst(javax.xml.stream.events.StartElement rootElement,
                                       GlobalFormats f)
                                throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readGlobalLegendFormst

    private void readGlobalLegendFormst(javax.xml.stream.events.StartElement rootElement,
                                        GlobalFormats f)
                                 throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readGlobalFormats

    private void readGlobalFormats(javax.xml.stream.events.StartElement rootElement)
                            throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readTextStyleAttr

    private void readTextStyleAttr(TextFormats f,
                                   javax.xml.stream.events.StartElement element)

### readDecimalFormat

    private void readDecimalFormat(TextFormats f,
                                   javax.xml.stream.events.StartElement element,
                                   java.lang.String prefix)

### readTextFormatsAttr

    private void readTextFormatsAttr(TextFormats f,
                                     javax.xml.stream.events.StartElement element,
                                     java.lang.String prefix)

### readLineAttr

    private void readLineAttr(LineFormats f,
                              javax.xml.stream.events.StartElement element)

### readBranch

    private void readBranch(javax.xml.stream.events.StartElement rootElement,
                            Branch b)
                     throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readLabel

    private void readLabel(javax.xml.stream.events.StartElement element,
                           Labels labels)

### readHiddenData

    private void readHiddenData(javax.xml.stream.events.StartElement element,
                                HiddenDataMap list)

### readSubtree

    private Node readSubtree(javax.xml.stream.events.StartElement rootElement)
                      throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readScaleValueAttr

    private void readScaleValueAttr(ScaleValue value,
                                    javax.xml.stream.events.StartElement element,
                                    javax.xml.namespace.QName name)

### readScaleBar

    private void readScaleBar(javax.xml.stream.events.StartElement element,
                              ScaleBar s)

### readAnchor

    private void readAnchor(javax.xml.stream.events.StartElement element,
                            Legend l,
                            int no)

### readLegend

    private void readLegend(javax.xml.stream.events.StartElement element,
                            Legends legends)

### readTree

    private void readTree(javax.xml.stream.events.StartElement rootElement)
                   throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### readDocument

    private void readDocument(javax.xml.stream.events.StartElement rootElement)
                       throws javax.xml.stream.XMLStreamException

  Throws:
    `javax.xml.stream.XMLStreamException`

### read

    public Document read(java.io.InputStream stream,
                         NodeDataAdapter internalAdapter,
                         TreeSelector selector,
                         boolean translateInternalNodes)
                  throws java.lang.Exception

  Specified by:
    `read` in interface `DocumentReader`
  Throws:
    `java.lang.Exception`

### read

    public Document read(java.io.File file,
                         NodeDataAdapter internalAdapter,
                         TreeSelector selector,
                         boolean translateInternalNodes)
                  throws java.lang.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:
    `java.lang.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