if (LOG.isDebugEnabled()) {
LOG.debug("objectToElement(NO): " + log("field", fieldName) + " is OneToManyAssociation");
}
final OneToManyAssociation oneToManyAssociation = (OneToManyAssociation) field;
final Element xmlCollectionElement = xmlFieldElement; // more
// meaningful
// locally
// scoped
// name
ObjectAdapter collection;
try {
collection = oneToManyAssociation.get(object);
final ObjectSpecification referencedTypeNos = oneToManyAssociation.getSpecification();
final String fullyQualifiedClassName = referencedTypeNos.getFullIdentifier();
// XML
isisMetaModel.setIsisCollection(xmlCollectionElement, schema.getPrefix(), fullyQualifiedClassName, collection);
} catch (final Exception ex) {
LOG.warn("objectToElement(NO): " + log("field", fieldName) + ": get(obj) threw exception - skipping XML generation");
}
// XSD
xsdFieldElement = schema.createXsElementForNofCollection(xsElement, xmlCollectionElement, oneToManyAssociation.getSpecification().getFullIdentifier(), FacetUtil.getFacetsByType(oneToManyAssociation));
} else {
if (LOG.isInfoEnabled()) {
LOG.info("objectToElement(NO): " + log("field", fieldName) + " is unknown type; ignored");
}