org.basex.data
Class DOTSerializer

java.lang.Object
  extended by org.basex.data.Serializer
      extended by org.basex.data.DOTSerializer

public final class DOTSerializer
extends Serializer

This class allows to output XML results via SAX.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.data.Serializer
dn, ns
 
Constructor Summary
DOTSerializer(PrintOutput o)
          Constructor, defining colors for the dot output.
 
Method Summary
 void attribute(byte[] n, byte[] v)
          Serializes an attribute.
 void close(byte[] t)
          Closes an element.
 void closeResult()
          Closes a result.
 void cls()
          Closes the serializer.
 void comment(byte[] t)
          Serializes a comment.
 void empty()
          Finishes an empty element.
 void finish()
          Finishes an element.
 void item(byte[] t)
          Serializes an item.
 void openResult()
          Starts a result.
 void pi(byte[] n, byte[] v)
          Serializes a processing instruction.
 void text(byte[] t)
          Serializes a text.
 void text(byte[] b, FTPos ftp)
          Serializes a text.
 
Methods inherited from class org.basex.data.Serializer
close, closeElement, emptyElement, emptyElement, finished, level, namespace, node, node, openElement, openElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOTSerializer

public DOTSerializer(PrintOutput o)
              throws IOException
Constructor, defining colors for the dot output.

Parameters:
o - output stream
Throws:
IOException - I/O exception
Method Detail

openResult

public void openResult()
Description copied from class: Serializer
Starts a result.

Specified by:
openResult in class Serializer

closeResult

public void closeResult()
Description copied from class: Serializer
Closes a result.

Specified by:
closeResult in class Serializer

attribute

public void attribute(byte[] n,
                      byte[] v)
Description copied from class: Serializer
Serializes an attribute.

Specified by:
attribute in class Serializer
Parameters:
n - name
v - value

empty

public void empty()
           throws IOException
Description copied from class: Serializer
Finishes an empty element.

Throws:
IOException - I/O exception

finish

public void finish()
            throws IOException
Description copied from class: Serializer
Finishes an element.

Throws:
IOException - I/O exception

close

public void close(byte[] t)
           throws IOException
Description copied from class: Serializer
Closes an element.

Parameters:
t - tag
Throws:
IOException - I/O exception

text

public void text(byte[] t)
          throws IOException
Description copied from class: Serializer
Serializes a text.

Specified by:
text in class Serializer
Parameters:
t - text bytes
Throws:
IOException - I/O exception

text

public void text(byte[] b,
                 FTPos ftp)
          throws IOException
Description copied from class: Serializer
Serializes a text.

Specified by:
text in class Serializer
Parameters:
b - text bytes
ftp - full-text positions
Throws:
IOException - I/O exception

comment

public void comment(byte[] t)
             throws IOException
Description copied from class: Serializer
Serializes a comment.

Specified by:
comment in class Serializer
Parameters:
t - comment
Throws:
IOException - I/O exception

pi

public void pi(byte[] n,
               byte[] v)
        throws IOException
Description copied from class: Serializer
Serializes a processing instruction.

Specified by:
pi in class Serializer
Parameters:
n - name
v - value
Throws:
IOException - I/O exception

item

public void item(byte[] t)
          throws IOException
Description copied from class: Serializer
Serializes an item.

Specified by:
item in class Serializer
Parameters:
t - text bytes
Throws:
IOException - I/O exception

cls

public void cls()
         throws IOException
Description copied from class: Serializer
Closes the serializer.

Throws:
IOException - I/O exception