* @param compositor the sequence/choice/all to modify
* @param isCollection if true will be unbounded
* @param anyNamespace value for the Any's namespace attribute
*/
private void addAnyToSchema(Property property, TypeDefParticle compositor, boolean isCollection, String anyNamespace) {
Any any = new Any();
any.setNamespace(anyNamespace);
if (property.isLax()) {
any.setProcessContents(Any.LAX);
} else {
any.setProcessContents(SKIP);
}
if (isCollection) {
any.setMinOccurs(Occurs.ZERO);
any.setMaxOccurs(Occurs.UNBOUNDED);
}
if (compositor instanceof Sequence) {
((Sequence) compositor).addAny(any);
} else if (compositor instanceof Choice) {
((Choice) compositor).addAny(any);