xylia.sax.contentmodelparser
Class DefaultContentModelFactory

java.lang.Object
  |
  +--xylia.sax.contentmodelparser.DefaultContentModelFactory
All Implemented Interfaces:
ContentModelFactory, ContentModelKinds

public class DefaultContentModelFactory
extends java.lang.Object
implements ContentModelFactory

Construct a DefaultContentModel.

This is a callback pbject for the parser that constructs DefaultContentModels.

> Copyright: Copyright (c) 2001 Company: Memorial

Version:
1.0
Author:
Theodore Norvell, Dennis Peters and others.

Fields inherited from interface xylia.sax.contentmodelparser.ContentModelKinds
ANY, CHILDREN, EMPTY, MIXED
 
Constructor Summary
DefaultContentModelFactory()
           
 
Method Summary
 java.lang.Object finishContentModel(int kind)
          Complete construction of a content model.
 java.lang.Object finishContentModel(int kind, java.lang.Object regExp)
          Complete construction of a content model.
 java.lang.Object mkAlternation(java.lang.Object right, java.lang.Object left)
          Create a regular expression object representing an occurence of an alternation in the content model.
 java.lang.Object mkKleenePlus(java.lang.Object operand)
          Create a regular expression object representing nonempty repetition of a regular expression in the content model.
 java.lang.Object mkKleeneStar(java.lang.Object operand)
          Create a regular expression object representing possibly empty repetition of a regular expression in the content model.
 java.lang.Object mkName(java.lang.String name)
          Create a regular expression object representing an occurence of an element name in the content model.
 java.lang.Object mkOptional(java.lang.Object operand)
          Create a regular expression object representing an occurence of optional regular expression in the content model.
 java.lang.Object mkPCDATA()
          Create a regular expression object representing an occurence of #PCDATA in the content model.
 java.lang.Object mkSequence(java.lang.Object right, java.lang.Object left)
          Create a regular expression object representing an occurence of a sequence in the content model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContentModelFactory

public DefaultContentModelFactory()
Method Detail

finishContentModel

public java.lang.Object finishContentModel(int kind)
Complete construction of a content model.
Specified by:
finishContentModel in interface ContentModelFactory
Parameters:
kind, - either ANY or EMPTY.

finishContentModel

public java.lang.Object finishContentModel(int kind,
                                           java.lang.Object regExp)
Complete construction of a content model.
Specified by:
finishContentModel in interface ContentModelFactory
Parameters:
kind - Either MIXED or CHILDREN.
regExp - A regular expression representing the allowable sequence of children.

mkPCDATA

public java.lang.Object mkPCDATA()
Create a regular expression object representing an occurence of #PCDATA in the content model.
Specified by:
mkPCDATA in interface ContentModelFactory

mkName

public java.lang.Object mkName(java.lang.String name)
Create a regular expression object representing an occurence of an element name in the content model.
Specified by:
mkName in interface ContentModelFactory
Parameters:
name - The element name.

mkAlternation

public java.lang.Object mkAlternation(java.lang.Object right,
                                      java.lang.Object left)
Create a regular expression object representing an occurence of an alternation in the content model. An alternation is a choice of two regular expressions: left | right
Specified by:
mkAlternation in interface ContentModelFactory
Parameters:
left - A regular expression object representing the left operand.
right - A regular expression object representing the right operand.

mkSequence

public java.lang.Object mkSequence(java.lang.Object right,
                                   java.lang.Object left)
Create a regular expression object representing an occurence of a sequence in the content model. A sequence is a succession of two regular expressions: left , right
Specified by:
mkSequence in interface ContentModelFactory
Parameters:
left - A regular expression object representing the left operand.
right - A regular expression object representing the right operand.

mkOptional

public java.lang.Object mkOptional(java.lang.Object operand)
Create a regular expression object representing an occurence of optional regular expression in the content model. An optional regular expression represents something that may or may not be there: operand?
Specified by:
mkOptional in interface ContentModelFactory
Parameters:
operand - A regular expression object representing the operand.

mkKleeneStar

public java.lang.Object mkKleeneStar(java.lang.Object operand)
Create a regular expression object representing possibly empty repetition of a regular expression in the content model. A possibly empty repetition of a regular expression represents something that may be repeated any number of times: operand*
Specified by:
mkKleeneStar in interface ContentModelFactory
Parameters:
operand - A regular expression object representing the operand.

mkKleenePlus

public java.lang.Object mkKleenePlus(java.lang.Object operand)
Create a regular expression object representing nonempty repetition of a regular expression in the content model. A nonempty repetition of a regular expression represents something that may be repeated any number of times: operand+
Specified by:
mkKleenePlus in interface ContentModelFactory
Parameters:
operand - A regular expression object representing the operand.