xylia.sax.contentmodelparser
Interface ContentModelFactory

All Superinterfaces:
ContentModelKinds
All Known Implementing Classes:
DefaultContentModelFactory

public interface ContentModelFactory
extends ContentModelKinds

An interface for objects that create content models. This interface is intended for use with the ContentModelParser. Copyright: Copyright (c) 2001 Company: Memorial

Version:
1.0
Author:
Theodore Norvell

Fields inherited from interface xylia.sax.contentmodelparser.ContentModelKinds
ANY, CHILDREN, EMPTY, MIXED
 
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.
 

Method Detail

finishContentModel

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

finishContentModel

public java.lang.Object finishContentModel(int kind,
                                           java.lang.Object regExp)
Complete construction of a content model.
Parameters:
kind - Either MIXED or CHILDREN.
regExp - An object representing the regular expression.

mkPCDATA

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

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.
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
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
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?
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*
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+
Parameters:
operand - A regular expression object representing the operand.