System.out.println("Scale cannot be greater than digits");
return;
}
// xmlschema:fixed
XmlSchemaSimpleType fixedSimpleType = new XmlSchemaSimpleType(schema);
XmlSchemaSimpleTypeRestriction fixedRestriction = new XmlSchemaSimpleTypeRestriction();
fixedRestriction.setBaseTypeName(Constants.XSD_DECIMAL);
XmlSchemaTotalDigitsFacet fixedTotalDigits = new XmlSchemaTotalDigitsFacet();
fixedTotalDigits.setValue(digitsNode.toString());
XmlSchemaFractionDigitsFacet fixedFractionDigits = new XmlSchemaFractionDigitsFacet();
fixedFractionDigits.setValue(scaleNode.toString());
fixedFractionDigits.setFixed(true);
fixedRestriction.getFacets().add(fixedTotalDigits);
fixedRestriction.getFacets().add(fixedFractionDigits);
fixedSimpleType.setName(identifierNode.toString());
fixedSimpleType.setContent(fixedRestriction);
// add xmlschema:fixed
getSchema().getItems().add(fixedSimpleType);
getSchema().addType(fixedSimpleType);
// corba:fixed
Fixed corbaFixed = new Fixed();
corbaFixed.setQName(new QName(typeMap.getTargetNamespace(), identifierNode.toString()));
corbaFixed.setDigits(digits);
corbaFixed.setScale(scale);
corbaFixed.setRepositoryID(CorbaConstants.REPO_STRING
+ identifierNode.toString()
+ CorbaConstants.IDL_VERSION);
//corbaFixed.setType(Constants.XSD_DECIMAL);
corbaFixed.setType(fixedSimpleType.getQName());
// add corba:fixed
typeMap.getStructOrExceptionOrUnion().add(corbaFixed);
}