當前位置: 首頁>>代碼示例>>Java>>正文


Java GetComplexPropertyUriInfo類代碼示例

本文整理匯總了Java中org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo的典型用法代碼示例。如果您正苦於以下問題:Java GetComplexPropertyUriInfo類的具體用法?Java GetComplexPropertyUriInfo怎麽用?Java GetComplexPropertyUriInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GetComplexPropertyUriInfo類屬於org.apache.olingo.odata2.api.uri.info包,在下文中一共展示了GetComplexPropertyUriInfo類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readEntityComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
@Override
public ODataResponse readEntityComplexProperty(GetComplexPropertyUriInfo uri_info, String content_type)
      throws ODataException
{
   EdmProperty target = uri_info.getPropertyPath().get(uri_info.getPropertyPath().size() - 1);
   String entityTarget = uri_info.getTargetEntitySet().getName();
   Map<String, Object> values = Model.getEntitySet(entityTarget).getComplexProperty(uri_info);
   return EntityProvider.writeProperty(content_type, target, values);
}
 
開發者ID:SentinelDataHub,項目名稱:dhus-core,代碼行數:10,代碼來源:Processor.java

示例2: getComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
public Map<String, Object> getComplexProperty(
      GetComplexPropertyUriInfo uri_info) throws ODataException
{
   KeyPredicate startKP = uri_info.getKeyPredicates().get(0);
   EdmProperty target
         = uri_info.getPropertyPath()
         .get(uri_info.getPropertyPath().size() - 1);
   T t = Navigator.<T>navigate(uri_info.getStartEntitySet(), startKP,
         uri_info.getNavigationSegments(), null);
   return t.getComplexProperty(target.getName());
}
 
開發者ID:SentinelDataHub,項目名稱:dhus-core,代碼行數:12,代碼來源:AbstractEntitySet.java

示例3: readEntityComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
@Override
public ODataResponse readEntityComplexProperty(final GetComplexPropertyUriInfo uriInfo, final String contentType)
    throws ODataException {
  Object data = retrieveData(
      uriInfo.getStartEntitySet(),
      uriInfo.getKeyPredicates(),
      uriInfo.getFunctionImport(),
      mapFunctionParameters(uriInfo.getFunctionImportParameters()),
      uriInfo.getNavigationSegments());

  if (data == null) {
    throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
  }

  final List<EdmProperty> propertyPath = uriInfo.getPropertyPath();
  final EdmProperty property = propertyPath.get(propertyPath.size() - 1);
  final Object value = property.isSimple() ?
      property.getMapping() == null || property.getMapping().getMediaResourceMimeTypeKey() == null ?
          getPropertyValue(data, propertyPath) : getSimpleTypeValueMap(data, propertyPath) :
      getStructuralTypeValueMap(getPropertyValue(data, propertyPath), (EdmStructuralType) property.getType());

  ODataContext context = getContext();
  final int timingHandle = context.startRuntimeMeasurement("EntityProvider", "writeProperty");

  final ODataResponse response = EntityProvider.writeProperty(contentType, property, value);

  context.stopRuntimeMeasurement(timingHandle);

  return ODataResponse.fromResponse(response).eTag(constructETag(uriInfo.getTargetEntitySet(), data)).build();
}
 
開發者ID:apache,項目名稱:olingo-odata2,代碼行數:31,代碼來源:ListsProcessor.java

示例4: readEntityComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
@Override
public ODataResponse readEntityComplexProperty(final GetComplexPropertyUriInfo uriInfo, final String contentType)
    throws ODataException {
  Object data = retrieveData(
      uriInfo.getStartEntitySet(),
      uriInfo.getKeyPredicates(),
      uriInfo.getFunctionImport(),
      mapFunctionParameters(uriInfo.getFunctionImportParameters()),
      uriInfo.getNavigationSegments());

  // if (!appliesFilter(data, uriInfo.getFilter()))
  if (data == null) {
    throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
  }

  final List<EdmProperty> propertyPath = uriInfo.getPropertyPath();
  final EdmProperty property = propertyPath.get(propertyPath.size() - 1);
  final Object value = property.isSimple() ?
      property.getMapping() == null || property.getMapping().getMediaResourceMimeTypeKey() == null ?
          getPropertyValue(data, propertyPath) : getSimpleTypeValueMap(data, propertyPath) :
      getStructuralTypeValueMap(getPropertyValue(data, propertyPath), (EdmStructuralType) property.getType());

  ODataContext context = getContext();
  final int timingHandle = context.startRuntimeMeasurement("EntityProvider", "writeProperty");

  final ODataResponse response = EntityProvider.writeProperty(contentType, property, value);

  context.stopRuntimeMeasurement(timingHandle);

  return ODataResponse.fromResponse(response).eTag(constructETag(uriInfo.getTargetEntitySet(), data)).build();
}
 
開發者ID:apache,項目名稱:olingo-odata2,代碼行數:32,代碼來源:ListsProcessor.java

示例5: readEntitySimpleProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
@Override
public ODataResponse readEntitySimpleProperty(final GetSimplePropertyUriInfo uriInfo, final String contentType)
    throws ODataException {
  return readEntityComplexProperty((GetComplexPropertyUriInfo) uriInfo, contentType);
}
 
開發者ID:apache,項目名稱:olingo-odata2,代碼行數:6,代碼來源:ListsProcessor.java

示例6: readEntityComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
/**
 * @see EntityComplexPropertyProcessor
 */
@Override
public ODataResponse readEntityComplexProperty(final GetComplexPropertyUriInfo uriInfo, final String contentType)
    throws ODataException {
  throw new ODataNotImplementedException();
}
 
開發者ID:apache,項目名稱:olingo-odata2,代碼行數:9,代碼來源:ODataSingleProcessor.java

示例7: readEntityComplexProperty

import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo; //導入依賴的package包/類
/**
 * Reads a complex property of an entity.
 * @param uriInfo information about the request URI
 * @param contentType the content type of the response
 * @return a {@link ODataResponse} object
 * @throws ODataException
 */
ODataResponse readEntityComplexProperty(GetComplexPropertyUriInfo uriInfo, String contentType) throws ODataException;
 
開發者ID:apache,項目名稱:olingo-odata2,代碼行數:9,代碼來源:EntityComplexPropertyProcessor.java


注:本文中的org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。