Tabnine Logo
ResourceListingApi
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceListingApi
in
org.restlet.ext.platform.internal.conversion.swagger.v1_2.model

Best Java code snippets using org.restlet.ext.platform.internal.conversion.swagger.v1_2.model.ResourceListingApi (Showing top 20 results out of 315)

origin: org.restlet.jee/org.restlet.ext.platform

@Override
public int compare(ResourceListingApi o1,
    ResourceListingApi o2) {
  return o1.getPath().compareTo(o2.getPath());
}
origin: org.restlet.osgi/org.restlet.ext.platform

ResourceListingApi rd = new ResourceListingApi();
rd.setDescription(resource.getDescription());
rd.setPath(ReflectUtils.getFirstSegment(resource
    .getResourcePath()));
if (!addedApis.contains(rd.getPath())) {
  addedApis.add(rd.getPath());
  listing.getApis().add(rd);
for (String sectionName : resource.getSections()) {
  Section section = contract.getSection(sectionName);
  ResourceListingApi rd = new ResourceListingApi();
  rd.setDescription(section.getDescription());
  rd.setPath("/" + sectionName);
  if (!addedApis.contains(rd.getPath())) {
    addedApis.add(rd.getPath());
    listing.getApis().add(rd);
origin: org.restlet.jee/org.restlet.ext.platform

private static void fillSections(Contract contract, ResourceListing listing) {
  for (ResourceListingApi api : listing.getApis()) {
    Section section = new Section();
    String sectionName = SwaggerUtils.computeSectionName(api.getPath());
    section.setName(sectionName);
    section.setDescription(api.getDescription());
    contract.getSections().add(section);
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Fills Restlet Web API definition's Contract from Swagger 1.2 definition
 * 
 * @param contract
 *            The Restlet Web API definition's Contract
 * @param listing
 *            The Swagger ResourceListing
 * @param apiDeclarations
 *            The Swagger ApiDeclaration
 */
private static void fillContract(Contract contract,
    ResourceListing listing, Map<String, ApiDeclaration> apiDeclarations) {
  List<String> declaredTypes = new ArrayList<>();
  for (Entry<String, ApiDeclaration> entry : apiDeclarations.entrySet()) {
    ApiDeclaration apiDeclaration = entry.getValue();
    String sectionName = entry.getKey();
    if (!StringUtils.isNullOrEmpty(sectionName)) {
      fillContract(contract, apiDeclaration, declaredTypes,
          sectionName.startsWith("/") ? sectionName.substring(1) : sectionName,
          listing.getApi(sectionName).getDescription());
    } else {
      fillContract(contract, apiDeclaration, declaredTypes, null, null);
    }
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

ResourceListingApi rd = new ResourceListingApi();
rd.setDescription(resource.getDescription());
rd.setPath(ReflectUtils.getFirstSegment(resource
    .getResourcePath()));
if (!addedApis.contains(rd.getPath())) {
  addedApis.add(rd.getPath());
  listing.getApis().add(rd);
for (String sectionName : resource.getSections()) {
  Section section = contract.getSection(sectionName);
  ResourceListingApi rd = new ResourceListingApi();
  rd.setDescription(section.getDescription());
  rd.setPath("/" + sectionName);
  if (!addedApis.contains(rd.getPath())) {
    addedApis.add(rd.getPath());
    listing.getApis().add(rd);
origin: org.restlet.gae/org.restlet.ext.platform

private static void fillSections(Contract contract, ResourceListing listing) {
  for (ResourceListingApi api : listing.getApis()) {
    Section section = new Section();
    String sectionName = SwaggerUtils.computeSectionName(api.getPath());
    section.setName(sectionName);
    section.setDescription(api.getDescription());
    contract.getSections().add(section);
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

/**
 * Fills Restlet Web API definition's Contract from Swagger 1.2 definition
 * 
 * @param contract
 *            The Restlet Web API definition's Contract
 * @param listing
 *            The Swagger ResourceListing
 * @param apiDeclarations
 *            The Swagger ApiDeclaration
 */
private static void fillContract(Contract contract,
    ResourceListing listing, Map<String, ApiDeclaration> apiDeclarations) {
  List<String> declaredTypes = new ArrayList<>();
  for (Entry<String, ApiDeclaration> entry : apiDeclarations.entrySet()) {
    ApiDeclaration apiDeclaration = entry.getValue();
    String sectionName = entry.getKey();
    if (!StringUtils.isNullOrEmpty(sectionName)) {
      fillContract(contract, apiDeclaration, declaredTypes,
          sectionName.startsWith("/") ? sectionName.substring(1) : sectionName,
          listing.getApi(sectionName).getDescription());
    } else {
      fillContract(contract, apiDeclaration, declaredTypes, null, null);
    }
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

ResourceListingApi rd = new ResourceListingApi();
rd.setDescription(resource.getDescription());
rd.setPath(ReflectUtils.getFirstSegment(resource
    .getResourcePath()));
if (!addedApis.contains(rd.getPath())) {
  addedApis.add(rd.getPath());
  listing.getApis().add(rd);
for (String sectionName : resource.getSections()) {
  Section section = contract.getSection(sectionName);
  ResourceListingApi rd = new ResourceListingApi();
  rd.setDescription(section.getDescription());
  rd.setPath("/" + sectionName);
  if (!addedApis.contains(rd.getPath())) {
    addedApis.add(rd.getPath());
    listing.getApis().add(rd);
origin: org.restlet.gae/org.restlet.ext.platform

@Override
public int compare(ResourceListingApi o1,
    ResourceListingApi o2) {
  return o1.getPath().compareTo(o2.getPath());
}
origin: org.restlet.jse/org.restlet.ext.platform

private static void fillSections(Contract contract, ResourceListing listing) {
  for (ResourceListingApi api : listing.getApis()) {
    Section section = new Section();
    String sectionName = SwaggerUtils.computeSectionName(api.getPath());
    section.setName(sectionName);
    section.setDescription(api.getDescription());
    contract.getSections().add(section);
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Fills Restlet Web API definition's Contract from Swagger 1.2 definition
 * 
 * @param contract
 *            The Restlet Web API definition's Contract
 * @param listing
 *            The Swagger ResourceListing
 * @param apiDeclarations
 *            The Swagger ApiDeclaration
 */
private static void fillContract(Contract contract,
    ResourceListing listing, Map<String, ApiDeclaration> apiDeclarations) {
  List<String> declaredTypes = new ArrayList<>();
  for (Entry<String, ApiDeclaration> entry : apiDeclarations.entrySet()) {
    ApiDeclaration apiDeclaration = entry.getValue();
    String sectionName = entry.getKey();
    if (!StringUtils.isNullOrEmpty(sectionName)) {
      fillContract(contract, apiDeclaration, declaredTypes,
          sectionName.startsWith("/") ? sectionName.substring(1) : sectionName,
          listing.getApi(sectionName).getDescription());
    } else {
      fillContract(contract, apiDeclaration, declaredTypes, null, null);
    }
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

ResourceListingApi rd = new ResourceListingApi();
rd.setDescription(resource.getDescription());
rd.setPath(ReflectUtils.getFirstSegment(resource
    .getResourcePath()));
if (!addedApis.contains(rd.getPath())) {
  addedApis.add(rd.getPath());
  listing.getApis().add(rd);
for (String sectionName : resource.getSections()) {
  Section section = contract.getSection(sectionName);
  ResourceListingApi rd = new ResourceListingApi();
  rd.setDescription(section.getDescription());
  rd.setPath("/" + sectionName);
  if (!addedApis.contains(rd.getPath())) {
    addedApis.add(rd.getPath());
    listing.getApis().add(rd);
origin: org.restlet.jse/org.restlet.ext.platform

@Override
public int compare(ResourceListingApi o1,
    ResourceListingApi o2) {
  return o1.getPath().compareTo(o2.getPath());
}
origin: org.restlet.osgi/org.restlet.ext.platform

private static void fillSections(Contract contract, ResourceListing listing) {
  for (ResourceListingApi api : listing.getApis()) {
    Section section = new Section();
    String sectionName = SwaggerUtils.computeSectionName(api.getPath());
    section.setName(sectionName);
    section.setDescription(api.getDescription());
    contract.getSections().add(section);
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Fills Restlet Web API definition's Contract from Swagger 1.2 definition
 * 
 * @param contract
 *            The Restlet Web API definition's Contract
 * @param listing
 *            The Swagger ResourceListing
 * @param apiDeclarations
 *            The Swagger ApiDeclaration
 */
private static void fillContract(Contract contract,
    ResourceListing listing, Map<String, ApiDeclaration> apiDeclarations) {
  List<String> declaredTypes = new ArrayList<>();
  for (Entry<String, ApiDeclaration> entry : apiDeclarations.entrySet()) {
    ApiDeclaration apiDeclaration = entry.getValue();
    String sectionName = entry.getKey();
    if (!StringUtils.isNullOrEmpty(sectionName)) {
      fillContract(contract, apiDeclaration, declaredTypes,
          sectionName.startsWith("/") ? sectionName.substring(1) : sectionName,
          listing.getApi(sectionName).getDescription());
    } else {
      fillContract(contract, apiDeclaration, declaredTypes, null, null);
    }
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

@Override
public int compare(ResourceListingApi o1,
    ResourceListingApi o2) {
  return o1.getPath().compareTo(o2.getPath());
}
origin: org.restlet.osgi/org.restlet.ext.platform

public ResourceListingApi getApi(String path) {
  for (ResourceListingApi api : apis) {
    if (path.equals(api.getPath())) {
      return api;
    }
  }
  return null;
}
origin: org.restlet.jee/org.restlet.ext.platform

public ResourceListingApi getApi(String path) {
  for (ResourceListingApi api : apis) {
    if (path.equals(api.getPath())) {
      return api;
    }
  }
  return null;
}
origin: org.restlet.jse/org.restlet.ext.platform

public ResourceListingApi getApi(String path) {
  for (ResourceListingApi api : apis) {
    if (path.equals(api.getPath())) {
      return api;
    }
  }
  return null;
}
origin: org.restlet.gae/org.restlet.ext.platform

public ResourceListingApi getApi(String path) {
  for (ResourceListingApi api : apis) {
    if (path.equals(api.getPath())) {
      return api;
    }
  }
  return null;
}
org.restlet.ext.platform.internal.conversion.swagger.v1_2.modelResourceListingApi

Most used methods

  • <init>
  • getDescription
  • getPath
  • setDescription
  • setPath

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now