Examples of EdmMapping


Examples of org.apache.olingo.odata2.api.edm.EdmMapping

      final Map<String, Object> data, final String selfLink) throws EntityProviderException, EdmException {
    try {

      // We have to support the media resource mime type at the properties till version 1.2 then this can be refactored
      String mediaResourceMimeType = properties.getMediaResourceMimeType();
      EdmMapping entityTypeMapping = eia.getEntityType().getMapping();
      String self = null;

      if (entityTypeMapping != null) {
        String mediaResourceSourceKey = entityTypeMapping.getMediaResourceSourceKey();
        if (mediaResourceSourceKey != null) {
          self = (String) data.get(mediaResourceSourceKey);
        }
        if (self == null) {
          self = selfLink + "/$value";
        }
        if (mediaResourceMimeType == null) {
          String mediaResourceMimeTypeKey =
              entityTypeMapping.getMimeType() != null ? entityTypeMapping.getMimeType()
                  : entityTypeMapping.getMediaResourceMimeTypeKey();
          if (mediaResourceMimeTypeKey != null) {
            mediaResourceMimeType = (String) data.get(mediaResourceMimeTypeKey);
          }
          if (mediaResourceMimeType == null) {
            mediaResourceMimeType = ContentType.APPLICATION_OCTET_STREAM.toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.