if (categoryAttribute != null) {
AssociationProperty associationProperty = AssociationEnhancement
.getAssociationProperty(categoryAttribute);
if (associationProperty != null
&& associationProperty.hasBeenSet()) {
OrdinalProperty ordinalProperty = (OrdinalProperty) categoryAttribute
.getProperty(OrdinalProperty.class);
if (ordinalProperty == null) {
throw new IOException(
"Error: Association without ordinal");
}
if (payloadStream == null) {
payloadStream = new CategoryListPayloadStream(
new SimpleIntEncoder());
}
payloadStream.appendIntToStream(ordinalProperty
.getOrdinal());
payloadStream.appendIntToStream(associationProperty
.getAssociation());
}
}