}
}
private void bindComponent(ComponentAttributeSource attributeSource, AttributeBindingContainer container) {
final String attributeName = attributeSource.getName();
SingularAttribute attribute = container.getAttributeContainer().locateComponentAttribute( attributeName );
if ( attribute == null ) {
final Component component = new Component(
attributeSource.getPath(),
attributeSource.getClassName(),
attributeSource.getClassReference(),
null // component inheritance not YET supported
);
attribute = container.getAttributeContainer().createComponentAttribute( attributeName, component );
}
ComponentAttributeBinding componentAttributeBinding = container.makeComponentAttributeBinding( attribute );
if ( StringHelper.isNotEmpty( attributeSource.getParentReferenceAttributeName() ) ) {
final SingularAttribute parentReferenceAttribute =
componentAttributeBinding.getComponent()
.createSingularAttribute( attributeSource.getParentReferenceAttributeName() );
componentAttributeBinding.setParentReference( parentReferenceAttribute );
}