Examples of EntityInfoAggregator


Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

      OutputStream outStream = csb.getOutputStream();
      XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, DEFAULT_CHARSET);
      writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);

      AtomEntryEntityProducer as = new AtomEntryEntityProducer(properties);
      EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet, properties.getExpandSelectTree());
      as.append(writer, eia, data, true, false);

      writer.flush();
      csb.closeWrite();
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

      OutputStream outStream = csb.getOutputStream();
      XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, DEFAULT_CHARSET);
      writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);

      AtomFeedProducer atomFeedProvider = new AtomFeedProducer(properties);
      EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet, properties.getExpandSelectTree());
      atomFeedProvider.append(writer, eia, data, false);

      writer.flush();
      csb.closeWrite();
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

      OutputStream outStream = csb.getOutputStream();
      XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, DEFAULT_CHARSET);
      writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);

      XmlLinkEntityProducer entity = new XmlLinkEntityProducer(properties);
      final EntityInfoAggregator entityInfo = EntityInfoAggregator.create(entitySet, properties.getExpandSelectTree());
      entity.append(writer, entityInfo, data, true);

      writer.flush();
      csb.closeWrite();
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

      OutputStream outStream = csb.getOutputStream();
      XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, DEFAULT_CHARSET);
      writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);

      XmlLinksEntityProducer entity = new XmlLinksEntityProducer(properties);
      final EntityInfoAggregator entityInfo = EntityInfoAggregator.create(entitySet, properties.getExpandSelectTree());
      entity.append(writer, entityInfo, data);

      writer.flush();
      csb.closeWrite();
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

      FactoryConfigurationError, ODataException {
    long t = startTimer();

    for (int i = 0; i < TIMES; i++) {
      ExpandSelectTreeNode epProperties = null;
      EntityInfoAggregator eia = EntityInfoAggregator.create(edmEntitySet, epProperties);
      provider.append(writer, eia, roomData, false, false);
    }
    stopTimer(t, "readAtomEntry");
  }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

    long t = startTimer();

    for (int i = 0; i < TIMES; i++) {
      ExpandSelectTreeNode epProperties = null;
      EntityInfoAggregator eia = EntityInfoAggregator.create(edmEntitySet, epProperties);
      provider.append(writer, eia, roomData, false, false);
    }
    stopTimer(t, "readAtomEntry");
  }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

  public void readAtomEntryOptimized() throws IOException, XpathException, SAXException, XMLStreamException,
      FactoryConfigurationError, ODataException {
    long t = startTimer();

    ExpandSelectTreeNode epProperties = null;
    EntityInfoAggregator eia = EntityInfoAggregator.create(edmEntitySet, epProperties);
    for (int i = 0; i < TIMES; i++) {
      provider.append(writer, eia, roomData, false, false);
    }
    stopTimer(t, "readAtomEntryOptimized");
  }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

    assertNotNull(csb);

    long t = startTimer();

    ExpandSelectTreeNode epProperties = null;
    EntityInfoAggregator eia = EntityInfoAggregator.create(edmEntitySet, epProperties);
    for (int i = 0; i < TIMES; i++) {
      provider.append(writer, eia, roomData, false, false);
    }
    stopTimer(t, "readAtomEntryOptimizedCsb");
  }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

    String navigationPropertyName = atomLinkRel.substring(Edm.NAMESPACE_REL_2007_08.length());

    EdmNavigationProperty navigationProperty =
        (EdmNavigationProperty) eia.getEntityType().getProperty(navigationPropertyName);
    EdmEntitySet entitySet = eia.getEntitySet().getRelatedEntitySet(navigationProperty);
    EntityInfoAggregator inlineEia = EntityInfoAggregator.create(entitySet);

    final EntityProviderReadProperties inlineProperties = createInlineProperties(readProperties, navigationProperty);

    // validations
    boolean isFeed = isInlineFeedValidated(reader, eia, atomLinkType, navigationPropertyName);
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.aggregator.EntityInfoAggregator

        reader.endObject();
      } else {
        EdmNavigationProperty navigationProperty =
            (EdmNavigationProperty) eia.getEntityType().getProperty(navigationPropertyName);
        EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navigationProperty);
        EntityInfoAggregator inlineEia = EntityInfoAggregator.create(inlineEntitySet);
        EntityProviderReadProperties inlineReadProperties;
        OnReadInlineContent callback = readProperties.getCallback();
        try {
          if (callback == null) {
            inlineReadProperties =
                EntityProviderReadProperties.init().mergeSemantic(readProperties.getMergeSemantic()).build();

          } else {
            inlineReadProperties = callback.receiveReadProperties(readProperties, navigationProperty);
          }

          if (navigationProperty.getMultiplicity() == EdmMultiplicity.MANY) {
            JsonFeedConsumer inlineConsumer = new JsonFeedConsumer(reader, inlineEia, inlineReadProperties);
            ODataFeed feed = inlineConsumer.readStartedInlineFeed(name);
            updateExpandSelectTree(navigationPropertyName, feed);
            if (callback == null) {
              properties.put(navigationPropertyName, feed);
              resultEntry.setContainsInlineEntry(true);
            } else {
              ReadFeedResult result = new ReadFeedResult(inlineReadProperties, navigationProperty, feed);
              callback.handleReadFeed(result);
            }
          } else {
            JsonEntryConsumer inlineConsumer = new JsonEntryConsumer(reader, inlineEia, inlineReadProperties);
            ODataEntry entry = inlineConsumer.readInlineEntry(name);
            updateExpandSelectTree(navigationPropertyName, entry);
            if (callback == null) {
              properties.put(navigationPropertyName, entry);
              resultEntry.setContainsInlineEntry(true);
            } else {
              ReadEntryResult result = new ReadEntryResult(inlineReadProperties, navigationProperty, entry);
              callback.handleReadEntry(result);
            }
          }

        } catch (ODataApplicationException e) {
          throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
              .getSimpleName()), e);
        }
      }
      reader.endObject();
    } else {
      final EdmNavigationProperty navigationProperty =
          (EdmNavigationProperty) eia.getEntityType().getProperty(navigationPropertyName);
      final EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navigationProperty);
      final EntityInfoAggregator inlineInfo = EntityInfoAggregator.create(inlineEntitySet);
      OnReadInlineContent callback = readProperties.getCallback();
      EntityProviderReadProperties inlineReadProperties;
      if (callback == null) {
        inlineReadProperties =
            EntityProviderReadProperties.init().mergeSemantic(readProperties.getMergeSemantic()).build();
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.