void writeFeedLink(Object entity, NavigationProperty property) throws XMLStreamException, ODataEdmException {

        xmlWriter.writeStartElement(ATOM_LINK);
        xmlWriter.writeAttribute(REL, SELF);

        if (entity == null) {
            if (ODataUriUtil.isActionCallUri(oDataUri) || ODataUriUtil.isFunctionCallUri(oDataUri)) {
                Option<TargetType> targetTypeOption = ODataUriUtil.resolveTargetType(oDataUri, entityDataModel);
                if (targetTypeOption.isDefined()) {
                    TargetType targetType = targetTypeOption.get();
                    String entitySetName = EntityDataModelUtil.getEntitySetByEntityTypeName(entityDataModel,
                            targetType.typeName()).getName();
                    xmlWriter.writeAttribute(TITLE, entitySetName);
                    xmlWriter.writeAttribute(HREF, entitySetName);
                } else {
                    throw new ODataEdmException("Failed to resolve entity target type");
                }

            } else {
                xmlWriter.writeAttribute(TITLE, getEntitySetName(oDataUri).get());
                xmlWriter.writeAttribute(HREF, getEntitySetName(oDataUri).get());
            }
        } else {
            xmlWriter.writeAttribute(TITLE, property.getName());
            xmlWriter.writeAttribute(HREF, String.format("%s/%s", getEntityWithKey(entity), property.getName()));
        }

        xmlWriter.writeEndElement();
    }
void writeFeedLink ( Object entity , NavigationProperty property ) throws XMLStreamException , ODataEdmException { xmlWriter . writeStartElement ( ATOM_LINK ) ; xmlWriter . writeAttribute ( REL , SELF ) ; if ( entity == null ) { if ( ODataUriUtil . isActionCallUri ( oDataUri ) || ODataUriUtil . isFunctionCallUri ( oDataUri ) ) { Option < TargetType > targetTypeOption = ODataUriUtil . resolveTargetType ( oDataUri , entityDataModel ) ; if ( targetTypeOption . isDefined ( ) ) { TargetType targetType = targetTypeOption . get ( ) ; String entitySetName = EntityDataModelUtil . getEntitySetByEntityTypeName ( entityDataModel , targetType . typeName ( ) ) . getName ( ) ; xmlWriter . writeAttribute ( TITLE , entitySetName ) ; xmlWriter . writeAttribute ( HREF , entitySetName ) ; } else { throw new ODataEdmException ( "Failed to resolve entity target type" ) ; } } else { xmlWriter . writeAttribute ( TITLE , getEntitySetName ( oDataUri ) . get ( ) ) ; xmlWriter . writeAttribute ( HREF , getEntitySetName ( oDataUri ) . get ( ) ) ; } } else { xmlWriter . writeAttribute ( TITLE , property . getName ( ) ) ; xmlWriter . writeAttribute ( HREF , String . format ( "%s/%s" , getEntityWithKey ( entity ) , property . getName ( ) ) ) ; } xmlWriter . writeEndElement ( ) ; }
Write a feed {@code <link>} element.

@throws XMLStreamException If unable to write to stream