org.freehep.wbxml
Interface WBXMLTagWriter

All Known Implementing Classes:
WBXMLWriter

public interface WBXMLTagWriter

WBXMLTagWriter Interface. Attributes need to be set before tags are written.

Version:
$Id: XMLTagWriter.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Method Summary
 void close()
          Close writer
 void closeDoc()
          Close XML doc
 void closeTag()
          Close nearest tag
 void openDoc()
          Open XML doc with standard parameters
 void openDoc(String version, String encoding, boolean standalone)
          Open XML doc
 void openTag(int tag)
          Write an xml open tag
 void print(String text)
           
 void printComment(String comment)
           
 void printTag(int tag)
          Write empty tag
 void referToDTD(String name, String system)
           
 void referToDTD(String name, String pid, String ref)
           
 void setAttribute(int tag, boolean value)
          Set boolean attribute
 void setAttribute(int tag, boolean[] value, int offset, int length)
          Set boolean attribute
 void setAttribute(int tag, byte value)
          Set byte attribute
 void setAttribute(int tag, byte[] value, int offset, int length)
          Set byte attribute
 void setAttribute(int tag, char value)
          Set char attribute
 void setAttribute(int tag, char[] value, int offset, int length)
          Set char attribute
 void setAttribute(int tag, Color value)
          Set Color attribute
 void setAttribute(int tag, Color[] value, int offset, int length)
          Set Color attribute
 void setAttribute(int tag, double value)
          Set double attribute
 void setAttribute(int tag, double[] value, int offset, int length)
          Set double attribute
 void setAttribute(int tag, float value)
          Set float attribute
 void setAttribute(int tag, float[] value, int offset, int length)
          Set float attribute
 void setAttribute(int tag, int value)
          Set int attribute
 void setAttribute(int tag, int[] value, int offset, int length)
          Set int attribute
 void setAttribute(int tag, long value)
          Set long attribute
 void setAttribute(int tag, long[] value, int offset, int length)
          Set long attribute
 void setAttribute(int tag, short value)
          Set short attribute
 void setAttribute(int tag, short[] value, int offset, int length)
          Set short attribute
 void setAttribute(int tag, String value)
          Set String attribute
 void setAttribute(int tag, String[] value, int offset, int length)
          Set String attribute
 

Method Detail

close

void close()
           throws IOException
Close writer

Throws:
IOException - if stream cannot be written

openDoc

void openDoc()
             throws IOException
Open XML doc with standard parameters

Throws:
IOException - if stream cannot be written

openDoc

void openDoc(String version,
             String encoding,
             boolean standalone)
             throws IOException
Open XML doc

Parameters:
version - version string
encoding - encoding
standalone - if XML is standalone
Throws:
IOException - if stream cannot be written

closeDoc

void closeDoc()
              throws IOException
Close XML doc

Throws:
IOException - if stream cannot be written

referToDTD

void referToDTD(String name,
                String system)

referToDTD

void referToDTD(String name,
                String pid,
                String ref)

openTag

void openTag(int tag)
             throws IOException
Write an xml open tag

Parameters:
name - tagname
Throws:
IOException - if stream cannot be written

closeTag

void closeTag()
              throws IOException
Close nearest tag

Throws:
IOException - if stream cannot be written

printTag

void printTag(int tag)
              throws IOException
Write empty tag

Parameters:
name - tagname
Throws:
IOException - if stream cannot be written

printComment

void printComment(String comment)
                  throws IOException
Throws:
IOException

print

void print(String text)
           throws IOException
Throws:
IOException

setAttribute

void setAttribute(int tag,
                  String value)
Set String attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  String[] value,
                  int offset,
                  int length)
Set String attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  Color value)
Set Color attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  Color[] value,
                  int offset,
                  int length)
Set Color attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  byte value)
Set byte attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  byte[] value,
                  int offset,
                  int length)
Set byte attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  char value)
Set char attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  char[] value,
                  int offset,
                  int length)
Set char attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  long value)
Set long attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  long[] value,
                  int offset,
                  int length)
Set long attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  int value)
Set int attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  int[] value,
                  int offset,
                  int length)
Set int attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  short value)
Set short attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  short[] value,
                  int offset,
                  int length)
Set short attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  boolean value)
Set boolean attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  boolean[] value,
                  int offset,
                  int length)
Set boolean attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  float value)
Set float attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  float[] value,
                  int offset,
                  int length)
Set float attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write

setAttribute

void setAttribute(int tag,
                  double value)
Set double attribute

Parameters:
tag - attributeID
value - attribute value

setAttribute

void setAttribute(int tag,
                  double[] value,
                  int offset,
                  int length)
Set double attribute

Parameters:
tag - attributeID
value - attribute value
offset - start index in array
length - number of primitives/object to write


Copyright © 2000-2007 FreeHEP. All Rights Reserved.