org.apache.ecs
Class ECSDefaults

java.lang.Object
  |
  +--org.apache.ecs.ECSDefaults

public final class ECSDefaults
extends java.lang.Object

This class is responsible for loading the ecs.properties file and getting the default settings for ECS. This allows you to edit a simple text file instead of having to edit the .java files and recompile. The property file can be specified via the 'ecs.properties' system property. For example, java -Decs.properties="my.ecs.properties". If ecs.properties is null then the standard ecs.properties resource in the ECS jar is used. If the property file cannot be loaded, a message is printed to standard error and hard-coded defaults are used instead.

Version:
$Id: ECSDefaults.java,v 1.5 2003/04/27 09:43:24 rdonkin Exp $

Field Summary
private  char attribute_equality_sign
           
private  boolean attribute_quote
           
private  char attribute_quote_char
           
private  char begin_end_modifier
           
private  char begin_start_modifier
           
private  int case_type
           
private  java.lang.String codeset
           
private static ECSDefaults defaults
          This singleton allows the properties to gracefully default in the case of an error.
private  boolean end_element
           
private  char end_end_modifier
           
private  char end_start_modifier
           
private  char end_tag
           
private  boolean filter_attribute_state
           
private  boolean filter_state
           
private  int position
           
private  boolean pretty_print
           
private  java.util.ResourceBundle resource
           
private  char start_tag
           
 
Constructor Summary
private ECSDefaults()
          This private constructor is used to create the singleton used in the public static methods.
 
Method Summary
static java.lang.String debugString()
          This method returns a string showing the current values.
static char getDefaultAttributeEqualitySign()
          What is the equality character for an attribute.
static boolean getDefaultAttributeQuote()
           
static char getDefaultAttributeQuoteChar()
           
static char getDefaultBeginEndModifier()
          What the end modifier should be
static char getDefaultBeginStartModifier()
          What the start modifier should be
static int getDefaultCaseType()
          Default value to set case type
static java.lang.String getDefaultCodeset()
          What codeset are we going to use the default is UTF-8.
static boolean getDefaultEndElement()
          Does this element need a closing tag?
static char getDefaultEndEndModifier()
          What the end modifier should be
static char getDefaultEndStartModifier()
          What the start modifier should be
static char getDefaultEndTag()
          Default end-of-tag character.
static boolean getDefaultFilterAttributeState()
          Should we filter the value of the element attributes
static boolean getDefaultFilterState()
          Should we filter the value of <>VALUE</>
static int getDefaultPosition()
          Position of tag relative to start and end.
static boolean getDefaultPrettyPrint()
          Should we print html in a more readable format?
static char getDefaultStartTag()
          Default start-of-tag character.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

defaults

private static ECSDefaults defaults
This singleton allows the properties to gracefully default in the case of an error.

resource

private java.util.ResourceBundle resource

filter_state

private boolean filter_state

filter_attribute_state

private boolean filter_attribute_state

attribute_equality_sign

private char attribute_equality_sign

begin_start_modifier

private char begin_start_modifier

end_start_modifier

private char end_start_modifier

begin_end_modifier

private char begin_end_modifier

end_end_modifier

private char end_end_modifier

attribute_quote_char

private char attribute_quote_char

attribute_quote

private boolean attribute_quote

end_element

private boolean end_element

codeset

private java.lang.String codeset

position

private int position

case_type

private int case_type

start_tag

private char start_tag

end_tag

private char end_tag

pretty_print

private boolean pretty_print
Constructor Detail

ECSDefaults

private ECSDefaults()
This private constructor is used to create the singleton used in the public static methods.
Method Detail

getDefaultFilterState

public static boolean getDefaultFilterState()
Should we filter the value of <>VALUE</>

getDefaultFilterAttributeState

public static boolean getDefaultFilterAttributeState()
Should we filter the value of the element attributes

getDefaultAttributeEqualitySign

public static char getDefaultAttributeEqualitySign()
What is the equality character for an attribute.

getDefaultBeginStartModifier

public static char getDefaultBeginStartModifier()
What the start modifier should be

getDefaultEndStartModifier

public static char getDefaultEndStartModifier()
What the start modifier should be

getDefaultBeginEndModifier

public static char getDefaultBeginEndModifier()
What the end modifier should be

getDefaultEndEndModifier

public static char getDefaultEndEndModifier()
What the end modifier should be

getDefaultAttributeQuoteChar

public static char getDefaultAttributeQuoteChar()

getDefaultAttributeQuote

public static boolean getDefaultAttributeQuote()

getDefaultEndElement

public static boolean getDefaultEndElement()
Does this element need a closing tag?

getDefaultCodeset

public static java.lang.String getDefaultCodeset()
What codeset are we going to use the default is UTF-8.

getDefaultPosition

public static int getDefaultPosition()
Position of tag relative to start and end.

getDefaultCaseType

public static int getDefaultCaseType()
Default value to set case type

getDefaultStartTag

public static char getDefaultStartTag()
Default start-of-tag character.

getDefaultEndTag

public static char getDefaultEndTag()
Default end-of-tag character.

getDefaultPrettyPrint

public static boolean getDefaultPrettyPrint()
Should we print html in a more readable format?

debugString

public static java.lang.String debugString()
This method returns a string showing the current values.


Copyright © 1999-2003 Apache Software Foundation. All Rights Reserved.