sk.uniba.euromath.document.schema.impl.loader
Class GrammarRulesModifier

java.lang.Object
  extended by sk.uniba.euromath.document.schema.impl.ExpressionCloner
      extended by sk.uniba.euromath.document.schema.impl.loader.GrammarRulesModifier

public final class GrammarRulesModifier
extends ExpressionCloner

Modifies given grammar, so it has following features:

Author:
Martin Vysny

Constructor Summary
GrammarRulesModifier(com.sun.msv.grammar.ExpressionPool oldPool, com.sun.msv.grammar.ExpressionPool newPool, NameClassTools ncTools, boolean allowOtherNS)
          Creates instance of the modifier.
 
Method Summary
protected  com.sun.msv.grammar.Expression cloneAttribute(com.sun.msv.grammar.AttributeExp exp, com.sun.msv.grammar.Expression clonedContent)
          Returns clone of this attribute expression.
protected  com.sun.msv.grammar.Expression cloneElement(com.sun.msv.grammar.ElementExp exp)
          Returns clone of this element expression.
protected  void setContentModel(com.sun.msv.grammar.ElementExp exp, com.sun.msv.grammar.Expression contentModel)
          Sets content model of given element expression.
 
Methods inherited from class sk.uniba.euromath.document.schema.impl.ExpressionCloner
clone, getPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrammarRulesModifier

public GrammarRulesModifier(com.sun.msv.grammar.ExpressionPool oldPool,
                            com.sun.msv.grammar.ExpressionPool newPool,
                            NameClassTools ncTools,
                            boolean allowOtherNS)
Creates instance of the modifier.

Parameters:
oldPool - current grammar rules are placed here
newPool - new grammar rules will be placed here
ncTools - instance of tools.
allowOtherNS - if true then elements and attributes from foreign namespace are insertable anywhere.
Method Detail

cloneAttribute

protected com.sun.msv.grammar.Expression cloneAttribute(com.sun.msv.grammar.AttributeExp exp,
                                                        com.sun.msv.grammar.Expression clonedContent)
Description copied from class: ExpressionCloner
Returns clone of this attribute expression. Suggested cloned content model is given.

Specified by:
cloneAttribute in class ExpressionCloner
Parameters:
exp - attribute expression to clone.
clonedContent - cloned content model.
Returns:
cloned attribute expression.

cloneElement

protected com.sun.msv.grammar.Expression cloneElement(com.sun.msv.grammar.ElementExp exp)
Description copied from class: ExpressionCloner
Returns clone of this element expression. Content is replaced later, so for now, you may set it to getPool().createEpsilon().

Specified by:
cloneElement in class ExpressionCloner
Parameters:
exp - Element expression to clone.
Returns:
Cloned element expression.

setContentModel

protected void setContentModel(com.sun.msv.grammar.ElementExp exp,
                               com.sun.msv.grammar.Expression contentModel)
Description copied from class: ExpressionCloner
Sets content model of given element expression.

Specified by:
setContentModel in class ExpressionCloner
Parameters:
exp - element expression
contentModel - cloned content model, that must be set to given element exp.


Copyright © 2003-2006 null. All Rights Reserved.