com.a7soft.examxml
Class Options

java.lang.Object
  extended by com.a7soft.examxml.Options

public class Options
extends java.lang.Object

Defines and keeps comparison options as well as SAXParser features and properties.

User can load all options from the property file using the Options.loadOptions(String fileName) method or assign necessary options separately using set-methods.

User: Yuri Kernogo Date: Aug 22, 2007 Time: 3:55:29 PM.

Version:
$Id: Options.java,v 1.8 2007/11/05 09:18:11 Yuri Kernogo Exp $

Method Summary
static boolean loadOptions(java.lang.String fileName)
          Loads options from the specified text file.
static void setCaseSensitive(boolean caseSensitive)
          Sets the caseSensitive option of comparison.
static void setContinueAfterFatalError(boolean continueAfterFatalError)
          Sets the continueAfterFatalError property of the SAXParser.
static void setDoNamespaces(boolean doNamespaces)
          Sets the doNamespaces property of the SAXParser.
static void setDoSchema(boolean doSchema)
          Sets the doSchema property of the SAXParser.
static void setEncoding(java.lang.String encoding, boolean options)
          Sets the encoding.
static void setIgnoreAttributes(boolean ignoreAttributes)
          Sets the ignoreAttributes option of comparison.
static void setIgnoreValues(boolean ignoreValues)
          Sets the ignoreValues option of comparison.
static void setIgnoreWhitespaces(boolean ignoreWhitespaces)
          Sets the ignoreWhitespaces option of comparison.
static void setInsertComments(boolean insertComments)
          Sets the insertComments option of comparison.
static void setSchemaFullChecking(boolean schemaFullChecking)
          Sets the schemaFullChecking property of the SAXParser.
static void setShemaValidation(int shemaValidation)
          Sets the shemaValidation property of the SAXParser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadOptions

public static boolean loadOptions(java.lang.String fileName)
Loads options from the specified text file. The text file should be standard property file containing lines name=value

Parameters:
fileName - the text file to load
Returns:
true if the specified text file exists

setDoNamespaces

public static void setDoNamespaces(boolean doNamespaces)
Sets the doNamespaces property of the SAXParser.

Parameters:
doNamespaces - true to set on

setDoSchema

public static void setDoSchema(boolean doSchema)
Sets the doSchema property of the SAXParser.

Parameters:
doSchema - true to set on

setSchemaFullChecking

public static void setSchemaFullChecking(boolean schemaFullChecking)
Sets the schemaFullChecking property of the SAXParser.

Parameters:
schemaFullChecking - true to set on

setContinueAfterFatalError

public static void setContinueAfterFatalError(boolean continueAfterFatalError)
Sets the continueAfterFatalError property of the SAXParser.

Parameters:
continueAfterFatalError - true to set on

setCaseSensitive

public static void setCaseSensitive(boolean caseSensitive)
Sets the caseSensitive option of comparison.

Parameters:
caseSensitive - true to set on

setIgnoreWhitespaces

public static void setIgnoreWhitespaces(boolean ignoreWhitespaces)
Sets the ignoreWhitespaces option of comparison.

Parameters:
ignoreWhitespaces - true to set on

setShemaValidation

public static void setShemaValidation(int shemaValidation)
Sets the shemaValidation property of the SAXParser.

Parameters:
shemaValidation - true to set on

setInsertComments

public static void setInsertComments(boolean insertComments)
Sets the insertComments option of comparison.

Parameters:
insertComments - true to set on

setEncoding

public static void setEncoding(java.lang.String encoding,
                               boolean options)
Sets the encoding.

Parameters:
encoding - String representing XML encoding
options - if true, the specified encoding is used, otherwise the encoding from a XML header is used

setIgnoreAttributes

public static void setIgnoreAttributes(boolean ignoreAttributes)
Sets the ignoreAttributes option of comparison.

Parameters:
ignoreAttributes - true to set on

setIgnoreValues

public static void setIgnoreValues(boolean ignoreValues)
Sets the ignoreValues option of comparison.

Parameters:
ignoreValues - true to set on