tecgraf.javautils.xml
Class XMLDataElement

java.lang.Object
  extended by tecgraf.javautils.xml.XMLElement
      extended by tecgraf.javautils.xml.XMLDataElement
All Implemented Interfaces:
XMLElementInterface
Direct Known Subclasses:
XMLNullDataElement

public abstract class XMLDataElement
extends XMLElement

A classe XMLDataElement representa um elemento XML que não possui filhos.

Author:
André Oliveira da Costa

Constructor Summary
XMLDataElement()
           
 
Method Summary
 void write(Writer stream, String ident)
          Escreve o elemento em um stream de saída (tag de abertura + atributos, valor e tag de fechamento).
static void write(Writer stream, String ident, String tag, double value)
          Escreve o elemento em um stream de saída (tag de abertura, valor (double) e tag de fechamento).
static void write(Writer stream, String ident, String tag, int value)
          Escreve o elemento em um stream de saída (tag de abertura, valor ( int) e tag de fechamento).
static void write(Writer stream, String ident, String tagName, String value)
          Escreve o elemento em um stream de saída (tag de abertura, valor e tag de fechamento).
static void writeEndTag(String tagName, Writer stream)
          Escreve uma tag de fechamento arbitrária, sem identação.
 
Methods inherited from class tecgraf.javautils.xml.XMLElement
appendValue, convertTextToXML, convertValueFromXML, getAppContextObject, getAppObject, getAttributeBooleanValue, getAttributeDoubleValue, getAttributeIntValue, getAttributes, getAttributeStrValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getStrValue, getStrValue, getTag, hasAttribute, hasValue, isEmpty, newAttribute, newAttribute, newAttribute, newAttribute, newAttribute, newAttribute, newAttributeList, newCharsEvent, resetAttributeList, resetValue, setAppContextObject, setAppObject, setTag, setValue, setValue, startTag, writeAttributes, writeAttributes, writeEndTag, writeEndTag, writeStartTag, writeStartTagln, writeValue, xmlEncode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tecgraf.javautils.xml.XMLElementInterface
endTag
 

Constructor Detail

XMLDataElement

public XMLDataElement()
Method Detail

write

public void write(Writer stream,
                  String ident)
           throws IOException
Escreve o elemento em um stream de saída (tag de abertura + atributos, valor e tag de fechamento).

Parameters:
stream - stream de saída
ident - identação
Throws:
IOException - se houver problemas na escrita

write

public static void write(Writer stream,
                         String ident,
                         String tagName,
                         String value)
                  throws IOException
Escreve o elemento em um stream de saída (tag de abertura, valor e tag de fechamento). O elemento não deve possuir atributos.

Parameters:
stream - stream de saída
ident - identação
tagName - tag do elemento
value - valor do elemento
Throws:
IOException - se houve algum problema na escrita

write

public static void write(Writer stream,
                         String ident,
                         String tag,
                         double value)
                  throws IOException
Escreve o elemento em um stream de saída (tag de abertura, valor (double) e tag de fechamento). O elemento não deve possuir atributos, e seu valor será convertido de double para String.

Parameters:
stream - stream de saída
ident - identação
tag - tag
value - valor (double)
Throws:
IOException - se houve algum problema na escrita

write

public static void write(Writer stream,
                         String ident,
                         String tag,
                         int value)
                  throws IOException
Escreve o elemento em um stream de saída (tag de abertura, valor ( int) e tag de fechamento). O elemento não deve possuir atributos, e seu valor será convertido de int para String.

Parameters:
stream - stream de saída
ident - identação
tag - tag
value - valor (int)
Throws:
IOException - se houve algum problema na escrita

writeEndTag

public static void writeEndTag(String tagName,
                               Writer stream)
                        throws IOException
Escreve uma tag de fechamento arbitrária, sem identação.

Parameters:
tagName - tag
stream - stream de saída
Throws:
IOException - se houve algum erro de I/O durante a escrita


Copyright © 2014 Tecgraf/PUC-Rio. All rights reserved.