if (eia.getExpandedNavigationPropertyNames().contains(navigationPropertyName)) {
if (properties.getCallbacks() != null && properties.getCallbacks().containsKey(navigationPropertyName)) {
writer.writeStartElement(Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
EdmNavigationProperty navProp = (EdmNavigationProperty) eia.getEntityType().getProperty(navigationPropertyName);
WriteFeedCallbackContext context = new WriteFeedCallbackContext();
context.setSourceEntitySet(eia.getEntitySet());
context.setNavigationProperty(navProp);
context.setEntryData(data);
ExpandSelectTreeNode subNode = properties.getExpandSelectTree().getLinks().get(navigationPropertyName);
context.setCurrentExpandSelectTreeNode(subNode);
context.setSelfLink(new URI(self));
ODataCallback callback = properties.getCallbacks().get(navigationPropertyName);
if (callback == null) {
throw new EntityProviderException(EntityProviderException.EXPANDNOTSUPPORTED);
}