All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.olingo.client.api.domain.ClientServiceDocument Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.olingo.client.api.domain;

import java.net.URI;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class ClientServiceDocument {

  private final Map entitySets = new HashMap<>();

  private final Map functionImports = new HashMap<>();

  private final Map singletons = new HashMap<>();

  private final Map relatedServiceDocuments = new HashMap<>();

  public Map getEntitySets() {
    return entitySets;
  }

  /**
   * Gets entity set names.
   * 
   * @return entity set names.
   */
  public Collection getEntitySetNames() {
    return entitySets.keySet();
  }

  /**
   * Gets entity set URIs.
   * 
   * @return entity set URIs.
   */
  public Collection getEntitySetURIs() {
    return entitySets.values();
  }

  /**
   * Gets URI about the given entity set.
   * 
   * @param name name.
   * @return URI.
   */
  public URI getEntitySetURI(final String name) {
    return entitySets.get(name);
  }

  public Map getFunctionImports() {
    return functionImports;
  }

  /**
   * Gets function import names.
   * 
   * @return function import names.
   */
  public Collection getFunctionImportNames() {
    return functionImports.keySet();
  }

  /**
   * Gets function import URIs.
   * 
   * @return function import URIs.
   */
  public Collection getFunctionImportURIs() {
    return functionImports.values();
  }

  /**
   * Gets URI of the given function import.
   * 
   * @param name name.
   * @return URI.
   */
  public URI getFunctionImportURI(final String name) {
    return functionImports.get(name);
  }

  public Map getSingletons() {
    return singletons;
  }

  /**
   * Gets singleton names.
   * 
   * @return singleton names.
   */
  public Collection getSingletonNames() {
    return singletons.keySet();
  }

  /**
   * Gets singleton URIs.
   * 
   * @return singleton URIs.
   */
  public Collection getSingletonURIs() {
    return singletons.values();
  }

  /**
   * Gets URI of the given singleton.
   * 
   * @param name name.
   * @return URI.
   */
  public URI getSingletonURI(final String name) {
    return singletons.get(name);
  }

  public Map getRelatedServiceDocuments() {
    return relatedServiceDocuments;
  }

  /**
   * Gets related service documents names.
   * 
   * @return related service documents names.
   */
  public Collection getRelatedServiceDocumentsNames() {
    return relatedServiceDocuments.keySet();
  }

  /**
   * Gets related service documents URIs.
   * 
   * @return related service documents URIs.
   */
  public Collection getRelatedServiceDocumentsURIs() {
    return relatedServiceDocuments.values();
  }

  /**
   * Gets URI of the given related service documents.
   * 
   * @param name name.
   * @return URI.
   */
  public URI getRelatedServiceDocumentURI(final String name) {
    return relatedServiceDocuments.get(name);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy