org.plasma.sdo.xml
Class DefaultOptions

java.lang.Object
  extended by org.plasma.sdo.xml.DefaultOptions
All Implemented Interfaces:
XMLOptions

public class DefaultOptions
extends Object
implements XMLOptions


Constructor Summary
DefaultOptions(String rootElementNamespaceURI)
           
DefaultOptions(String rootElementNamespaceURI, String rootElementName)
           
 
Method Summary
 String getEncoding()
          Returns the character encoding
 ErrorHandler getErrorHandler()
          Returns the current XML Schema (XSD) validation error handler
 String getRootElementName()
          The root element name.
 String getRootElementNamespaceURI()
          The root namespace URI.
 String getRootNamespacePrefix()
          The desired root namespace prefix.
 org.apache.commons.logging.Log getValidationLog()
          Returns the current XML Schema (XSD) validation error log.
 boolean isFailOnValidationError()
          Returns whether to propagate XML parser errors encountered when validating an XML document against an associated XML Schema.
 boolean isValidate()
          Returns whether to perform XML Schema (XSD) validation when reading XML input.
 void setEncoding(String encoding)
          Sets the character encoding.
 void setErrorHandler(ErrorHandler handler)
          Sets the current XML Schema (XSD) validation error handler
 void setFailOnValidationError(boolean failOnValidationError)
           
 void setRootElementName(String rootElementName)
          Sets root element name
 void setRootElementNamespaceURI(String rootElementNamespaceURI)
          Sets root namespace URI.
 void setRootNamespacePrefix(String rootNamespacePrefix)
          Sets desired root namespace prefix.
 void setValidate(boolean validate)
          Set whether to perform XML Schema (XSD) validation when reading XML input.
 void setValidationLog(org.apache.commons.logging.Log validationLog)
          Sets the current XML Schema (XSD) validation error log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOptions

public DefaultOptions(String rootElementNamespaceURI)

DefaultOptions

public DefaultOptions(String rootElementNamespaceURI,
                      String rootElementName)
Method Detail

isFailOnValidationError

public boolean isFailOnValidationError()
Description copied from interface: XMLOptions
Returns whether to propagate XML parser errors encountered when validating an XML document against an associated XML Schema. Only 'ERROR' and 'FATAL' errors are propagated.

Specified by:
isFailOnValidationError in interface XMLOptions
Returns:
whether to propagate XML parser errors encountered when validating an XML document against an associated XML Schema

setFailOnValidationError

public void setFailOnValidationError(boolean failOnValidationError)

isValidate

public boolean isValidate()
Description copied from interface: XMLOptions
Returns whether to perform XML Schema (XSD) validation when reading XML input. By default, any errors encountered are logged within the context of the parsing utility unless a log is supplied.

Specified by:
isValidate in interface XMLOptions
Returns:
whether to perform XML Schema (XSD) validation when reading XML input.
See Also:
Log

setValidate

public void setValidate(boolean validate)
Description copied from interface: XMLOptions
Set whether to perform XML Schema (XSD) validation when reading XML input. By default, any errors encountered are logged within the context of the parsing utility unless a log is supplied.

Specified by:
setValidate in interface XMLOptions
Parameters:
validate - whether to perform XML Schema (XSD) validation

setRootElementName

public void setRootElementName(String rootElementName)
Description copied from interface: XMLOptions
Sets root element name

Specified by:
setRootElementName in interface XMLOptions
Parameters:
rootElementName - the root element name

setRootElementNamespaceURI

public void setRootElementNamespaceURI(String rootElementNamespaceURI)
Description copied from interface: XMLOptions
Sets root namespace URI.

Specified by:
setRootElementNamespaceURI in interface XMLOptions
Parameters:
rootElementNamespaceURI - the root namespace URI

setRootNamespacePrefix

public void setRootNamespacePrefix(String rootNamespacePrefix)
Description copied from interface: XMLOptions
Sets desired root namespace prefix.

Specified by:
setRootNamespacePrefix in interface XMLOptions
Parameters:
rootNamespacePrefix - the desired root namespace prefix

setValidationLog

public void setValidationLog(org.apache.commons.logging.Log validationLog)
Description copied from interface: XMLOptions
Sets the current XML Schema (XSD) validation error log

Specified by:
setValidationLog in interface XMLOptions
Parameters:
validationLog - the log

getRootElementName

public String getRootElementName()
Description copied from interface: XMLOptions
The root element name.

Specified by:
getRootElementName in interface XMLOptions
Returns:
the root element name

getRootElementNamespaceURI

public String getRootElementNamespaceURI()
Description copied from interface: XMLOptions
The root namespace URI.

Specified by:
getRootElementNamespaceURI in interface XMLOptions
Returns:
the root namespace URI

getRootNamespacePrefix

public String getRootNamespacePrefix()
Description copied from interface: XMLOptions
The desired root namespace prefix.

Specified by:
getRootNamespacePrefix in interface XMLOptions
Returns:
the desired root namespace prefix

getValidationLog

public org.apache.commons.logging.Log getValidationLog()
Description copied from interface: XMLOptions
Returns the current XML Schema (XSD) validation error log.

Specified by:
getValidationLog in interface XMLOptions
Returns:
current XML Schema (XSD) validation error log

getErrorHandler

public ErrorHandler getErrorHandler()
Description copied from interface: XMLOptions
Returns the current XML Schema (XSD) validation error handler

Specified by:
getErrorHandler in interface XMLOptions
Returns:
the current XML Schema (XSD) validation error handler

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Description copied from interface: XMLOptions
Sets the current XML Schema (XSD) validation error handler

Specified by:
setErrorHandler in interface XMLOptions
Parameters:
handler - the current XML Schema (XSD) validation error handler

getEncoding

public String getEncoding()
Description copied from interface: XMLOptions
Returns the character encoding

Specified by:
getEncoding in interface XMLOptions
Returns:
the character encoding

setEncoding

public void setEncoding(String encoding)
Description copied from interface: XMLOptions
Sets the character encoding. E.g. ISO-8859-1

Specified by:
setEncoding in interface XMLOptions
Parameters:
encoding - the character encoding


Copyright © 2013. All rights reserved.