org.odftoolkit.odfvalidator
Class ODFValidator

java.lang.Object
  extended by org.odftoolkit.odfvalidator.ODFValidator
All Implemented Interfaces:
ODFValidatorProvider

public class ODFValidator
extends Object
implements ODFValidatorProvider


Field Summary
protected  Configuration m_aConfig
           
protected  OdfVersion m_aVersion
           
protected  boolean m_bUseMathDTD
           
protected  OdfVersion mOdfPackageVersion
           
 
Constructor Summary
ODFValidator(Configuration aConfig, Logger.LogLevel nLogLevel, boolean logAsHTML, OdfVersion aVersion, boolean bUseMathDTD)
          Creates a new instance of Validator
ODFValidator(Configuration aConfig, Logger.LogLevel nLogLevel, OdfVersion aVersion, boolean bUseMathDTD)
          Creates a new instance of Validator
 
Method Summary
 Validator getDSigValidator(PrintStream aOut, OdfVersion aVersion)
           
 String getGenerator()
          get Generator from last validateFile or validateStream call
 Validator getManifestValidator(PrintStream aOut, OdfVersion aVersion)
           
 String getMathMLDTDSystemId(OdfVersion aVersion)
           
 Validator getMathMLValidator(PrintStream aOut, OdfVersion aVersion)
           
 String getOdfVersion()
          Returns either the ODF version request to validate or the ODF version of the root document as fall-back
 Validator getStrictValidator(PrintStream aOut, OdfVersion aVersion)
           
 Validator getValidator(PrintStream aOut, OdfVersion aVersion)
           
 void resetValidatorProvider()
           
 boolean validate(PrintStream aOut, Configuration aConfig, OdfValidatorMode eMode)
           
 boolean validate(PrintStream aOut, InputStream aInputStream, String aBaseURI, OdfValidatorMode eMode, SAXParseExceptionFilter aFilter)
           
 boolean validate(PrintStream aOut, List<String> aFileNames, String aExcludeRegExp, OdfValidatorMode eMode, boolean bRecursive, String aFilterFileName)
           
 boolean validateFile(PrintStream aOut, File aDocFile, OdfValidatorMode eMode, SAXParseExceptionFilter aFilter)
          validate the input File
 boolean validateStream(PrintStream aOut, InputStream aInputStream, String aBaseURI, OdfValidatorMode eMode, SAXParseExceptionFilter aFilter)
          validate the input Stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_aConfig

protected Configuration m_aConfig

m_aVersion

protected OdfVersion m_aVersion

mOdfPackageVersion

protected OdfVersion mOdfPackageVersion

m_bUseMathDTD

protected boolean m_bUseMathDTD
Constructor Detail

ODFValidator

public ODFValidator(Configuration aConfig,
                    Logger.LogLevel nLogLevel,
                    OdfVersion aVersion,
                    boolean bUseMathDTD)
             throws ODFValidatorException
Creates a new instance of Validator

Throws:
ODFValidatorException

ODFValidator

public ODFValidator(Configuration aConfig,
                    Logger.LogLevel nLogLevel,
                    boolean logAsHTML,
                    OdfVersion aVersion,
                    boolean bUseMathDTD)
             throws ODFValidatorException
Creates a new instance of Validator

Throws:
ODFValidatorException
Method Detail

getOdfVersion

public String getOdfVersion()
Returns either the ODF version request to validate or the ODF version of the root document as fall-back


validate

public boolean validate(PrintStream aOut,
                        Configuration aConfig,
                        OdfValidatorMode eMode)
                 throws ODFValidatorException
Throws:
ODFValidatorException

validate

public boolean validate(PrintStream aOut,
                        List<String> aFileNames,
                        String aExcludeRegExp,
                        OdfValidatorMode eMode,
                        boolean bRecursive,
                        String aFilterFileName)
                 throws ODFValidatorException
Throws:
ODFValidatorException

validate

public boolean validate(PrintStream aOut,
                        InputStream aInputStream,
                        String aBaseURI,
                        OdfValidatorMode eMode,
                        SAXParseExceptionFilter aFilter)
                 throws ODFValidatorException
Throws:
ODFValidatorException

validateFile

public boolean validateFile(PrintStream aOut,
                            File aDocFile,
                            OdfValidatorMode eMode,
                            SAXParseExceptionFilter aFilter)
                     throws ODFValidatorException
validate the input File

After validation the getGenerator method can be called to get the generator of the validated file

Throws:
ODFValidatorException

validateStream

public boolean validateStream(PrintStream aOut,
                              InputStream aInputStream,
                              String aBaseURI,
                              OdfValidatorMode eMode,
                              SAXParseExceptionFilter aFilter)
                       throws ODFValidatorException
validate the input Stream

After validation the getGenerator method can be called to get the generator of the validated file

Throws:
ODFValidatorException

getManifestValidator

public Validator getManifestValidator(PrintStream aOut,
                                      OdfVersion aVersion)
                               throws ODFValidatorException
Specified by:
getManifestValidator in interface ODFValidatorProvider
Throws:
ODFValidatorException

getValidator

public Validator getValidator(PrintStream aOut,
                              OdfVersion aVersion)
                       throws ODFValidatorException
Specified by:
getValidator in interface ODFValidatorProvider
Throws:
ODFValidatorException

getStrictValidator

public Validator getStrictValidator(PrintStream aOut,
                                    OdfVersion aVersion)
                             throws ODFValidatorException
Specified by:
getStrictValidator in interface ODFValidatorProvider
Throws:
ODFValidatorException

getMathMLValidator

public Validator getMathMLValidator(PrintStream aOut,
                                    OdfVersion aVersion)
                             throws ODFValidatorException
Specified by:
getMathMLValidator in interface ODFValidatorProvider
Throws:
ODFValidatorException

getMathMLDTDSystemId

public String getMathMLDTDSystemId(OdfVersion aVersion)
                            throws ODFValidatorException
Specified by:
getMathMLDTDSystemId in interface ODFValidatorProvider
Throws:
ODFValidatorException

getDSigValidator

public Validator getDSigValidator(PrintStream aOut,
                                  OdfVersion aVersion)
                           throws ODFValidatorException
Specified by:
getDSigValidator in interface ODFValidatorProvider
Throws:
ODFValidatorException

resetValidatorProvider

public void resetValidatorProvider()
Specified by:
resetValidatorProvider in interface ODFValidatorProvider

getGenerator

public String getGenerator()
get Generator from last validateFile or validateStream call



Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.