String nodeName = node.getLocalName();
if (nodeName.equals(XMLConstants.ONE_TO_ONE)) {
return new XMLOneToOneAccessor(accessibleObject, node, this);
} else if (nodeName.equals(XMLConstants.MANY_TO_ONE)) {
return new XMLManyToOneAccessor(accessibleObject, node, this);
} else if (nodeName.equals(XMLConstants.ONE_TO_MANY)) {
if (MetadataHelper.isSupportedCollectionClass(accessibleObject.getRawClass())) {
return new XMLOneToManyAccessor(accessibleObject, node, this);
} else {
m_validator.throwInvalidCollectionTypeForRelationship(getJavaClass(), accessibleObject.getRawClass(), getAttributeName());