// #########################################
public static boolean isFieldMarkedAsRequiredOrMandatoryInXSDSchema(final FieldOutline fo) {
final CPropertyInfo pi = fo.getPropertyInfo();
if (pi.getSchemaComponent() instanceof XSParticle) {
final XSParticle particle = (XSParticle) pi.getSchemaComponent();
if (particle.getMinOccurs() > 0) {
// LOG.info("!!! MinOccurs of Element [" + pi.getName(false) + "] is [" + particle.getMinOccurs() + "].");
}
return particle.getMinOccurs() > 0;
} else if (pi.getSchemaComponent() instanceof XSAttributeUse) {
final XSAttributeUse attributeUse = (XSAttributeUse) pi.getSchemaComponent();
if (attributeUse.isRequired()) {
// LOG.info("!!! Required of Attribute [" + pi.getName(false) + "] is [" + attributeUse.isRequired() + "].");
}