fr.opensagres.xdocreport.template.formatter
Class FieldsMetadataXMLSerializer

java.lang.Object
  extended by fr.opensagres.xdocreport.template.formatter.FieldsMetadataXMLSerializer

public class FieldsMetadataXMLSerializer
extends Object

Fields metadata serializer used to load FieldsMetadata from XML and serialize FieldsMetadata to XML.


Constructor Summary
protected FieldsMetadataXMLSerializer()
           
 
Method Summary
static FieldsMetadataXMLSerializer getInstance()
           
 FieldsMetadata load(InputStream inputStream)
          Load fields metadata in the given FieldsMetadata from the given XML reader.
 FieldsMetadata load(Reader input)
          Load fields metadata in the given FieldsMetadata from the given XML reader.
 void save(FieldsMetadata fieldsMetadata, OutputStream out, boolean indent, boolean formatAsJavaString)
          Serialize as XML the given FieldsMetadata to the given XML output stream.
 void save(FieldsMetadata fieldsMetadata, Writer writer)
          Serialize as XML the given FieldsMetadata to the given XML writer.
 void save(FieldsMetadata fieldsMetadata, Writer writer, boolean indent)
          Serialize as XML the given FieldsMetadata to the given XML writer.
 void save(FieldsMetadata fieldsMetadata, Writer writer, boolean indent, boolean formatAsJavaString)
          Serialize as XML the given FieldsMetadata to the given XML writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldsMetadataXMLSerializer

protected FieldsMetadataXMLSerializer()
Method Detail

getInstance

public static FieldsMetadataXMLSerializer getInstance()

load

public FieldsMetadata load(Reader input)
                    throws SAXException,
                           IOException
Load fields metadata in the given FieldsMetadata from the given XML reader. Here a sample of XML reader :
 
        
        
 
 
 

Parameters:
inputStream - the reader of the XML fields.
Throws:
SAXException
IOException

load

public FieldsMetadata load(InputStream inputStream)
                    throws SAXException,
                           IOException
Load fields metadata in the given FieldsMetadata from the given XML reader. Here a sample of XML reader :
 
        
        
 
 
 

Parameters:
inputStream - the input stream of the XML fields.
Throws:
SAXException
IOException

save

public void save(FieldsMetadata fieldsMetadata,
                 Writer writer)
          throws IOException
Serialize as XML the given FieldsMetadata to the given XML writer. Here a sample of XML writer :
 
  
  
 
 
 

Parameters:
fieldsMetadata - the metadata to serialize to XML.
writer - the writer.
Throws:
IOException

save

public void save(FieldsMetadata fieldsMetadata,
                 Writer writer,
                 boolean indent)
          throws IOException
Serialize as XML the given FieldsMetadata to the given XML writer. Here a sample of XML writer :
 
  
  
 
 
 

Parameters:
fieldsMetadata - the metadata to serialize to XML.
writer - the writer.
indent - true if indent must be managed and false otherwise.
Throws:
IOException

save

public void save(FieldsMetadata fieldsMetadata,
                 Writer writer,
                 boolean indent,
                 boolean formatAsJavaString)
          throws IOException
Serialize as XML the given FieldsMetadata to the given XML writer. Here a sample of XML writer :
 
        
        
 
 
 

Parameters:
fieldsMetadata - the metadata to serialize to XML.
writer - the writer.
indent - true if indent must be managed and false otherwise.
formatAsJavaString - true if format as Java String to be done and false otherwise.
Throws:
IOException

save

public void save(FieldsMetadata fieldsMetadata,
                 OutputStream out,
                 boolean indent,
                 boolean formatAsJavaString)
          throws IOException
Serialize as XML the given FieldsMetadata to the given XML output stream. Here a sample of XML writer :
 
        
        
 
 
 

Parameters:
fieldsMetadata - the metadata to serialize to XML.
outputstream - the output steam.
indent - true if indent must be managed and false otherwise.
formatAsJavaString - true if format as Java String to be done and false otherwise. * @throws IOException
Throws:
IOException


Copyright © 2013. All rights reserved.