net.sourceforge.chaperon.model.lexicon
Class LexiconFactory

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bynet.sourceforge.chaperon.model.lexicon.LexiconFactory
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LexiconFactory
extends org.xml.sax.helpers.DefaultHandler

This class should generate a lexicon from a SAX stream

Version:
CVS $Id: LexiconFactory.java,v 1.5 2004/01/18 01:36:29 benedikta Exp $
Author:
Stephan Michels

Field Summary
static java.lang.String ALTERNATION_ELEMENT
          Element name
static java.lang.String BEGINOFLINE_ELEMENT
          Element name
static java.lang.String CHARACTERCLASS_ELEMENT
          Element name
static java.lang.String CHARACTERINTERVAL_ELEMENT
          Element name
static java.lang.String CHARACTERINTERVAL_MAX_ATTRIBUTE
          Attribute name of the max property
static java.lang.String CHARACTERINTERVAL_MIN_ATTRIBUTE
          Attribute name of the min property
static java.lang.String CHARACTERSET_CHARACTERS_ATTRIBUTE
          Attribute name of the characters property
static java.lang.String CHARACTERSET_ELEMENT
          Element name
static java.lang.String CHARACTERSTRING_ELEMENT
          Element name
static java.lang.String CHARACTERSTRING_SEQUENCE_ATTRIBUTE
          Attribute name of the sequence property
static java.lang.String CODE_ATTRIBUTE
           
static java.lang.String CONCATENATION_ELEMENT
          Element name
static java.lang.String ENDOFLINE_ELEMENT
          Element name
static java.lang.String EXCLUSIVE_ATTRIBUTE
          Attribute name of the exclusive property
static java.lang.String GROUP_ELEMENT
          Element name
static java.lang.String LEXEME_ELEMENT
          Element name
static java.lang.String LEXICON_ELEMENT
          Element name
static java.lang.String MAXOCCURS_ATTRIBUTE
          Attribute name of the minOccurs property
static java.lang.String MINOCCURS_ATTRIBUTE
          Attribute name of the minOccurs property
static java.lang.String NS
          The namspace of the lexicon configuration
static java.lang.String SYMBOL_ATTRIBUTE
          Attribute name of the symbol property
static java.lang.String UNIVERSALCHARACTER_ELEMENT
          Element name
 
Constructor Summary
LexiconFactory()
           
 
Method Summary
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Receive notification of the end of an element.
 Lexicon getLexicon()
          Returns the generated lexicon
 void setDocumentLocator(org.xml.sax.Locator locator)
          Receive an object for locating the origin of SAX document events.
 void startDocument()
          Receive notification of the beginning of a document.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Receive notification of the beginning of an element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NS

public static final java.lang.String NS
The namspace of the lexicon configuration

See Also:
Constant Field Values

LEXEME_ELEMENT

public static final java.lang.String LEXEME_ELEMENT
Element name

See Also:
Constant Field Values

SYMBOL_ATTRIBUTE

public static final java.lang.String SYMBOL_ATTRIBUTE
Attribute name of the symbol property

See Also:
Constant Field Values

LEXICON_ELEMENT

public static final java.lang.String LEXICON_ELEMENT
Element name

See Also:
Constant Field Values

ALTERNATION_ELEMENT

public static final java.lang.String ALTERNATION_ELEMENT
Element name

See Also:
Constant Field Values

BEGINOFLINE_ELEMENT

public static final java.lang.String BEGINOFLINE_ELEMENT
Element name

See Also:
Constant Field Values

CHARACTERCLASS_ELEMENT

public static final java.lang.String CHARACTERCLASS_ELEMENT
Element name

See Also:
Constant Field Values

EXCLUSIVE_ATTRIBUTE

public static final java.lang.String EXCLUSIVE_ATTRIBUTE
Attribute name of the exclusive property

See Also:
Constant Field Values

CHARACTERINTERVAL_ELEMENT

public static final java.lang.String CHARACTERINTERVAL_ELEMENT
Element name

See Also:
Constant Field Values

CHARACTERINTERVAL_MIN_ATTRIBUTE

public static final java.lang.String CHARACTERINTERVAL_MIN_ATTRIBUTE
Attribute name of the min property

See Also:
Constant Field Values

CHARACTERINTERVAL_MAX_ATTRIBUTE

public static final java.lang.String CHARACTERINTERVAL_MAX_ATTRIBUTE
Attribute name of the max property

See Also:
Constant Field Values

CHARACTERSTRING_ELEMENT

public static final java.lang.String CHARACTERSTRING_ELEMENT
Element name

See Also:
Constant Field Values

CHARACTERSTRING_SEQUENCE_ATTRIBUTE

public static final java.lang.String CHARACTERSTRING_SEQUENCE_ATTRIBUTE
Attribute name of the sequence property

See Also:
Constant Field Values

CHARACTERSET_ELEMENT

public static final java.lang.String CHARACTERSET_ELEMENT
Element name

See Also:
Constant Field Values

CHARACTERSET_CHARACTERS_ATTRIBUTE

public static final java.lang.String CHARACTERSET_CHARACTERS_ATTRIBUTE
Attribute name of the characters property

See Also:
Constant Field Values

CODE_ATTRIBUTE

public static final java.lang.String CODE_ATTRIBUTE
See Also:
Constant Field Values

CONCATENATION_ELEMENT

public static final java.lang.String CONCATENATION_ELEMENT
Element name

See Also:
Constant Field Values

GROUP_ELEMENT

public static final java.lang.String GROUP_ELEMENT
Element name

See Also:
Constant Field Values

UNIVERSALCHARACTER_ELEMENT

public static final java.lang.String UNIVERSALCHARACTER_ELEMENT
Element name

See Also:
Constant Field Values

ENDOFLINE_ELEMENT

public static final java.lang.String ENDOFLINE_ELEMENT
Element name

See Also:
Constant Field Values

MINOCCURS_ATTRIBUTE

public static final java.lang.String MINOCCURS_ATTRIBUTE
Attribute name of the minOccurs property

See Also:
Constant Field Values

MAXOCCURS_ATTRIBUTE

public static final java.lang.String MAXOCCURS_ATTRIBUTE
Attribute name of the minOccurs property

See Also:
Constant Field Values
Constructor Detail

LexiconFactory

public LexiconFactory()
Method Detail

getLexicon

public Lexicon getLexicon()
Returns the generated lexicon

Returns:
Lexicon

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Receive an object for locating the origin of SAX document events.


startDocument

public void startDocument()
Receive notification of the beginning of a document.


startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Receive notification of the beginning of an element.

Parameters:
namespaceURI - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Receive notification of the end of an element.

Parameters:
namespaceURI - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
Throws:
org.xml.sax.SAXException


Copyright ? 2003 Chaperon project. All Rights Reserved.