* Returns true if the {@link #initiatingType} is restricted
* to '0' and '1'. This logic is not complete, but it at least
* finds the such definition in SOAP @mustUnderstand.
*/
private boolean isRestrictedTo0And1() {
XSFacet pattern = initiatingType.getFacet(XSFacet.FACET_PATTERN);
if(pattern!=null) {
String v = pattern.getValue().value;
if(v.equals("0|1") || v.equals("1|0") || v.equals("\\d"))
return true;
}
XSFacet enumf = initiatingType.getFacet(XSFacet.FACET_ENUMERATION);
if(enumf!=null) {
String v = enumf.getValue().value;
if(v.equals("0") || v.equals("1"))
return true;
}
return false;
}