Examples of EntityProviderWriteProperties


Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

      }
      values.add(entryValues);
    }

    ODataContext context = getContext();
    final EntityProviderWriteProperties entryProperties = EntityProviderWriteProperties
        .serviceRoot(context.getPathInfo().getServiceRoot())
        .inlineCountType(uriInfo.getInlineCount())
        .inlineCount(count)
        .build();
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

    for (final EdmProperty property : entitySet.getEntityType().getKeyProperties()) {
      values.put(property.getName(), valueAccess.getPropertyValue(data, property));
    }

    ODataContext context = getContext();
    final EntityProviderWriteProperties entryProperties = EntityProviderWriteProperties
        .serviceRoot(context.getPathInfo().getServiceRoot())
        .build();

    final int timingHandle = context.startRuntimeMeasurement("EntityProvider", "writeLink");
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

      value = getStructuralTypeValueMap(data, (EdmStructuralType) type);
    }

    ODataContext context = getContext();

    final EntityProviderWriteProperties entryProperties = EntityProviderWriteProperties
        .serviceRoot(context.getPathInfo().getServiceRoot()).build();

    final int timingHandle = context.startRuntimeMeasurement("EntityProvider", "writeFunctionImport");

    final ODataResponse response =
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

      final T data, final String contentType) throws ODataException, EntityProviderException {
    final EdmEntityType entityType = entitySet.getEntityType();
    final Map<String, Object> values = getStructuralTypeValueMap(data, entityType);

    ODataContext context = getContext();
    EntityProviderWriteProperties writeProperties = EntityProviderWriteProperties
        .serviceRoot(context.getPathInfo().getServiceRoot())
        .expandSelectTree(expandSelectTree)
        .callbacks(getCallbacks(data, entityType))
        .build();
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

    super(type);
  }

  @Test
  public void contentOnly() throws Exception {
    final EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).contentOnly(true).build();

    AtomEntityProvider ser = createAtomEntityProvider();
    ODataResponse response =
        ser.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData,
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms");
    List<String> selectedPropertyNames = new ArrayList<String>();
    selectedPropertyNames.add("Name");
    ExpandSelectTreeNode expandSelectTree =
        ExpandSelectTreeNode.entitySet(entitySet).selectedProperties(selectedPropertyNames).build();
    final EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).contentOnly(true).expandSelectTree(expandSelectTree)
            .build();

    Map<String, Object> localRoomData = new HashMap<String, Object>();
    localRoomData.put("Name", "Neu Schwanstein");
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

    navigationPropertyNames.add("nr_Employees");
    navigationPropertyNames.add("nr_Building");
    ExpandSelectTreeNode expandSelectTree =
        ExpandSelectTreeNode.entitySet(entitySet).selectedProperties(selectedPropertyNames).expandedLinks(
            navigationPropertyNames).build();
    final EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).contentOnly(true).expandSelectTree(expandSelectTree)
            .build();

    Map<String, Object> localRoomData = new HashMap<String, Object>();
    localRoomData.put("Name", "Neu Schwanstein");
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

        List<Map<String, Object>> inlineData = result.getFeedData();
        if (inlineData == null) {
          inlineData = new ArrayList<Map<String, Object>>();
        }

        EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
        EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
        AtomFeedProducer inlineFeedProducer = new AtomFeedProducer(inlineProperties);
        EntityInfoAggregator inlineEia =
            EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
        inlineFeedProducer.append(writer, inlineEia, inlineData, true);

        writer.writeEndElement();
      }
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

        ExpandSelectTreeNode.entitySet(entitySet).selectedProperties(selectedPropertyNames).build();
    Map<String, Map<String, Object>> additinalLinks = new HashMap<String, Map<String, Object>>();
    Map<String, Object> buildingLink = new HashMap<String, Object>();
    buildingLink.put("Id", "1");
    additinalLinks.put("nr_Building", buildingLink);
    final EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).contentOnly(true).expandSelectTree(expandSelectTree)
            .additionalLinks(additinalLinks).build();

    Map<String, Object> localRoomData = new HashMap<String, Object>();
    localRoomData.put("Name", "Neu Schwanstein");
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties

        } catch (ODataApplicationException e) {
          throw new EntityProviderException(EntityProviderException.COMMON, e);
        }
        Map<String, Object> inlineData = result.getEntryData();
        if (inlineData != null && !inlineData.isEmpty()) {
          EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
          EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
          AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);
          EntityInfoAggregator inlineEia =
              EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
          inlineProducer.append(writer, inlineEia, inlineData, false, false);
        }

        writer.writeEndElement();
      }
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.