odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/XmlEntryDeserializer.java [409:464]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      final String type, final EdmNavigationProperty navigationProperty) throws EntityProviderException, EdmException {
    boolean isFeed = false;
    try {
      reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      //
      ContentType cType = ContentType.parse(type);
      if (cType == null) {
        throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"));
      }
      EdmMultiplicity navigationMultiplicity = navigationProperty.getMultiplicity();

      switch (navigationMultiplicity) {
      case MANY:
        validateFeedTags(reader, cType);
        isFeed = true;
        break;
      case ONE:
      case ZERO_TO_ONE:
        validateEntryTags(reader, cType);
        break;
      }
    } catch (XMLStreamException e) {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"), e);
    }
    return isFeed;
  }

  private void validateEntryTags(final XMLStreamReader reader, final ContentType cType) throws XMLStreamException,
      EntityProviderException {
    if (FormatXml.ATOM_ENTRY.equals(cType.getParameters().get(FormatXml.ATOM_TYPE))) {
      int next = reader.nextTag();
      if (XMLStreamConstants.START_ELEMENT == next) {
        reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_ENTRY);
      } else {
        reader.require(XMLStreamConstants.END_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      }
    } else {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("entry"));
    }
  }

  private void validateFeedTags(final XMLStreamReader reader, final ContentType cType) throws XMLStreamException,
      EntityProviderException {
    if (FormatXml.ATOM_FEED.equals(cType.getParameters().get(FormatXml.ATOM_TYPE))) {
      int next = reader.nextTag();
      if (XMLStreamConstants.START_ELEMENT == next) {
        reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED);
      } else {
        reader.require(XMLStreamConstants.END_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      }
    } else {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("feed"));
    }
  }

  private void readContent(final XMLStreamReader reader, final EntityInfoAggregator eia,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java [492:547]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      final String type, final EdmNavigationProperty navigationProperty) throws EntityProviderException, EdmException {
    boolean isFeed = false;
    try {
      reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      //
      ContentType cType = ContentType.parse(type);
      if (cType == null) {
        throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"));
      }
      EdmMultiplicity navigationMultiplicity = navigationProperty.getMultiplicity();

      switch (navigationMultiplicity) {
      case MANY:
        validateFeedTags(reader, cType);
        isFeed = true;
        break;
      case ONE:
      case ZERO_TO_ONE:
        validateEntryTags(reader, cType);
        break;
      }
    } catch (XMLStreamException e) {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"), e);
    }
    return isFeed;
  }

  private void validateEntryTags(final XMLStreamReader reader, final ContentType cType) throws XMLStreamException,
      EntityProviderException {
    if (FormatXml.ATOM_ENTRY.equals(cType.getParameters().get(FormatXml.ATOM_TYPE))) {
      int next = reader.nextTag();
      if (XMLStreamConstants.START_ELEMENT == next) {
        reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_ENTRY);
      } else {
        reader.require(XMLStreamConstants.END_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      }
    } else {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("entry"));
    }
  }

  private void validateFeedTags(final XMLStreamReader reader, final ContentType cType) throws XMLStreamException,
      EntityProviderException {
    if (FormatXml.ATOM_FEED.equals(cType.getParameters().get(FormatXml.ATOM_TYPE))) {
      int next = reader.nextTag();
      if (XMLStreamConstants.START_ELEMENT == next) {
        reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED);
      } else {
        reader.require(XMLStreamConstants.END_ELEMENT, Edm.NAMESPACE_M_2007_08, FormatXml.M_INLINE);
      }
    } else {
      throw new EntityProviderException(EntityProviderException.INVALID_INLINE_CONTENT.addContent("feed"));
    }
  }

  private void readContent(final XMLStreamReader reader, final EntityInfoAggregator eia,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



