case URI7A:
// $links with 0..1 cardinality property
final EdmEntitySet targetLinkEntitySet = uriInfo.getTargetEntitySet();
final URI rootLinkUri = new URI(targetLinkEntitySet.getName());
EntityProviderWriteProperties linkProperties =
EntityProviderWriteProperties.serviceRoot(rootLinkUri).build();
@SuppressWarnings("unchecked")
final Map<String, Object> linkMap = (Map<String, Object>) content;
response = EntityProvider.writeLink(responseContentType, targetLinkEntitySet, linkMap, linkProperties);
break;
case URI7B:
// $links with * cardinality property
final EdmEntitySet targetLinksEntitySet = uriInfo.getTargetEntitySet();
final URI rootLinksUri = new URI(targetLinksEntitySet.getName());
EntityProviderWriteProperties linksProperties =
EntityProviderWriteProperties.serviceRoot(rootLinksUri).build();
@SuppressWarnings("unchecked")
final Map<String, Object> linksMap = (Map<String, Object>) content;
response = EntityProvider.writeLink(responseContentType, targetLinksEntitySet, linksMap, linksProperties);
break;
case URI1:
case URI2:
case URI6A:
case URI6B:
// Entity
final EdmEntitySet targetEntitySet = uriInfo.getTargetEntitySet();
final URI rootUri = new URI(targetEntitySet.getName());
EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(rootUri).build();
@SuppressWarnings("unchecked")
final Map<String, Object> objectMap = (Map<String, Object>) content;
response = EntityProvider.writeEntry(responseContentType, targetEntitySet, objectMap, properties);
break;