ar.com.epere4.java2excel.parser
Class Java2ExcelDtdFactory

java.lang.Object
  extended by ar.com.epere4.java2excel.parser.Java2ExcelDtdFactory

public final class Java2ExcelDtdFactory
extends java.lang.Object

This class allows the construction of several kinds of Java2ExcelDtd.

Since:
19/02/2006
Author:
epere4

Field Summary
static Java2ExcelDtdFactory INSTANCE
          Singleton.
 
Method Summary
 Java2ExcelDtd defaultJava2ExcelDtd()
           
 Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel)
          Default typesToExcludeInAutoComplete are those in BodyDtdImpl.DEFAULT_TYPES_TO_EXCLUDE_IN_AUTO_COMPLETE.
 Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel, java.lang.Class[] typesToExcludeInAutoComplete)
          Similar to calling defaultJava2ExcelDtd(includeExtraLevel, typesToExcludeInAutoComplete, false).
 Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel, java.lang.Class[] typesToExcludeInAutoComplete, boolean ignoreDefaultsExcludes)
           
static Java2ExcelDtdFactory getInstance()
           
 Java2ExcelDtd readFromFile(java.io.InputStream xmlInput)
          This returns a Java2ExcelDtd implementation that will be configured with the xml received as input.
 Java2ExcelDtd readFromFile(java.io.InputStream xmlInput, java.lang.Class[] typesToExcludeInAutoComplete)
          Similar to calling readFromFile(xmlInput, typesToExcludeInAutoComplete, false).
 Java2ExcelDtd readFromFile(java.io.InputStream xmlInput, java.lang.Class[] typesToExcludeInAutoComplete, boolean ignoreDefaultsExcludes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final Java2ExcelDtdFactory INSTANCE
Singleton.

Method Detail

getInstance

public static Java2ExcelDtdFactory getInstance()
Returns:
the only instance of this class.
Since:
19/02/2006

readFromFile

public Java2ExcelDtd readFromFile(java.io.InputStream xmlInput)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
This returns a Java2ExcelDtd implementation that will be configured with the xml received as input. This xml must be valid to the Parser.JAVA2EXCEL_LOCAL_DTD_URL.

Parameters:
xmlInput - the xml file.
Returns:
a fully configured instance of Java2ExcelDtd.
Throws:
java.io.IOException - if an Input/Output exception occurs.
org.xml.sax.SAXException - if a parsing exception occurs.
Since:
19/02/2006

readFromFile

public Java2ExcelDtd readFromFile(java.io.InputStream xmlInput,
                                  java.lang.Class[] typesToExcludeInAutoComplete)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
Similar to calling readFromFile(xmlInput, typesToExcludeInAutoComplete, false).

Parameters:
xmlInput - see readFromFile(InputStream, Class[], boolean)
typesToExcludeInAutoComplete - see readFromFile(InputStream, Class[], boolean)
Returns:
see readFromFile(InputStream, Class[], boolean)
Throws:
java.io.IOException - see readFromFile(InputStream, Class[], boolean)
org.xml.sax.SAXException - see readFromFile(InputStream, Class[], boolean)
Since:
22/02/2006

readFromFile

public Java2ExcelDtd readFromFile(java.io.InputStream xmlInput,
                                  java.lang.Class[] typesToExcludeInAutoComplete,
                                  boolean ignoreDefaultsExcludes)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
Parameters:
xmlInput - the xml file.
typesToExcludeInAutoComplete - the array of types to be excluded when searching for getters by reflection. No property that returns an instance of any of the types in this array will be printed in the excel file.
ignoreDefaultsExcludes - if true, then the values of the typesToExcludeInAutoComplete parameter will overwrite the default ones.
Returns:
a fully configured instance of Java2ExcelDtd.
Throws:
java.io.IOException - if an Input/Output exception occurs.
org.xml.sax.SAXException - if a parsing exception occurs.
Since:
21/02/2006

defaultJava2ExcelDtd

public Java2ExcelDtd defaultJava2ExcelDtd()
Returns:
a default implementation of Java2ExcelDtd with no properties asociated.
Since:
21/02/2006

defaultJava2ExcelDtd

public Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel)
Default typesToExcludeInAutoComplete are those in BodyDtdImpl.DEFAULT_TYPES_TO_EXCLUDE_IN_AUTO_COMPLETE.

Parameters:
includeExtraLevel - the number of levels in which to search for properties by reflexion.
Returns:
similar to defaultJava2ExcelDtd(), but setting the BodyDtd#setIncludeExtraLevel(int).
Since:
21/02/2006

defaultJava2ExcelDtd

public Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel,
                                          java.lang.Class[] typesToExcludeInAutoComplete)
Similar to calling defaultJava2ExcelDtd(includeExtraLevel, typesToExcludeInAutoComplete, false).

Parameters:
includeExtraLevel - see defaultJava2ExcelDtd(int, Class[], boolean)
typesToExcludeInAutoComplete - see defaultJava2ExcelDtd(int, Class[], boolean)
Returns:
see defaultJava2ExcelDtd(int, Class[], boolean)
Since:
22/02/2006
See Also:
defaultJava2ExcelDtd(int, Class[], boolean)

defaultJava2ExcelDtd

public Java2ExcelDtd defaultJava2ExcelDtd(int includeExtraLevel,
                                          java.lang.Class[] typesToExcludeInAutoComplete,
                                          boolean ignoreDefaultsExcludes)
Parameters:
includeExtraLevel - the number of levels in which to search for properties by reflexion.
typesToExcludeInAutoComplete - the array of types to be excluded when searching for getters by reflection. No property that returns an instance of any of the types in this array will be printed in the excel file.
ignoreDefaultsExcludes - if true, then the values of the typesToExcludeInAutoComplete parameter will overwrite the default ones.
Returns:
similar to defaultJava2ExcelDtd(int), but setting the types to exclude in auto complete.
Since:
21/02/2006


Copyright © 2006 epere4. All Rights Reserved.