Java Code Examples for org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer#setName()

The following examples show how to use org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer#setName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 6 votes vote down vote up
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
  entitySets.add(getEntitySet(CONTAINER, ES_CATEGORIES_NAME));
  
  // Create function imports
  List<CsdlFunctionImport> functionImports = new ArrayList<CsdlFunctionImport>();
  functionImports.add(getFunctionImport(CONTAINER, FUNCTION_COUNT_CATEGORIES));
  
  // Create action imports
  List<CsdlActionImport> actionImports = new ArrayList<CsdlActionImport>();
  actionImports.add(getActionImport(CONTAINER, ACTION_RESET));
  
  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);
  entityContainer.setFunctionImports(functionImports);
  entityContainer.setActionImports(actionImports);
  
  return entityContainer;

}
 
Example 2
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
  entitySets.add(getEntitySet(CONTAINER, ES_CATEGORIES_NAME));
  
  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);
  
  return entityContainer;

}
 
Example 3
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 4
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {

  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;
}
 
Example 5
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 6
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {

  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
  entitySets.add(getEntitySet(CONTAINER, ES_CATEGORIES_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;
}
 
Example 7
Source File: CarsEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() throws ODataException {
  CsdlEntityContainer container = new CsdlEntityContainer();
  container.setName(CONTAINER_FQN.getName());

  // EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  container.setEntitySets(entitySets);
  entitySets.add(getEntitySet(CONTAINER_FQN, ES_CARS_NAME));
  entitySets.add(getEntitySet(CONTAINER_FQN, ES_MANUFACTURER_NAME));

  return container;
}
 
Example 8
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 9
Source File: DemoEdmProvider.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {

    // create EntitySets
    List<CsdlEntitySet> entitySets = new ArrayList<>();
    entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

    // create EntityContainer
    CsdlEntityContainer entityContainer = new CsdlEntityContainer();
    entityContainer.setName(CONTAINER_NAME);
    entityContainer.setEntitySets(entitySets);

    return entityContainer;
}
 
Example 10
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 11
Source File: EDMProvider.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * This method creates a Csdl entity container.
 *
 * @return Csdl entity container
 * @see CsdlEntityContainer
 */
private CsdlEntityContainer generateCsdlEntityContainer() {
    CsdlEntityContainer container = new CsdlEntityContainer();
    container.setName(containerFullQName.getName());
    container.setEntitySets(new ArrayList<>(csdlEntitySetMap.values()));
    return container;
}
 
Example 12
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 13
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;
}
 
Example 14
Source File: MetadataDocumentXmlSerializerTest.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer1() throws ODataException {
  CsdlEntityContainer container = new CsdlEntityContainer();
  container.setName("container1");
  
  // EntitySets
  container.setEntitySets(Collections.singletonList(getEntitySet(nameContainer1, "ES")));
  return container;
}
 
Example 15
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
  entitySets.add(getEntitySet(CONTAINER, ES_CATEGORIES_NAME));
  
  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);
  
  return entityContainer;

}
 
Example 16
Source File: MetadataDocumentJsonSerializerTest.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() throws ODataException {
  CsdlEntityContainer container = new CsdlEntityContainer();
  container.setName("container");

  // EntitySets
  container.setEntitySets(Arrays.asList(getEntitySet(nameContainer, "ESAllPrim"),
      getEntitySet(nameContainer, "ES"),
      getEntitySet(nameContainer, "ESOne"),
      getEntitySet(nameContainer, "ESTwoKeyNav"),
      getEntitySet(nameContainer, "ESTwoKeyNavOne")));

  // Singletons
  container.setSingletons(Arrays.asList(getSingleton(nameContainer, "SI"),
      getSingleton(nameContainer, "SIBinding")));

  // ActionImports
  container.setActionImports(Collections.singletonList(getActionImport(nameContainer, "AIRTPrimParam")));

  // FunctionImports
  container.setFunctionImports(Arrays.asList(getFunctionImport(nameContainer, "FINRTInt16"),
      getFunctionImport(null, "FINRTInt161")));
  
  container.setExtendsContainer(new FullQualifiedName(nameSpace1, "container1").getFullQualifiedNameAsString());

  return container;
}
 
Example 17
Source File: MetadataDocumentJsonSerializerTest.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer1() throws ODataException {
  CsdlEntityContainer container = new CsdlEntityContainer();
  container.setName("container1");

  // EntitySets
  container.setEntitySets(Arrays.asList(getEntitySet(nameContainer1, "ESAllPrim")));
  container.setExtendsContainer(nameContainer2.getFullQualifiedNameAsString());

  return container;
}
 
Example 18
Source File: ObservationCsdlEdmProvider.java    From arctic-sea with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlEntityContainer getEntityContainer() throws ODataException {
    CsdlEntityContainer entityContainer = new CsdlEntityContainer();
    entityContainer.setName(CONTAINER_NAME);
    entityContainer.setEntitySets(Collections
                                          .singletonList(getEntitySet(FQN.CONTAINER, Prop.OBSERVATION_COLLECTION)));
    return entityContainer;
}
 
Example 19
Source File: DemoEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
public CsdlEntityContainer getEntityContainer() {
  // create EntitySets
  List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
  entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));

  // create EntityContainer
  CsdlEntityContainer entityContainer = new CsdlEntityContainer();
  entityContainer.setName(CONTAINER_NAME);
  entityContainer.setEntitySets(entitySets);

  return entityContainer;

}
 
Example 20
Source File: MetadataDocumentJsonSerializerTest.java    From olingo-odata4 with Apache License 2.0 4 votes vote down vote up
public CsdlEntityContainer getEntityContainer2() throws ODataException {
  CsdlEntityContainer container = new CsdlEntityContainer();
  container.setName("container2");

  return container;
}