Codota Logo
RamlTranslator
Code IndexAdd Codota to your IDE (free)

How to use
RamlTranslator
in
org.restlet.ext.platform.internal.conversion.raml

Best Java code snippets using org.restlet.ext.platform.internal.conversion.raml.RamlTranslator (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Returns the list of
 * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined
 * by the given {@link org.raml.model.Resource}.
 * 
 * @param resource
 *            The given resource.
 * @return The list of
 *         {@link org.restlet.ext.platform.internal.model.PathVariable} as
 *         defined by the given {@link org.raml.model.Resource}.
 */
private static List<PathVariable> getPathVariables(
    org.raml.model.Resource resource) {
  List<PathVariable> pathVariables = new ArrayList<>();
  for (Entry<String, UriParameter> entry : resource.getUriParameters()
      .entrySet()) {
    pathVariables
        .add(getPathVariable(entry.getKey(), entry.getValue()));
  }
  if (resource.getParentResource() != null) {
    pathVariables
        .addAll(getPathVariables(resource.getParentResource()));
  }
  return pathVariables;
}
origin: org.restlet.jee/org.restlet.ext.platform

rwadResource.setPathVariables(getPathVariables(resource));
rwadResource.getPathVariables().addAll(rootPathVariables);
  rwadResources.addAll(getResource(
      ConversionUtils.processResourceName(entry.getValue().getUri()),
      entry.getValue(), rootPathVariables));
origin: org.restlet.jse/org.restlet.ext.platform

for (Entry<String, UriParameter> entry : raml.getBaseUriParameters()
    .entrySet()) {
  rootPathVariables.add(getPathVariable(entry.getKey(),
      entry.getValue()));
  org.raml.model.Resource resource = entry.getValue();
  contract.getResources().addAll(
      getResource(
          ConversionUtils.processResourceName(resource.getUri()),
          resource, rootPathVariables));
origin: org.restlet.gae/org.restlet.ext.platform

Map<String, Map<String, Object>> representationSamples = getSamples(contract);
raml.setSecuritySchemes(getSecuritySchemes(endpoint));
fillResources(raml.getResources(), m, contract, representationSamples);
origin: org.restlet.gae/org.restlet.ext.platform

fillInputRepresentation(m, representationSamples, action,
    operation, ramlInRepresentation);
    try {
      ramlOutRepresentationWithMediaType
          .setExample(getExampleFromPayLoad(
              response.getOutputPayLoad(),
              representationSamples,
origin: org.restlet.jse/org.restlet.ext.platform

try {
  ramlInRepresentationWithMediaType
      .setExample(getExampleFromPayLoad(
          operation.getInputPayLoad(),
          representationSamples, mediaType));
origin: org.restlet.jee/org.restlet.ext.platform

Map<String, Map<String, Object>> representationSamples = getSamples(contract);
raml.setSecuritySchemes(getSecuritySchemes(endpoint));
fillResources(raml.getResources(), m, contract, representationSamples);
origin: org.restlet.osgi/org.restlet.ext.platform

for (Entry<String, UriParameter> entry : raml.getBaseUriParameters()
    .entrySet()) {
  rootPathVariables.add(getPathVariable(entry.getKey(),
      entry.getValue()));
  org.raml.model.Resource resource = entry.getValue();
  contract.getResources().addAll(
      getResource(
          ConversionUtils.processResourceName(resource.getUri()),
          resource, rootPathVariables));
origin: org.restlet.jse/org.restlet.ext.platform

fillInputRepresentation(m, representationSamples, action,
    operation, ramlInRepresentation);
    try {
      ramlOutRepresentationWithMediaType
          .setExample(getExampleFromPayLoad(
              response.getOutputPayLoad(),
              representationSamples,
origin: org.restlet.osgi/org.restlet.ext.platform

try {
  ramlInRepresentationWithMediaType
      .setExample(getExampleFromPayLoad(
          operation.getInputPayLoad(),
          representationSamples, mediaType));
origin: org.restlet.jse/org.restlet.ext.platform

Map<String, Map<String, Object>> representationSamples = getSamples(contract);
raml.setSecuritySchemes(getSecuritySchemes(endpoint));
fillResources(raml.getResources(), m, contract, representationSamples);
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Returns the list of
 * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined
 * by the given {@link org.raml.model.Resource}.
 * 
 * @param resource
 *            The given resource.
 * @return The list of
 *         {@link org.restlet.ext.platform.internal.model.PathVariable} as
 *         defined by the given {@link org.raml.model.Resource}.
 */
private static List<PathVariable> getPathVariables(
    org.raml.model.Resource resource) {
  List<PathVariable> pathVariables = new ArrayList<>();
  for (Entry<String, UriParameter> entry : resource.getUriParameters()
      .entrySet()) {
    pathVariables
        .add(getPathVariable(entry.getKey(), entry.getValue()));
  }
  if (resource.getParentResource() != null) {
    pathVariables
        .addAll(getPathVariables(resource.getParentResource()));
  }
  return pathVariables;
}
origin: org.restlet.gae/org.restlet.ext.platform

rwadResource.setPathVariables(getPathVariables(resource));
rwadResource.getPathVariables().addAll(rootPathVariables);
  rwadResources.addAll(getResource(
      ConversionUtils.processResourceName(entry.getValue().getUri()),
      entry.getValue(), rootPathVariables));
origin: org.restlet.gae/org.restlet.ext.platform

for (Entry<String, UriParameter> entry : raml.getBaseUriParameters()
    .entrySet()) {
  rootPathVariables.add(getPathVariable(entry.getKey(),
      entry.getValue()));
  org.raml.model.Resource resource = entry.getValue();
  contract.getResources().addAll(
      getResource(
          ConversionUtils.processResourceName(resource.getUri()),
          resource, rootPathVariables));
origin: org.restlet.jee/org.restlet.ext.platform

fillInputRepresentation(m, representationSamples, action,
    operation, ramlInRepresentation);
    try {
      ramlOutRepresentationWithMediaType
          .setExample(getExampleFromPayLoad(
              response.getOutputPayLoad(),
              representationSamples,
origin: org.restlet.jee/org.restlet.ext.platform

try {
  ramlInRepresentationWithMediaType
      .setExample(getExampleFromPayLoad(
          operation.getInputPayLoad(),
          representationSamples, mediaType));
origin: org.restlet.osgi/org.restlet.ext.platform

Map<String, Map<String, Object>> representationSamples = getSamples(contract);
raml.setSecuritySchemes(getSecuritySchemes(endpoint));
fillResources(raml.getResources(), m, contract, representationSamples);
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Returns the list of
 * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined
 * by the given {@link org.raml.model.Resource}.
 * 
 * @param resource
 *            The given resource.
 * @return The list of
 *         {@link org.restlet.ext.platform.internal.model.PathVariable} as
 *         defined by the given {@link org.raml.model.Resource}.
 */
private static List<PathVariable> getPathVariables(
    org.raml.model.Resource resource) {
  List<PathVariable> pathVariables = new ArrayList<>();
  for (Entry<String, UriParameter> entry : resource.getUriParameters()
      .entrySet()) {
    pathVariables
        .add(getPathVariable(entry.getKey(), entry.getValue()));
  }
  if (resource.getParentResource() != null) {
    pathVariables
        .addAll(getPathVariables(resource.getParentResource()));
  }
  return pathVariables;
}
origin: org.restlet.osgi/org.restlet.ext.platform

rwadResource.setPathVariables(getPathVariables(resource));
rwadResource.getPathVariables().addAll(rootPathVariables);
  rwadResources.addAll(getResource(
      ConversionUtils.processResourceName(entry.getValue().getUri()),
      entry.getValue(), rootPathVariables));
origin: org.restlet.jee/org.restlet.ext.platform

for (Entry<String, UriParameter> entry : raml.getBaseUriParameters()
    .entrySet()) {
  rootPathVariables.add(getPathVariable(entry.getKey(),
      entry.getValue()));
  org.raml.model.Resource resource = entry.getValue();
  contract.getResources().addAll(
      getResource(
          ConversionUtils.processResourceName(resource.getUri()),
          resource, rootPathVariables));
org.restlet.ext.platform.internal.conversion.ramlRamlTranslator

Javadoc

Tools library for converting Restlet Web API Definition to and from RAML documentation.

Most used methods

  • fillInputRepresentation
  • fillResources
  • getExampleFromPayLoad
    Returns an example in provided media Type of the entity in the given PayLoad.
  • getPathVariable
    Returns the org.restlet.ext.platform.internal.model.PathVariableas described by the given org.raml.m
  • getPathVariables
    Returns the list of org.restlet.ext.platform.internal.model.PathVariable as defined by the given org
  • getResource
    Returns the list of Resources nested under a given Resource.
  • getSamples
    Builds a sample map for each Representation of the Contract
  • getSecuritySchemes

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • setContentView (Activity)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now