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

## org.eclipse.smila.datamodel.xml
Class DOMRecordWriter

    java.lang.Object
      org.eclipse.smila.datamodel.xml.DOMRecordWriter

    public class DOMRecordWriter

extends java.lang.Object

A utility class to create DOM representations of SMILA records.

Author:
  jschumacher

Constructor Summary
`DOMRecordWriter()` create new RecordBuilder.
`DOMRecordWriter(boolean printPretty)` create new RecordBuilder with custom printPretty flag.

Method Summary
`org.w3c.dom.Element` | `appendRecord(org.w3c.dom.Element parent, Record record)` Append a Record element describing the given record to the given parent element.
`org.w3c.dom.Element` | `appendRecordList(org.w3c.dom.Element parent, java.lang.Iterable<Record> records)` Append a RecordList element describing the given record list to the given parent element.
`org.w3c.dom.Element` | `appendRecordList(org.w3c.dom.Element parent, Record[] records)` Append a RecordList element describing the given record list to the given parent element.
`org.w3c.dom.Element` | `buildRecord(org.w3c.dom.Document factory, Record record)` build Record element.
`void` | `buildRecordAsDocumentElement(org.w3c.dom.Document factory, Record record)` Builds the record as document element.
`protected static java.lang.String` | `cleanText(java.lang.String text)`

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

Constructor Detail

### DOMRecordWriter

    public DOMRecordWriter()

  create new RecordBuilder.

### DOMRecordWriter

    public DOMRecordWriter(boolean printPretty)

  create new RecordBuilder with custom printPretty flag.

  Parameters:
    `printPretty` - printPretty flag

Method Detail

### appendRecord

    public org.w3c.dom.Element appendRecord(org.w3c.dom.Element parent,
                                            Record record)

  Append a Record element describing the given record to the given parent element. The record element is appended as a new last child to the parent element.

  Parameters:
    `parent` - the parent element to append to.
    `record` - the record to transform.
  Returns:
    the appended element

### appendRecordList

    public org.w3c.dom.Element appendRecordList(org.w3c.dom.Element parent,
                                                java.lang.Iterable<Record> records)

  Append a RecordList element describing the given record list to the given parent element. The record list element is appended as a new last child to the parent element.

  Parameters:
    `parent` - the parent element to append to.
    `records` - the record list to transform.
  Returns:
    the appended element

### appendRecordList

    public org.w3c.dom.Element appendRecordList(org.w3c.dom.Element parent,
                                                Record[] records)

  Append a RecordList element describing the given record list to the given parent element. The record list element is appended as a new last child to the parent element.

  Parameters:
    `parent` - the parent element to append to.
    `records` - the record list to transform.
  Returns:
    the appended element

### buildRecord

    public org.w3c.dom.Element buildRecord(org.w3c.dom.Document factory,
                                           Record record)

  build Record element.

  Parameters:
    `factory` - factory for creating DOM elements
    `record` - the record to transform
  Returns:
    the created element.

### buildRecordAsDocumentElement

    public void buildRecordAsDocumentElement(org.w3c.dom.Document factory,
                                             Record record)

  Builds the record as document element.

  Parameters:
    `factory` - the factory
    `record` - the record

### cleanText

    protected static java.lang.String cleanText(java.lang.String text)

  Parameters:
    `text` - input text (XML)
  Returns:
    XML text cleaned from characters forbidden in XML 1.1 specification

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