schema2template.model
public class MSVExpressionInformation extends Object
Constructor and Description |
---|
MSVExpressionInformation(com.sun.msv.grammar.Expression exp) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHaveText()
Can the MSV expression have text content?
|
Set<com.sun.msv.grammar.Expression> |
getMultiples()
Returns all child elements which are no singletons
|
List<List<com.sun.msv.grammar.Expression>> |
getPathsContaining(com.sun.msv.grammar.Expression exp)
Gets all paths leading from this.getExpression() to exp (but not necessarily ending in exp).
|
Set<com.sun.msv.grammar.Expression> |
getSingletons()
Returns all singleton child elements
|
boolean |
isMandatory(Collection<com.sun.msv.grammar.Expression> equallyNamedChildren)
Determines whether an Element or Attribute child is mandatory.
|
public MSVExpressionInformation(com.sun.msv.grammar.Expression exp)
public Set<com.sun.msv.grammar.Expression> getSingletons()
public Set<com.sun.msv.grammar.Expression> getMultiples()
public List<List<com.sun.msv.grammar.Expression>> getPathsContaining(com.sun.msv.grammar.Expression exp)
exp
- The MSV Expression. If you use this.getExpression() you get
all paths starting from this.getExpression().
If you use someChildDefinition.getExpression() you get all paths from
this.getExpression() to the Expression of the Child Definition.public boolean canHaveText()
public boolean isMandatory(Collection<com.sun.msv.grammar.Expression> equallyNamedChildren)
If there are multiples of child (other equally named expressions) providing only one of those Expressions will determine whether exactly this expression is mandatory. In most cases this will return false, and in most cases this is not what you want to know. Therefore you can provide a Collection of (equally named) child expressions.
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.