|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschema2template.model.MSVExpressionInformation
public class MSVExpressionInformation
Gather information from one MSV expression like:
Constructor Summary | |
---|---|
MSVExpressionInformation(com.sun.msv.grammar.Expression exp)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MSVExpressionInformation(com.sun.msv.grammar.Expression exp)
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |