sk.uniba.euromath.document.schema.impl.tools
Class TextValueGetter

java.lang.Object
  extended by sk.uniba.euromath.document.schema.impl.tools.TextValueGetter

public final class TextValueGetter
extends Object

Returns possible pure text values (no elements inbetween), that given expression can accept.

Author:
Martin Vysny

Field Summary
static IValueRule ANY_STRING
          Acceptor, that accepts any string.
static IValueRule EMPTY_STRING
          Acceptor, that accepts nothing except empty string.
static IValueRule NOTHING
          Accepts no string.
 
Constructor Summary
TextValueGetter(SchemaImpl schema)
          Constructor.
 
Method Summary
 IValueRule getValueRule(com.sun.msv.grammar.Expression exp)
          Returns value rule, that accepts text (without elements), that is accepted by exp.
 IValueRule getValueRule(Set<? extends com.sun.msv.grammar.Expression> exps)
          Returns value rule, that accepts text (without elements), that is accepted by at least one of exp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_STRING

public static final IValueRule ANY_STRING
Acceptor, that accepts any string.


EMPTY_STRING

public static final IValueRule EMPTY_STRING
Acceptor, that accepts nothing except empty string.


NOTHING

public static final IValueRule NOTHING
Accepts no string.

Constructor Detail

TextValueGetter

public TextValueGetter(SchemaImpl schema)
Constructor.

Parameters:
schema - the schema instance.
Method Detail

getValueRule

public IValueRule getValueRule(com.sun.msv.grammar.Expression exp)
Returns value rule, that accepts text (without elements), that is accepted by exp.

Parameters:
exp - exp to check.
Returns:
value rule.

getValueRule

public IValueRule getValueRule(Set<? extends com.sun.msv.grammar.Expression> exps)
Returns value rule, that accepts text (without elements), that is accepted by at least one of exp.

Parameters:
exps - set of exps to check. If NameClassAndExpression instance, its content model is walked instead.
Returns:
value rule.


Copyright © 2003-2006 null. All Rights Reserved.